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


C++ AppSettings类代码示例

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


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

示例1: initSettings

void MainWindow::initSettings()
{
    AppSettings settings;
    this->setGeometry(settings.geometry());
    if (settings.isMaximized())
        this->setWindowState(this->windowState() | Qt::WindowMaximized);
}
开发者ID:spoosanthiram,项目名称:Thanuva,代码行数:7,代码来源:MainWindow.cpp

示例2: GetEventSVelRange

void CalculateVelocityHandler::GetEventSVelRange(float &start, float &end, float &step)
{
    AppSettings setting = ConfigManager::GetInstance()->AppSetting();
    start = setting.s_start();
    end = setting.s_end();
    step = setting.s_step();
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:7,代码来源:calculatevelocityhandler.cpp

示例3: GetAreaParaSetupUiData

void VelParaSetupHandler::GetAreaParaSetupUiData(AreaPara &para)
{
    AppSettings setting = ConfigManager::GetInstance()->AppSetting();

    para.mine_area = setting.mine_area();
    para.search_area = setting.search_area();
    para.grid_step = setting.cell_step();
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:8,代码来源:velparasetuphandler.cpp

示例4: hostSaving

void AppSettingsTest::hostSaving()
{
    AppSettings appSettings;
    QFETCH(QString, input);
    QFETCH(QString, output);

    appSettings.setHost(input);
    QString res = appSettings.host();
    QVERIFY(res == output);
}
开发者ID:fralik,项目名称:ZmKiosk,代码行数:10,代码来源:tst_appsettingstest.cpp

示例5: LoadSettings

void SettingsDialog::LoadSettings(AppSettings &s /* = settings */)
{
	showConsoleCheck->SetValue(s.GetShowConsole());
	autoCloseConsoleCheck->SetValue(s.GetAutoCloseConsole());

	autoUpdateCheck->SetValue(s.GetAutoUpdate());

	instDirTextBox->SetValue(s.GetInstDir().GetFullPath());

	minMemorySpin->SetValue(s.GetMinMemAlloc());
	maxMemorySpin->SetValue(s.GetMaxMemAlloc());

	javaPathTextBox->SetValue(s.GetJavaPath());
	jvmArgsTextBox->SetValue(s.GetJvmArgs());
	
	switch (s.GetGUIMode())
	{
	case GUI_Simple:
		guiStyleDropDown->SetValue(guiModeSimple);
		break;
		
	case GUI_Default:
		guiStyleDropDown->SetValue(guiModeDefault);
		break;
	}
}
开发者ID:bartbes,项目名称:MultiMC4,代码行数:26,代码来源:settingsdialog.cpp

示例6: showEvent

void LoginSettingWidget::showEvent(QShowEvent *event)
{
    AppSettings settings;
    settings.beginGroup(QString(APP_PARAM_GROUP_TARGET));
    dest_addr_edit->setText(settings.value(QString(APP_PARAM_ADDR), QString(DEFAULT_TARGET_ADDR)).toString());
    dest_port_edit->setText(settings.value(QString(APP_PARAM_PORT), QString(DEFAULT_TARGET_PORT)).toString());
    settings.endGroup();

    ok_button->setFocus();
    QWidget::showEvent(event);
}
开发者ID:goodfuture,项目名称:qt-rkconfigtool,代码行数:11,代码来源:loginsettingwidget.cpp

示例7: EditorPreferencesBase

PythonEditorPreferencesPage::PythonEditorPreferencesPage(wxWindow *parent,
                                                         AppSettings& appSettings)
    : EditorPreferencesBase(parent, appSettings, EditorId::PythonEditorId,
        appSettings.editorSettings().pythonSettings()),
    m_newSettings(appSettings.editorSettings().pythonSettings())
{
    wxSizer* fontInfoSizer = PreferencesDialogUtilities::createFontSettingsSizer(m_overrideThemeCheckBox,
        m_fontFaceName, m_fontSize, m_fontButton);

    wxSizer* topSizer = GetSizer();
    topSizer->Add(fontInfoSizer, 0, wxEXPAND | wxALL, 10);
}
开发者ID:CodeSmithyIDE,项目名称:CodeSmithy,代码行数:12,代码来源:PythonEditorPreferencesPage.cpp

示例8: PRGAPI

void HotKeyManager::Init()//HWND hWndTarget)
{
	PrgAPI* pAPI = PRGAPI();
	AppSettings* appSettings = pAPI->GetAppSettings();
	INT value = 0;
	m_hWnd = NULL;//hWndTarget;

	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyPlay, value, 0);
	SetHotKey(HK_Play, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyStop, value, 0);
	SetHotKey(HK_Stop, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyPrev, value, 0);
	SetHotKey(HK_Prev, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyNext, value, 0);
	SetHotKey(HK_Next, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyMiniPlayer, value, 0);
	SetHotKey(HK_ToggleMiniPlayer, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyTooltip, value, 0);
	SetHotKey(HK_Tooltip, HIWORD(value), LOWORD(value));
	appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyQuickSearch, value, 0);
	SetHotKey(HK_QuickSearch, HIWORD(value), LOWORD(value));


	EnableMultimediaHotKeys(pAPI->GetOption(OPT_GEN_MultimediaKeysActive) == 1);

}
开发者ID:KurzedMetal,项目名称:Jaangle,代码行数:26,代码来源:HotKeyManager.cpp

示例9: showMsg

