当前位置: 首页>>代码示例>>C++>>正文


C++ wxConfigBase::Write方法代码示例

本文整理汇总了C++中wxConfigBase::Write方法的典型用法代码示例。如果您正苦于以下问题:C++ wxConfigBase::Write方法的具体用法?C++ wxConfigBase::Write怎么用?C++ wxConfigBase::Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxConfigBase的用法示例。


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

示例1: OnCloseWindow

void DIALOG_PRINT_FOR_MODEDIT::OnCloseWindow( wxCloseEvent& event )
{
    if( m_config )
    {
        m_config->Write( OPTKEY_PRINT_MODULE_SCALE, m_ScaleOption->GetSelection() );
        m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White );
    }

    EndModal( 0 );
}
开发者ID:RyuKojiro,项目名称:kicad-source-mirror,代码行数:10,代码来源:dialog_print_for_modedit.cpp

示例2: Save

void wxFileHistoryBase::Save(wxConfigBase& config)
{
    size_t i;
    for (i = 0; i < m_fileMaxFiles; i++)
    {
        wxString buf;
        buf.Printf(wxT("file%d"), (int)i+1);
        if (i < m_fileHistory.GetCount())
            config.Write(buf, wxString(m_fileHistory[i]));
        else
            config.Write(buf, wxEmptyString);
    }
}
开发者ID:Anonymous2,项目名称:project64,代码行数:13,代码来源:filehistorycmn.cpp

示例3: SaveFileConfig

void wxSTEditorOptions::SaveFileConfig(wxConfigBase &config)
{
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    config.Write(configPath+wxT("/LastDir"), GetDefaultFilePath());

    int n, count = fileHistory->GetCount();
    for (n = 0; n < count; n++)
        config.Write(configPath + wxString::Format(wxT("/file%d"), n+1), fileHistory->GetHistoryFile(n));
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:13,代码来源:steopts.cpp

示例4: SaveConfig

void wxSTEditorFrame::SaveConfig(wxConfigBase &config, const wxString &configPath_)
{
    wxString configPath = wxSTEditorOptions::FixConfigPath(configPath_, false);
    if (GetMenuBar() && GetMenuBar()->FindItem(ID_STF_SHOW_SIDEBAR))
    {
        wxString val = GetMenuBar()->IsChecked(ID_STF_SHOW_SIDEBAR) ? "1" : "0";
        config.Write(configPath + "/ShowSidebar", val);
    }

    wxRect rect = GetRect();
    if ((rect.x>=0) && (rect.y>=0) && (rect.width>=100) && (rect.height>=100))
       config.Write(configPath + "/FrameSize", wxString::Format("%d,%d,%d,%d", rect.x, rect.y, rect.width, rect.height));
}
开发者ID:burzumishi,项目名称:caprice32wx,代码行数:13,代码来源:steframe.cpp

示例5: OnNetSortingOptionSelected

void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event )
{
    initListNetsParams();
    buildAvailableListOfNets();

    m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
    if( m_Config )
    {
        m_Config->Write( ZONE_NET_SORT_OPTION_KEY, (long) m_NetDisplayOption->GetSelection() );
        wxString Filter = m_DoNotShowNetNameFilter->GetValue();
        m_Config->Write( ZONE_NET_FILTER_STRING_KEY, Filter );
    }
}
开发者ID:barrem,项目名称:kicad-source-mirror,代码行数:13,代码来源:dialog_copper_zones.cpp

示例6: OnOKButton

void DIALOG_GEN_MODULE_POSITION::OnOKButton( wxCommandEvent& event )
{
    m_unitsOpt = m_radioBoxUnits->GetSelection();
    m_fileOpt = m_radioBoxFilesCount->GetSelection();

    m_config->Write( PLACEFILE_UNITS_KEY, m_unitsOpt );
    m_config->Write( PLACEFILE_OPT_KEY, m_fileOpt );

    // Set output directory and replace backslashes with forward ones
    // (Keep unix convention in cfg files)
    wxString dirStr;
    dirStr = m_outputDirectoryName->GetValue();
    dirStr.Replace( wxT( "\\" ), wxT( "/" ) );

    m_plotOpts.SetOutputDirectory( dirStr );

    m_parent->SetPlotSettings( m_plotOpts );

    CreateFiles();
}
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:20,代码来源:gen_modules_placefile.cpp

