• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetOCPNConfigObject函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetOCPNConfigObject函数的典型用法代码示例。如果您正苦于以下问题:C++ GetOCPNConfigObject函数的具体用法?C++ GetOCPNConfigObject怎么用?C++ GetOCPNConfigObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetOCPNConfigObject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: AddLocaleCatalog

int vdr_pi::Init(void)
{
      AddLocaleCatalog( _T("opencpn-vdr_pi") );

      //    Get a pointer to the opencpn configuration object
      m_pconfig = GetOCPNConfigObject();
      m_pauimgr = GetFrameAuiManager();
      m_pvdrcontrol = NULL;

      //    And load the configuration items
      LoadConfig();

      //    This PlugIn needs two toolbar icons
      m_tb_item_id_record = InsertPlugInTool(_T(""), _img_vdr_record, _img_vdr_record, wxITEM_CHECK,
            _("Record"), _T(""), NULL, VDR_TOOL_POSITION, 0, this);
      m_tb_item_id_play = InsertPlugInTool(_T(""), _img_vdr_play, _img_vdr_play, wxITEM_CHECK,
            _("Play"), _T(""), NULL, VDR_TOOL_POSITION, 0, this);
      m_recording = false;

      return (
           WANTS_TOOLBAR_CALLBACK    |
           INSTALLS_TOOLBAR_TOOL     |
           WANTS_CONFIG              |
           WANTS_NMEA_SENTENCES      |
           WANTS_AIS_SENTENCES
            );
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:27,代码来源:vdr_pi.cpp


示例2: PreferencesDialogBase

PreferencesDialog::PreferencesDialog(wxWindow* parent)
    : PreferencesDialogBase(parent)
{
    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T ( "/Settings/Plots" ) );

    if(!pConf)
        return;

    bool bvalue;
    int ivalue;
    pConf->Read(_T("PlotCount"), &ivalue, 1);
    m_sPlotCount->SetValue(ivalue);
    
    pConf->Read(_T("CoursePrediction"), &bvalue, false);
    m_cbCoursePrediction->SetValue(bvalue);

    pConf->Read(_T("CoursePredictionBlended"), &bvalue, false);
    m_cbCoursePredictionBlended->SetValue(bvalue);

    pConf->Read(_T("CoursePredictionLength"), &ivalue, 10);
    m_sCoursePredictionLength->SetValue(ivalue);

    pConf->Read(_T("CoursePredictionSeconds"), &ivalue, 10);
    m_sCoursePredictionSeconds->SetValue(ivalue);
}
开发者ID:seandepagnier,项目名称:sweepplot_pi,代码行数:26,代码来源:PreferencesDialog.cpp


示例3: GetOCPNConfigObject

void DecoderOptionsDialog::OnDone( wxCommandEvent& event )
{
    wxFileConfig *pConf = GetOCPNConfigObject();

    pConf->SetPath ( _T ( "/Settings/WeatherFax/Audio" ) );

    bool spin_options_changed =
        m_sBitsPerPixel->GetValue() != pConf->Read ( _T ( "BitsPerPixel" ), 8L ) ||
        m_sCarrier->GetValue() != pConf->Read ( _T ( "Carrier" ), 1900L ) ||
        m_sDeviation->GetValue() != pConf->Read ( _T ( "Deviation" ), 400L ) ||
        m_sMinusSaturationThreshold->GetValue() != pConf->Read ( _T ( "MinusSaturationThreshold" ), 15L );

    pConf->Write ( _T ( "ImageWidth" ), m_sImageWidth->GetValue());
    pConf->Write ( _T ( "BitsPerPixel" ), m_sBitsPerPixel->GetValue());
    pConf->Write ( _T ( "Carrier" ), m_sCarrier->GetValue());
    pConf->Write ( _T ( "Deviation" ), m_sDeviation->GetValue());
    pConf->Write ( _T ( "MinusSaturationThreshold" ), m_sMinusSaturationThreshold->GetValue());
    pConf->Write ( _T ( "Filter" ), m_cFilter->GetSelection());
    pConf->Write ( _T ( "SkipHeaderDetection" ), m_cbSkip->GetValue());
    pConf->Write ( _T ( "IncludeHeadersInImage" ), m_cbInclude->GetValue());

    FaxDecoder &decoder = m_wizard.m_decoder;
    bool capture = decoder.m_CaptureSettings.type == FaxDecoderCaptureSettings::AUDIO ||
        decoder.m_CaptureSettings.type == FaxDecoderCaptureSettings::RTLSDR;

//    Hide();
    EndModal(wxID_OK);

    if(origwidth != m_sImageWidth->GetValue() ||
       (!capture && spin_options_changed)) {
        origwidth = m_sImageWidth->GetValue();
        ResetDecoder();
    }
}
开发者ID:nohal,项目名称:weatherfax_pi,代码行数:34,代码来源:DecoderOptionsDialog.cpp


