您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetOCPNConfigObject函数代码示例

51自学网 2021-06-01 21:11:44
  C++
这篇教程C++ GetOCPNConfigObject函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: PlotConfigurationDialogBase

PlotConfigurationDialog::PlotConfigurationDialog(wxWindow* parent, PlotsDialog &m_dialog, int index) : PlotConfigurationDialogBase(parent), m_PlotsDialog(m_dialog), m_index(index){    wxFileConfig *pConf = GetOCPNConfigObject();    if(!pConf)        return;#define ADD_CB(NAME)                                    /    m_cbStates.push_back(cbState(m_cb##NAME, _T(#NAME)));    ADD_CB(SOG);    ADD_CB(PDS10);    ADD_CB(PDS60);    ADD_CB(COG);    ADD_CB(PDC10);    ADD_CB(PDC60);    ADD_CB(HDG);    ADD_CB(HDM);    ADD_CB(CourseFFTWPlot);    ADD_CB(VMG);    ADD_CB(AWS);    ADD_CB(TWS);    ADD_CB(AWA);    ADD_CB(TWA);    ADD_CB(TWD);        pConf->SetPath ( wxString::Format( "/Settings/Plots/%d", index ) );    for(std::list<cbState>::iterator it = m_cbStates.begin(); it != m_cbStates.end(); it++)        it->cb->SetValue(pConf->Read(_T("Plot ") + it->name, it->cb->GetValue()));    double vmgcourse;    pConf->Read(_T("VMGCourse"), &vmgcourse, 0);    m_tVMGCourse->SetValue(wxString::Format(_T("%f"), vmgcourse));#if wxCHECK_VERSION(3,0,0)//    m_fpPlotFont->SetSelectedFont(pConf->Read(_T("PlotFont"), wxToString(m_fpPlotFont->GetSelectedFont())));#else    wxLogMessage(_T("plots_pi: cannot save and load fonts using wxwidgets version < 3"));#endif        m_sPlotMinHeight->SetValue(pConf->Read(_T("PlotMinHeight"), m_sPlotMinHeight->GetValue()));    m_cColors->SetSelection(pConf->Read(_T("PlotColors"), m_cColors->GetSelection()));    m_sPlotTransparency->SetValue(pConf->Read(_T("PlotTransparency"), m_sPlotTransparency->GetValue()));    m_cPlotStyle->SetSelection(pConf->Read(_T("PlotStyle"), m_cPlotStyle->GetSelection()));#ifdef WIN32    m_cbShowTitleBar->Disable();#else    m_cbShowTitleBar->SetValue(pConf->Read(_T("PlotShowTitleBar"), m_cbShowTitleBar->GetValue()));#endif}
开发者ID:seandepagnier,项目名称:sweepplot_pi,代码行数:50,


示例22: AddLocaleCatalog

int connector_pi::Init(void){                AddLocaleCatalog( _T("opencpn-connector_pi") );		      // Set some default private member parameters      m_connector_dialog_x = 0;      m_connector_dialog_y = 0;      ::wxDisplaySize(&m_display_width, &m_display_height);      //    Get a pointer to the opencpn display canvas, to use as a parent      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_connector, _img_connector, wxITEM_NORMAL,            _("Connector"), _T(""), NULL,             CONNECTOR_TOOL_POSITION, 0, this);      m_pConnectorDialog = NULL;/* *  *  *  */ if (m_DataSources.GetCount() > 0) {		unsigned int i;		DataSource* p;		for (i=0;i<m_DataSources.GetCount();i++){			p = m_DataSources.Item(i);		if( p->protocol==2) St_init(p);		} }      return (WANTS_CURSOR_LATLON       |              WANTS_TOOLBAR_CALLBACK    |              INSTALLS_TOOLBAR_TOOL     |              WANTS_PREFERENCES         |             // WANTS_NMEA_SENTENCES      |			 // WANTS_NMEA_EVENTS 	    |              WANTS_CONFIG           );}
开发者ID:JONA-GA,项目名称:connectorga_pi,代码行数:50,


示例23: AddLocaleCatalog

int route_pi::Init(void){      AddLocaleCatalog( _T("opencpn-route_pi") );      // Set some default private member parameters      m_route_dialog_x = 0;      m_route_dialog_y = 0;      ::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();        // 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;      wxMenuItem *pmi = new wxMenuItem(&dummy_menu, -1, _("Start Route_pi Here"));      m_add_start = AddCanvasContextMenuItem(pmi, this );      SetCanvasContextMenuItemViz(m_add_start, true);      wxMenuItem *pmih = new wxMenuItem(&dummy_menu, -1, _("Finish Route_pi Here."));      m_add_finish = AddCanvasContextMenuItem(pmih, this );      SetCanvasContextMenuItemViz(m_add_finish, true);      //    This PlugIn needs a toolbar icon, so request its insertion      m_leftclick_tool_id  = InsertPlugInTool(_T(""), _img_route_pi, _img_route_pi, wxITEM_NORMAL,            _("Route"), _T(""), NULL,             CALCULATOR_TOOL_POSITION, 0, this);      m_pDialog = NULL;      return (WANTS_TOOLBAR_CALLBACK   |              INSTALLS_TOOLBAR_TOOL    |              WANTS_PREFERENCES        |              WANTS_CURSOR_LATLON      |              WANTS_CONFIG           );}
开发者ID:SaltyPaws,项目名称:route_pi,代码行数:49,


示例24: GetOCPNConfigObject

PreferencesDialog::~PreferencesDialog(){    wxFileConfig *pConf = GetOCPNConfigObject();    if(!pConf)        return;    pConf->SetPath ( _T ( "/Settings/Plots" ) );    pConf->Write(_T("PlotCount"), m_sPlotCount->GetValue());    pConf->Write(_T("CoursePrediction"), m_cbCoursePrediction->GetValue());    pConf->Write(_T("CoursePredictionBlended"), m_cbCoursePredictionBlended->GetValue());    pConf->Write(_T("CoursePredictionLength"), m_sCoursePredictionLength->GetValue());    pConf->Write(_T("CoursePredictionSeconds"), m_sCoursePredictionSeconds->GetValue());}
开发者ID:seandepagnier,项目名称:sweepplot_pi,代码行数:15,



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


C++ GetObj函数代码示例
C++ GetNumberOfConsoleInputEvents函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。