示例7: OnCloseWindow

void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/
{
    SetPrintParameters();

    if( m_Config )
    {
        m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust );
        m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust );
        m_Config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
        m_Config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
        m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
        wxString layerKey;
        for( LAYER_NUM layer = FIRST_LAYER; layer < NB_GERBER_LAYERS; ++layer )
        {
            layerKey.Printf( OPTKEY_LAYERBASE, layer );
            m_Config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
        }
    }
    EndModal( 0 );
}
开发者ID:barrem,项目名称:kicad-source-mirror,代码行数:21,代码来源:dialog_print_using_printer.cpp

示例8: OnCloseWindow

void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
{
    SetPrintParameters();

    if( m_config )
    {
        ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_X_FINESCALE_ADJ,
                               s_Parameters.m_XScaleAdjust );
        ConfigBaseWriteDouble( m_config, OPTKEY_PRINT_Y_FINESCALE_ADJ,
                               s_Parameters.m_YScaleAdjust );
        m_config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
        m_config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
        m_config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
        m_config->Write( OPTKEY_PRINT_PAGE_PER_LAYER, s_Parameters.m_OptionPrintPage );
        m_config->Write( OPTKEY_PRINT_PADS_DRILL, (long) s_Parameters.m_DrillShapeOpt );
        wxString layerKey;

        for( unsigned layer = 0; layer < DIM(m_BoxSelectLayer);  ++layer )
        {
            if( !m_BoxSelectLayer[layer] )
                continue;

            layerKey.Printf( OPTKEY_LAYERBASE, layer );
            m_config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
        }
    }
    EndModal( 0 );
}
开发者ID:morio,项目名称:kicad-source-mirror,代码行数:28,代码来源:dialog_print_using_printer.cpp

示例9: Save