示例4: GetOCPNConfigObject

GRIBUIDialog::~GRIBUIDialog()
{
    wxFileConfig *pConf = GetOCPNConfigObject();;

    if(pConf) {
        pConf->SetPath ( _T ( "/Settings/GRIB" ) );

        pConf->Write( _T ( "WindPlot" ), m_cbWind->GetValue());
        pConf->Write( _T ( "WindGustPlot" ), m_cbWindGust->GetValue());
        pConf->Write( _T ( "PressurePlot" ), m_cbPressure->GetValue());
        pConf->Write( _T ( "WavePlot" ), m_cbWave->GetValue());
        pConf->Write( _T ( "CurrentPlot" ), m_cbCurrent->GetValue());
        pConf->Write( _T ( "PrecipitationPlot" ), m_cbPrecipitation->GetValue());
        pConf->Write( _T ( "CloudPlot" ), m_cbCloud->GetValue());
        pConf->Write( _T ( "AirTemperaturePlot" ), m_cbAirTemperature->GetValue());
        pConf->Write( _T ( "SeaTemperaturePlot" ), m_cbSeaTemperature->GetValue());
        pConf->Write( _T ( "lastdatatype" ), m_lastdatatype);

        pConf->Write ( _T ( "Filename" ), m_file_name );

        pConf->SetPath ( _T ( "/Directories" ) );
        pConf->Write ( _T ( "GRIBDirectory" ), m_grib_dir );
    }

    delete m_pTimelineSet;
}
开发者ID:IgorMikhal,项目名称:OpenCPN,代码行数:26,代码来源:GribUIDialog.cpp


示例5: AddLocaleCatalog