void LoginSettingWidget::onOkButtonClicked()
{
    QString ip_addr = dest_addr_edit->text();
    QString port = dest_port_edit->text();

    if(ip_addr.isEmpty() || port.isEmpty()) {
        emit showMsg(Util::EmptyTargetAddrOrPortMsg);
    } else {
        AppSettings settings;
        settings.beginGroup(QString(APP_PARAM_GROUP_TARGET));
        settings.setValue(QString(APP_PARAM_ADDR), ip_addr);
        settings.setValue(QString(APP_PARAM_PORT), port);
        settings.endGroup();
        emit showLogin();
    }
}
开发者ID:goodfuture,项目名称:qt-rkconfigtool,代码行数:16,代码来源:loginsettingwidget.cpp

示例10: GetChannelSVelRange

bool CalculateVelocityHandler::GetChannelSVelRange(float &start, float &end, float &step)
{
    AppSettings setting = ConfigManager::GetInstance()->AppSetting();

    float p_vel;
    float s_vel;

    if (!GetEventAdjustVel(p_vel, s_vel))
    {
        return false;
    }
    start = s_vel * (100 + setting.minus_per()) / 100;
    end = s_vel * (100 + setting.plus_per()) / 100;
    step = setting.s_step();

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:17,代码来源:calculatevelocityhandler.cpp

示例11: StationAdjust

bool CalculateVelocityHandler::StationAdjust()
{
    AppSettings setting = ConfigManager::GetInstance()->AppSetting();
    switch (setting.mode())
    {
    case 0:
        return StationAdjustModeP(selected_event_);
    case 1:
        return StationAdjustModeS(selected_event_);
    case 2:
        return StationAdjustModePS(selected_event_);
    default:
        return false;
    }

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:17,代码来源:calculatevelocityhandler.cpp

示例12: loadSettings

//!
//! @param settings - Object to load settings from
//!
void AdvancedPanel::loadSettings(const AppSettings &settings) {

   print("AdvancedPanel::loadSettings()\n");

//   Init();

   bdmOptions.powerOffDuration         = settings.getValue(powerOffDurationKey,        bdmOptions.powerOffDuration);
   bdmOptions.powerOnRecoveryInterval  = settings.getValue(powerOnRecoveryIntervalKey, bdmOptions.powerOnRecoveryInterval);
   bdmOptions.resetDuration            = settings.getValue(resetDurationKey,           bdmOptions.resetDuration);
   bdmOptions.resetReleaseInterval     = settings.getValue(resetReleaseIntervalKey,    bdmOptions.resetReleaseInterval);
   bdmOptions.resetRecoveryInterval    = settings.getValue(resetRecoveryIntervalKey,   bdmOptions.resetRecoveryInterval);

#if (TARGET==CFV1) || (TARGET==ARM) || (TARGET==ARM_SWD)
   int eepromSize = settings.getValue(eeepromSizeKey,             0);
   eeepromSizeChoice = findEeepromSizeIndex(eepromSize);
   if (eeepromSizeChoice == 0) {
      flexNvmPartitionIndex = 0;
   }
   else {
      int partitionSize = settings.getValue(flexNvmPartitionSizeKey,        0);
      flexNvmPartitionIndex = findPartitionControlIndex(partitionSize);
   }
#endif
   TransferDataToWindow();
}
开发者ID:keendog,项目名称:usbdm-eclipse-makefiles-build,代码行数:28,代码来源:AdvancedPanel.cpp

示例13: LOG

void MainWindow::closeEvent(QCloseEvent* closeEvent)
{
    if (m_scene && !this->saveChanges()) {
        closeEvent->ignore();
        return;
    }

    LOG(INFO) << "Saving settings while closing MainWindow.";

    AppSettings settings;

    if (!this->isMaximized())
        settings.setGeometry(this->geometry());

    settings.setIsMaximized(this->isMaximized());

    closeEvent->accept();
}
开发者ID:spoosanthiram,项目名称:Thanuva,代码行数:18,代码来源:MainWindow.cpp

示例14: main

int main(int argc, char* argv[])
{
#if QT_VERSION >= 0x050600
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif

    QApplication app(argc, argv);

    // Call this to force settings initialization before the application
    // fully launches.
    //
    AppSettings* appSettings = AppSettings::getInstance();

    // Translate application based on locale.
    QTranslator translator;
    bool ok = translator.load
    (
        QString("ghostwriter_") + appSettings->getLocale(),
        appSettings->getTranslationsPath()
    );

    if (!ok)
    {
        translator.load
        (
            "ghostwriter_en",
            appSettings->getTranslationsPath()
        );
    }

    app.installTranslator(&translator);

    QString filePath = QString();

    if (argc > 1)
    {
        filePath = app.arguments().at(1);
    }

    MainWindow window(filePath);

    window.show();
    return app.exec();
}
开发者ID:modulexcite,项目名称:ghostwriter,代码行数:44,代码来源:AppMain.cpp

示例15: GetMagFilterBlast

bool MUiDataAdapter::GetMagFilterBlast(EventInfoList &list)
{
    if (!GetNoFilterBlast(list))
    {
        return false;
    }

    AppSettings setting = ConfigManager::GetInstance()->AppSetting();

    for (int i = list.count() - 1 ; i >=0; i--)
    {
        if (list.at(i)->magnitude < setting.filter_all_event_magnitude())
        {
            list.removeAt(i);
        }
    }

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:19,代码来源:muidataadapter.cpp


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