void wxFileHistoryBase::Save(wxConfigBase& config)
{
    size_t i;
#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for (i = 0; i < m_fileMaxFiles; i++)
    {
        wxString buf;
        buf.Printf(wxT("file%d"), (int)i+1);
        if (i < m_fileHistory.GetCount())
            config.Write(buf, wxString(m_fileHistory[i]));
        else
            config.Write(buf, wxEmptyString);
    }
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:22,代码来源:filehistorycmn.cpp

示例10: Save

void FileHistory::Save(wxConfigBase & config, const wxString & group)
{
   config.DeleteGroup(group);
   config.SetPath(group);

   // Stored in reverse order
   int n = mHistory.GetCount() - 1;
   for (size_t i = 1; i <= mHistory.GetCount(); i++) {
      config.Write(wxString::Format(wxT("file%02d"), (int)i), mHistory[n--]);
   }

   config.SetPath(wxT(".."));
}
开发者ID:LBoggino,项目名称:audacity,代码行数:13,代码来源:FileHistory.cpp

示例11: SaveFileConfig

void wxSTEditorOptions::SaveFileConfig(wxConfigBase &config)
{
    const wxString oldpath = config.GetPath();
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    config.Write(configPath+wxT("/LastDir"), GetDefaultFilePath());

    config.SetPath(configPath);
    fileHistory->Save(config);
    config.SetPath(oldpath);
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:14,代码来源:steopts.cpp

示例12:

    ~DIALOG_EXPORT_STEP()
    {
        m_config->Write( OPTKEY_STEP_USE_DRILL_ORG, m_cbDrillOrigin->GetValue() );
        m_config->Write( OPTKEY_STEP_USE_AUX_ORG, m_cbAuxOrigin->GetValue() );
        m_config->Write( OPTKEY_STEP_USE_USER_ORG, m_cbUserOrigin->GetValue() );
        m_config->Write( OPTKEY_STEP_NOVIRT, m_cbRemoveVirtual->GetValue() );

        m_config->Write( OPTKEY_STEP_UORG_UNITS, m_STEP_OrgUnitChoice->GetSelection() );
        m_config->Write( OPTKEY_STEP_UORG_X, m_STEP_Xorg->GetValue() );
        m_config->Write( OPTKEY_STEP_UORG_Y, m_STEP_Yorg->GetValue() );
    }
开发者ID:reportingsjr,项目名称:kicad-source-mirror,代码行数:11,代码来源:dialog_export_step.cpp

示例13: GetUnits

 ~DIALOG_EXPORT_3DFILE()
 {
     m_unitsOpt = GetUnits();
     m_copy3DFilesOpt = GetCopyFilesOption();
     m_config->Write( OPTKEY_OUTPUT_UNIT, m_unitsOpt );
     m_config->Write( OPTKEY_3DFILES_OPT, m_copy3DFilesOpt );
     m_config->Write( OPTKEY_USE_RELATIVE_PATHS, m_useRelativePathsOpt );
     m_config->Write( OPTKEY_USE_PLAIN_PCB, m_usePlainPCBOpt );
     m_config->Write( OPTKEY_VRML_REF_UNITS, m_VRML_RefUnitChoice->GetSelection() );
     m_config->Write( OPTKEY_VRML_REF_X, m_VRML_Xref->GetValue() );
     m_config->Write( OPTKEY_VRML_REF_Y, m_VRML_Yref->GetValue() );
 };
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:12,代码来源:dialog_export_vrml.cpp

示例14: TransferDataFromWindow

bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow()
{
    // Init keepout parameters:
    m_zonesettings.SetIsKeepout( true );
    m_zonesettings.SetDoNotAllowTracks( m_cbTracksCtrl->GetValue() );
    m_zonesettings.SetDoNotAllowVias( m_cbViasCtrl->GetValue() );
    m_zonesettings.SetDoNotAllowCopperPour( m_cbCopperPourCtrl->GetValue() );

    // Test for not allowed items: should have at least one item not allowed:
    if( ! m_zonesettings.GetDoNotAllowTracks() &&
        ! m_zonesettings.GetDoNotAllowVias() &&
        ! m_zonesettings.GetDoNotAllowCopperPour() )
    {
        DisplayError( NULL, _("Tracks, vias, and pads are allowed. The keepout will have no effect." ) );
        return false;
    }

    if( m_zonesettings.m_Layers.count() == 0 )
    {
        DisplayError( NULL, _( "No layers selected." ) );
        return false;
    }

    switch( m_OutlineAppearanceCtrl->GetSelection() )
    {
    case 0: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::NO_HATCH;      break;
    case 1: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_EDGE; break;
    case 2: m_zonesettings.m_Zone_HatchingStyle = ZONE_CONTAINER::DIAGONAL_FULL; break;
    }

    if( m_config )
        m_config->Write( ZONE_NET_OUTLINES_STYLE_KEY, (long) m_zonesettings.m_Zone_HatchingStyle );

    m_zonesettings.m_Zone_45_Only = m_cbConstrainCtrl->GetValue();
    m_zonesettings.m_ZonePriority = 0;  // for a keepout, this param is not used.

    *m_ptr = m_zonesettings;
    return true;
}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:39,代码来源:dialog_keepout_area_properties.cpp

示例15: SaveFont

bool wxWindowSettings::SaveFont(wxConfigBase& config, const wxString& windowName, const wxFont& font)
{
    if (!font.Ok())
        return FALSE;

    wxString pathBase(wxT("/Fonts/"));
    pathBase += windowName;
    pathBase += wxT("/");

    config.Write(pathBase + wxT("PointSize"), (long) font.GetPointSize());
    config.Write(pathBase + wxT("Family"), (long) font.GetFamily());
    config.Write(pathBase + wxT("Style"), (long) font.GetStyle());
    config.Write(pathBase + wxT("Weight"), (long) font.GetWeight());
    config.Write(pathBase + wxT("Underlined"), (long) font.GetUnderlined());
    config.Write(pathBase + wxT("FaceName"), font.GetFaceName());

    return TRUE;    
}
开发者ID:Joel397,项目名称:Ongoing_work_files,代码行数:18,代码来源:ecutils.cpp


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