int calculator_pi::Init(void)
{
      AddLocaleCatalog( _T("opencpn-calculator_pi") );

      // Set some default private member parameters
      m_calculator_dialog_x = 0;
      m_calculator_dialog_y = 0;
      m_calculator_dialog_width = 20;
      m_calculator_dialog_height = 20;

      ::wxDisplaySize(&m_display_width, &m_display_height);

      //    Get a pointer to the opencpn display canvas, to use as a parent for the POI Manager dialog
      m_parent_window = GetOCPNCanvasWindow();

      //    Get a pointer to the opencpn configuration object
      m_pconfig = GetOCPNConfigObject();

      //    And load the configuration items
      LoadConfig();

      //    This PlugIn needs a toolbar icon, so request its insertion
      m_leftclick_tool_id  = InsertPlugInTool(_T(""), _img_calc, _img_calc, wxITEM_NORMAL,
            _("Calculator"), _T(""), NULL,
             CALCULATOR_TOOL_POSITION, 0, this);

      m_pDialog = NULL;

      return (WANTS_TOOLBAR_CALLBACK   |
              INSTALLS_TOOLBAR_TOOL     |
              WANTS_PREFERENCES         |
              WANTS_CONFIG
           );
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:34,代码来源:calculator_pi.cpp


示例6: GetOCPNConfigObject

void GribOverlaySettings::Write()
{
    /* save settings here */
    wxFileConfig *pConf = GetOCPNConfigObject();

    if(!pConf)
        return;

    pConf->SetPath ( _T( "/PlugIns/GRIB" ) );
    pConf->Write ( _T ( "Interpolate" ), m_bInterpolate);
    pConf->Write ( _T ( "LoopMode" ), m_bLoopMode );
    pConf->Write ( _T ( "SlicesPerUpdate" ), m_SlicesPerUpdate);
    pConf->Write ( _T ( "UpdatesPerSecond" ), m_UpdatesPerSecond);
    pConf->Write ( _T ( "HourDivider" ), m_HourDivider);

    for(int i=0; i<SETTINGS_COUNT; i++) {
        wxString Name=name_from_index[i];

        pConf->Write ( Name + _T ( "Units" ), (int)Settings[i].m_Units);
        pConf->Write ( Name + _T ( "BarbedArrows" ), Settings[i].m_bBarbedArrows);
        pConf->Write ( Name + _T ( "BarbedRange" ), Settings[i].m_iBarbedRange);
        pConf->Write ( Name + _T ( "IsoBars" ), Settings[i].m_bIsoBars);
        pConf->Write ( Name + _T ( "IsoBarSpacing" ), Settings[i].m_iIsoBarSpacing);
        pConf->Write ( Name + _T ( "DirectionArrows" ), Settings[i].m_bDirectionArrows);
        pConf->Write ( Name + _T ( "DirectionArrowSize" ), Settings[i].m_iDirectionArrowSize);
        pConf->Write ( Name + _T ( "OverlayMap" ), Settings[i].m_bOverlayMap);
        pConf->Write ( Name + _T ( "OverlayMapColors" ), Settings[i].m_iOverlayMapColors);
        pConf->Write ( Name + _T ( "Numbers" ), Settings[i].m_bNumbers);
        pConf->Write ( Name + _T ( "NumbersSpacing" ), Settings[i].m_iNumbersSpacing);
    }
}
开发者ID:peorobertsson,项目名称:OpenCPN,代码行数:31,代码来源:GribSettingsDialog.cpp


示例7: AddLocaleCatalog

int locapi_pi::Init ( void )
{
	AddLocaleCatalog ( _T ( "opencpn-locapi_pi" ) );

	m_pconfig = GetOCPNConfigObject();
	LoadConfig();

	status = REPORT_NOT_SUPPORTED;
	if (SUCCEEDED(spLoc.CoCreateInstance(CLSID_Location))) // Create the Location object
	{
		wxLogMessage(_T("LOCAPI: Instance created"));
		// Array of report types of interest. Other ones include IID_ICivicAddressReport
		IID REPORT_TYPES[] = { IID_ILatLongReport };
		// Request permissions for this user account to receive location data for all the
		// types defined in REPORT_TYPES (which is currently just one report)
		if (FAILED(spLoc->RequestPermissions(NULL, REPORT_TYPES, ARRAYSIZE(REPORT_TYPES), TRUE))) // TRUE means a synchronous request
		{
			wxMessageBox( _("Warning: Unable to request permissions to receive location updates.") );
		}		
	}
	else
	{
		wxLogMessage(_T("LOCAPI: Instance creation failed"));
	}

	Start( m_interval, wxTIMER_CONTINUOUS );
	return (
		WANTS_CONFIG
		);
}
开发者ID:nohal,项目名称:locapi_pi,代码行数:30,代码来源:locapi_pi.cpp


示例8: SelectedPolar

void BoatDialog::OnSaveFile ( wxCommandEvent& event )
{
    long index = SelectedPolar();
    if(index < 0)
        return;

    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T( "/PlugIns/WeatherRouting/BoatDialog" ) );

    wxString path;
    pConf->Read ( _T ( "FilePath" ), &path, weather_routing_pi::StandardPath());

    wxFileDialog saveDialog( this, _( "Select Polar" ), path, wxT ( "" ),
                             wxT ( "Boat Polar files (*.file)|*.FILE;*.file|All files (*.*)|*.*" ), wxFD_SAVE  );

    if( saveDialog.ShowModal() == wxID_OK ) {
        wxString filename = saveDialog.GetPath();
        pConf->SetPath ( _T( "/PlugIns/WeatherRouting/BoatDialog" ) );
        pConf->Write ( _T ( "FILEPath" ), wxFileName(filename).GetPath() );

        Polar &polar = m_Boat.Polars[index];
        if(!polar.Save(saveDialog.GetPath().mb_str())) {
            wxMessageDialog md(this, _("Failed saving boat polar to file"), _("OpenCPN Weather Routing Plugin"),
                               wxICON_ERROR | wxOK );
            md.ShowModal();
        }
    }
}
开发者ID:cagscat,项目名称:weather_routing_pi,代码行数:28,代码来源:BoatDialog.cpp


