Example #1
0
void SyncPreferences::saveValues() {
    global.settings->beginGroup("Sync");
    global.settings->setValue("syncAutomatically", syncAutomatically->isChecked());
    global.settings->setValue("syncOnShutdown", syncOnShutdown->isChecked());
    global.settings->setValue("syncOnStartup", syncOnStartup->isChecked());
    global.settings->setValue("enableNotification", enableSyncNotifications->isChecked());
    global.settings->setValue("syncInterval", getSyncInterval());
    global.settings->setValue("showGoodSyncMessagesInTray", showGoodSyncMessagesInTray ->isChecked());
    global.settings->setValue("apiRateLimitAutoRestart", apiRateRestart ->isChecked());
    global.settings->endGroup();

    global.showGoodSyncMessagesInTray = showGoodSyncMessagesInTray->isChecked();

    global.setProxyEnabled(enableProxy->isChecked());
    global.setSocks5Enabled(enableSocks5->isChecked());
    global.setProxyHost(host->text().trimmed());
    global.setProxyPort(port->text().toInt());
    global.setProxyUserid(userId->text().trimmed());
    global.setProxyPassword(password->text().trimmed());
}