本文整理汇总了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);
}
示例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();
}
示例3: GetAreaParaSetupUiData
void VelParaSetupHandler::GetAreaParaSetupUiData(AreaPara ¶)
{
AppSettings setting = ConfigManager::GetInstance()->AppSetting();
para.mine_area = setting.mine_area();
para.search_area = setting.search_area();
para.grid_step = setting.cell_step();
}
示例4: hostSaving
void AppSettingsTest::hostSaving()
{
AppSettings appSettings;
QFETCH(QString, input);
QFETCH(QString, output);
appSettings.setHost(input);
QString res = appSettings.host();
QVERIFY(res == output);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}