示例9: AddLocaleCatalog

int findit_pi::Init(void)
{
	  AddLocaleCatalog( _T("opencpn-findit_pi") );

      m_pFindItWindow = NULL;

	  isLogbookReady = FALSE;;
	  isLogbookWindowShown = FALSE;

      // Get a pointer to the opencpn display canvas, to use as a parent for windows created
      m_parent_window = GetOCPNCanvasWindow();

	  m_pconfig = GetOCPNConfigObject();
	  LoadConfig();

      // Create the Context Menu Items

      //    In order to avoid an ASSERT on msw debug builds,
      //    we need to create a dummy menu to act as a surrogate parent of the created MenuItems
      //    The Items will be re-parented when added to the real context meenu
      wxMenu dummy_menu;
	  m_bFINDITShowIcon = true;
	  if(m_bFINDITShowIcon)
            m_leftclick_tool_id  = InsertPlugInTool(_T(""), _img_findit, _img_findit, wxITEM_NORMAL,
                  _("FindIt"), _T(""), NULL,
                   FINDIT_TOOL_POSITION, 0, this);

      return (
			WANTS_TOOLBAR_CALLBACK    |
		    WANTS_PREFERENCES         |
			WANTS_PLUGIN_MESSAGING 
            );
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:33,代码来源:findit_pi.cpp


示例10: GetOCPNConfigObject

void BoatDialog::OnOpenBoat ( wxCommandEvent& event )
{
    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T( "/PlugIns/WeatherRouting/BoatDialog" ) );

    wxString path;
    pConf->Read ( _T ( "Path" ), &path, weather_routing_pi::StandardPath());

    wxFileDialog openDialog
        ( this, _( "Select Boat" ), path, wxT ( "" ),
          wxT ( "Boat polar (*.xml)|*.XML;*.xml|All files (*.*)|*.*" ),
          wxFD_OPEN  );

    if( openDialog.ShowModal() == wxID_OK ) {
        wxString filename = openDialog.GetPath();
        pConf->SetPath ( _T( "/PlugIns/WeatherRouting/BoatDialog" ) );
        pConf->Write ( _T ( "Path" ), wxFileName(filename).GetPath() );

        wxString error = m_Boat.OpenXML(filename);
        if(error.empty()) {
            RepopulatePolars();
        } else {
            wxMessageDialog md(this, error, _("OpenCPN Weather Routing Plugin"),
                               wxICON_ERROR | wxOK );
            md.ShowModal();
            return;
        }

        UpdateVMG();
        RefreshPlots();
    }
}
开发者ID:cagscat,项目名称:weather_routing_pi,代码行数:32,代码来源:BoatDialog.cpp


示例11: AddLocaleCatalog

int kmloverlay_pi::Init(void)
{
      m_puserinput = NULL;

      AddLocaleCatalog( _T("opencpn-kmloverlay_pi") );

      m_toolbar_item_id  = InsertPlugInTool( _T(""), _img_kmloverlay, _img_kmloverlay, wxITEM_NORMAL,
            _("KML overlay"), _T(""), NULL, KMLOVERLAY_TOOL_POSITION, 0, this );

      m_pauimgr = GetFrameAuiManager();

      m_puserinput = new KMLOverlayUI( GetOCPNCanvasWindow(), wxID_ANY, _T("") );
      wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("KMLOverlay")).Caption(_("KML overlay")).CaptionVisible(true).Float().FloatingPosition(50,150).Dockable(false).Resizable().CloseButton(true).Show(false);
      m_pauimgr->AddPane( m_puserinput, pane );
      m_pauimgr->Update();

      //    Get a pointer to the opencpn configuration object
      m_pconfig = GetOCPNConfigObject();
      //    And load the configuration items
      LoadConfig();
      ApplyConfig();

      return (
           WANTS_OVERLAY_CALLBACK    |
           WANTS_OPENGL_OVERLAY_CALLBACK |
           WANTS_TOOLBAR_CALLBACK    |
           INSTALLS_TOOLBAR_TOOL     |
// nothing yet //           WANTS_PREFERENCES         |
           WANTS_CONFIG
            );
}
开发者ID:SethDart,项目名称:kmloverlay_pi,代码行数:31,代码来源:kmloverlay_pi.cpp


示例12: DecoderOptionsDialogBase

DecoderOptionsDialog::DecoderOptionsDialog(WeatherFaxWizard &wizard)
#ifndef __WXOSX__
    : DecoderOptionsDialogBase(&wizard),
#else
    : DecoderOptionsDialogBase(&wizard, wxID_ANY, _("Fax Decoding Options"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP),
#endif
    m_wizard(wizard)
{
    Hide();

    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T ( "/Settings/WeatherFax/Audio" ) );

    m_sImageWidth->SetValue(pConf->Read ( _T ( "ImageWidth" ), 1024L ));
    m_sBitsPerPixel->SetValue(pConf->Read ( _T ( "BitsPerPixel" ), 8L ));
    m_sCarrier->SetValue(pConf->Read ( _T ( "Carrier" ), 1900L ));
    m_sDeviation->SetValue(pConf->Read ( _T ( "Deviation" ), 400L ));
    m_sMinusSaturationThreshold->SetValue(pConf->Read ( _T ( "MinusSaturationThreshold" ), 15L ));
    m_cFilter->SetSelection(pConf->Read ( _T ( "Filter" ), FaxDecoder::firfilter::MIDDLE ));
    m_cbSkip->SetValue((bool)pConf->Read ( _T ( "SkipHeaderDetection" ), 0L ));
    m_cbInclude->SetValue((bool)pConf->Read ( _T ( "IncludeHeadersInImage" ), 0L ));

    origwidth = m_sImageWidth->GetValue();

//    FaxDecoder &decoder = m_wizard.m_decoder;

    ConfigureDecoder(true);
}
开发者ID:nohal,项目名称:weatherfax_pi,代码行数:28,代码来源:DecoderOptionsDialog.cpp


示例13: GetOCPNConfigObject

PlotConfigurationDialog::~PlotConfigurationDialog()
{
    wxFileConfig *pConf = GetOCPNConfigObject();

    if(!pConf)
        return;

    pConf->SetPath ( wxString::Format( "/Settings/Plots/%d", m_index ) );

    for(std::list<cbState>::iterator it = m_cbStates.begin(); it != m_cbStates.end(); it++)
        pConf->Write(_T("Plot ") + it->name, it->cb->GetValue());

    double vmgcourse;
    m_tVMGCourse->GetValue().ToDouble(&vmgcourse);
    pConf->Write(_T("VMGCourse"), vmgcourse);

#if wxCHECK_VERSION(3,0,0)
    pConf->Write(_T("PlotFont"), m_fpPlotFont->GetSelectedFont());
#endif
    pConf->Write(_T("PlotMinHeight"), m_sPlotMinHeight->GetValue());
    pConf->Write(_T("PlotColors"), m_cColors->GetSelection());
    pConf->Write(_T("PlotTransparency"), m_sPlotTransparency->GetValue());
    pConf->Write(_T("PlotStyle"), m_cPlotStyle->GetSelection());
    pConf->Write(_T("PlotShowTitleBar"), m_cbShowTitleBar->GetValue());
}
开发者ID:seandepagnier,项目名称:sweepplot_pi,代码行数:25,代码来源:PlotConfigurationDialog.cpp


示例14: AddLocaleCatalog

int gecomapi_pi::Init(void)
{
      m_bshuttingDown = false;

      mPriPosition = 99;

      m_pgecomapi_window = NULL;

      AddLocaleCatalog( _T("opencpn-gecomapi_pi") );

      //    Get a pointer to the opencpn display canvas, to use as a parent for the POI Manager dialog
      m_parent_window = GetOCPNCanvasWindow();

      m_pauimgr = GetFrameAuiManager();

      //    Get a pointer to the opencpn configuration object
      m_pconfig = GetOCPNConfigObject();

      //    And load the configuration items
      LoadConfig();

      //    This PlugIn needs a toolbar icon
#ifdef GECOMAPI_USE_SVG
	  m_toolbar_item_id = InsertPlugInToolSVG(_T("GoogleEarth"), _svg_gecomapi, _svg_gecomapi_rollover, _svg_gecomapi_toggled, wxITEM_CHECK,
		  _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this);
#else           
	  m_toolbar_item_id = InsertPlugInTool(_T("GoogleEarth"), _img_gecomapi, _img_gecomapi, wxITEM_CHECK,
		  _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this); 
#endif

      m_pgecomapi_window = new GEUIDialog(GetOCPNCanvasWindow(), wxID_ANY, m_pauimgr, m_toolbar_item_id, this);

      wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("GoogleEarth")).Caption(_T("GoogleEarth")).CaptionVisible(true).Float().FloatingPosition(0,0).Show(!m_bstartHidden).TopDockable(false).BottomDockable(false).LeftDockable(true).RightDockable(true).CaptionVisible(true).CloseButton(false).MinSize(300,300);

      m_pauimgr->AddPane(m_pgecomapi_window, pane);
      
      if(m_pgecomapi_window)
      {
            m_pgecomapi_window->SetCameraParameters(m_iCameraAzimuth, m_iCameraTilt, m_iCameraRange);
      }

      ApplyConfig();

      m_pauimgr->Update();

      //m_pauimgr->Connect( wxEVT_AUI_RENDER, wxAuiManagerEventHandler( gecomapi_pi::OnAuiRender ), NULL, this );

      return (WANTS_OVERLAY_CALLBACK |
           WANTS_CURSOR_LATLON       |
           WANTS_TOOLBAR_CALLBACK    |
           INSTALLS_TOOLBAR_TOOL     |
           WANTS_PREFERENCES         |
           WANTS_CONFIG              |
           WANTS_NMEA_EVENTS         |
           WANTS_NMEA_SENTENCES      |
           USES_AUI_MANAGER          |
           WANTS_ONPAINT_VIEWPORT
            );      
}
开发者ID:nohal,项目名称:gecomapi_pi,代码行数:59,代码来源:gecomapi_pi.cpp


示例15: GetOCPNConfigObject

ConfigurationDialog::~ConfigurationDialog( )
{
    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T( "/PlugIns/WeatherRouting" ) );

    wxPoint p = GetPosition();
    pConf->Write ( _T ( "ConfigurationX" ), p.x);
    pConf->Write ( _T ( "ConfigurationY" ), p.y);
}
开发者ID:Rasbats,项目名称:OpenCPN.3.3.1117_weather_routing,代码行数:9,代码来源:ConfigurationDialog.cpp


示例16: wxGrid

//------------------------------------------------------------------------------
//          custom grid implementation
//------------------------------------------------------------------------------
CustomGrid::CustomGrid( wxWindow *parent, wxWindowID id, const wxPoint &pos,
					   const wxSize &size, long style,
					   const wxString &name )
  : wxGrid( parent, id, pos, size, style, name )
{
    //create grid
    SetTable( new wxGridStringTable(0, 0), true, wxGridSelectRows );
    //some general settings
    EnableEditing( false );
    EnableGridLines( true );
    EnableDragGridSize( false );
    SetMargins( 0, 0 );
    EnableDragColMove( false );
    EnableDragColSize( false );
    EnableDragRowSize( false );
    //init rows pref
    wxFileConfig *pConf = GetOCPNConfigObject();
    if (pConf) {
        pConf->SetPath(_T("/Settings/GRIB"));
        m_IsDigit = pConf->Read(_T("GribDataTableRowPref"), _T("XXX"));
    }
    if( m_IsDigit.Len() != wxString(_T("XXX")).Len() ) m_IsDigit = _T("XXX");
    //create structure for all numerical rows
    for( unsigned int i = 0; i < m_IsDigit.Len(); i++ ){
        m_NumRow.push_back(wxNOT_FOUND);
        m_NumRowVal.push_back(std::vector <double>());
    }
    //init labels attr
    wxFont labelfont = GetOCPNGUIScaledFont_PlugIn( _T("Dialog") ).MakeBold();
    SetLabelFont(labelfont);
    wxColour colour;
    GetGlobalColor(_T("DILG0"), &colour);
    SetLabelBackgroundColour(colour);
    //set row label size
    int w;
    GetTextExtent( _T("Ab"), &w, NULL, 0, 0, &labelfont);
    double x = (double)w * 6.5;
    SetRowLabelSize((int)x);
    //colour settings
    GetGlobalColor(_T("GREEN1"), &m_greenColour);
    GetGlobalColor(_T("DILG1"), &m_greyColour);

#ifdef __WXOSX__
    m_bLeftDown = false;
#endif

    //connect events at dialog level
    Connect(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollEventHandler( CustomGrid::OnScroll ), NULL, this );
    Connect(wxEVT_SIZE, wxSizeEventHandler( CustomGrid::OnResize ), NULL, this );
    Connect(wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( CustomGrid::OnLabeClick ), NULL, this );
    //connect events at grid level
    GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    GetGridWindow()->Connect(wxEVT_LEFT_UP, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    //timer event
    m_tRefreshTimer.Connect(wxEVT_TIMER, wxTimerEventHandler( CustomGrid::OnRefreshTimer ), NULL, this);
}
开发者ID:OpenCPN,项目名称:OpenCPN,代码行数:60,代码来源:CustomGrid.cpp


示例17: GetOCPNConfigObject

void GribOverlaySettings::Write()
{
    /* save settings here */
    wxFileConfig *pConf = GetOCPNConfigObject();

    if(!pConf)
        return;

    pConf->SetPath ( _T( "/PlugIns/GRIB" ) );
	//Overlay general parameter
    pConf->Write ( _T ( "OverlayTransparency" ), m_iOverlayTransparency);
	//playback options
    pConf->Write ( _T ( "Interpolate" ), m_bInterpolate);
    pConf->Write ( _T ( "LoopMode" ), m_bLoopMode );
    pConf->Write ( _T ( "LoopStartPoint" ), m_LoopStartPoint);
    pConf->Write ( _T ( "SlicesPerUpdate" ), m_SlicesPerUpdate);
    pConf->Write ( _T ( "UpdatesPerSecond" ), m_UpdatesPerSecond);
	//gui options
	pConf->Write( _T ( "GribCursorDataDisplayStyle" ), m_iCtrlandDataStyle );
    wxString s1 = m_iCtrlBarCtrlVisible[0], s2 = m_iCtrlBarCtrlVisible[1];
    pConf->Write( _T ( "CtrlBarCtrlVisibility1" ), s1 );
    pConf->Write( _T ( "CtrlBarCtrlVisibility2" ), s2 );

    for(int i=0; i<SETTINGS_COUNT; i++) {

        pConf->Write ( name_from_index[i] + _T ( "Units" ), (int)Settings[i].m_Units);

        if(i == WIND){
            SaveSettingGroups(pConf, i, B_ARROWS);
            SaveSettingGroups(pConf, i, ISO_LINE_SHORT);
            SaveSettingGroups(pConf, i, OVERLAY);
            SaveSettingGroups(pConf, i, NUMBERS);
            SaveSettingGroups(pConf, i, PARTICLES);
        }
        else if(i == WIND_GUST || i == AIR_TEMPERATURE || i == SEA_TEMPERATURE || i == CAPE || i == COMP_REFL) {
            SaveSettingGroups(pConf, i, ISO_LINE_SHORT);
            SaveSettingGroups(pConf, i, OVERLAY);
            SaveSettingGroups(pConf, i, NUMBERS);
        }
        else if(i == PRESSURE) {
            SaveSettingGroups(pConf, i, ISO_LINE_SHORT);
            SaveSettingGroups(pConf, i, ISO_LINE_VISI);
            SaveSettingGroups(pConf, i, NUMBERS);
        }
        else if(i == WAVE || i == CURRENT) {
            SaveSettingGroups(pConf, i, D_ARROWS);
            SaveSettingGroups(pConf, i, OVERLAY);
            SaveSettingGroups(pConf, i, NUMBERS);
            SaveSettingGroups(pConf, i, PARTICLES);
        }
        else if( i == PRECIPITATION || i == CLOUD) {
            SaveSettingGroups(pConf, i, OVERLAY);
            SaveSettingGroups(pConf, i, NUMBERS);
        }
    }

}
开发者ID:OpenCPN,项目名称:OpenCPN,代码行数:57,代码来源:GribSettingsDialog.cpp


示例18: GetOCPNConfigObject

 CustomGrid::~CustomGrid()
 {
    wxFileConfig *pConf = GetOCPNConfigObject();
    if(pConf) {
        pConf->SetPath ( _T ( "/Settings/GRIB" ) );
        pConf->Write( _T ( "GribDataTableRowPref" ), m_IsDigit );
    }
    m_NumRowVal.clear();
    m_NumRow.clear();
 }
开发者ID:OpenCPN,项目名称:OpenCPN,代码行数:10,代码来源:CustomGrid.cpp


示例19: ConfigurationDialogBase

ConfigurationDialog::ConfigurationDialog(WeatherRouting *weatherrouting)
    : ConfigurationDialogBase(weatherrouting), m_WeatherRouting(weatherrouting)
{
    wxFileConfig *pConf = GetOCPNConfigObject();
    pConf->SetPath ( _T( "/PlugIns/WeatherRouting" ) );

    wxPoint p = GetPosition();
    pConf->Read ( _T ( "ConfigurationX" ), &p.x, p.x);
    pConf->Read ( _T ( "ConfigurationY" ), &p.y, p.y);
    SetPosition(p);
}
开发者ID:Rasbats,项目名称:OpenCPN.3.3.1117_weather_routing,代码行数:11,代码来源:ConfigurationDialog.cpp


示例20: GetOCPNConfigObject

int NmeaConverter_pi::Init(void)
{
    prefDlg = NULL;
    p_nmeaSendObjectDlg=NULL;
    b_CheckChecksum = true;
    //    Get a pointer to the opencpn configuration object
    m_pconfig = GetOCPNConfigObject();
    //    And load the configuration items
    LoadConfig();
    return ( WANTS_NMEA_SENTENCES | WANTS_PREFERENCES );
}
开发者ID:RooieDirk,项目名称:NmeaConverter_pi,代码行数:11,代码来源:NmeaConverter_pi.cpp



注:本文中的GetOCPNConfigObject函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetObj函数代码示例发布时间:2022-05-30
下一篇:
C++ GetNumberOfConsoleInputEvents函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap