Changeset 139 in tspsg-svn for trunk/src/settingsdialog.cpp
- Timestamp:
- Sep 29, 2010, 11:21:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/settingsdialog.cpp
r135 r139 72 72 connect(cbShowGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool))); 73 73 #endif 74 75 if (hasUpdater()) { 76 cbCheck4Updates = new QCheckBox(bgWhite); 77 cbCheck4Updates->setObjectName("cbCheck4Updates"); 78 #ifndef QT_NO_STATUSTIP 79 cbCheck4Updates->setStatusTip(tr("Automatically check for updates at the given interval")); 80 #endif // QT_NO_STATUSTIP 81 cbCheck4Updates->setText(tr("Check for updates every")); 82 cbCheck4Updates->setCursor(QCursor(Qt::PointingHandCursor)); 83 84 spinUpdateCheckInterval = new QSpinBox(bgWhite); 85 spinUpdateCheckInterval->setObjectName("spinUpdateCheckInterval"); 86 #ifndef QT_NO_STATUSTIP 87 spinUpdateCheckInterval->setStatusTip(tr("Minimal interval at which to check for updates")); 88 #endif // QT_NO_STATUSTIP 89 spinUpdateCheckInterval->setSuffix(tr(" days", "Don't forget a space at the beginning!")); 90 spinUpdateCheckInterval->setRange(1, 365); 91 spinUpdateCheckInterval->setCursor(QCursor(Qt::PointingHandCursor)); 92 93 connect(cbCheck4Updates, SIGNAL(toggled(bool)), spinUpdateCheckInterval, SLOT(setEnabled(bool))); 94 95 box = static_cast<QBoxLayout *>(tabGeneral->layout()); 96 hbox1 = new QHBoxLayout(); 97 hbox1->setSpacing(0); 98 hbox1->addWidget(cbCheck4Updates); 99 hbox1->addWidget(spinUpdateCheckInterval); 100 hbox1->addStretch(); 101 box->insertLayout(box->indexOf(cbUseNativeDialogs) + 1, hbox1); 102 } else 103 cbCheck4Updates = NULL; 74 104 75 105 #ifdef HANDHELD … … 209 239 cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool()); 210 240 #endif // HANDHELD 241 if (cbCheck4Updates != NULL) { 242 settings->beginGroup("Check4Updates"); 243 cbCheck4Updates->setChecked(settings->value("Enabled", DEF_CHECK_FOR_UPDATES).toBool()); 244 spinUpdateCheckInterval->setValue(settings->value("Interval", DEF_UPDATE_CHECK_INTERVAL).toInt()); 245 settings->endGroup(); 246 spinUpdateCheckInterval->setEnabled(cbCheck4Updates->isChecked()); 247 } 211 248 212 249 settings->beginGroup("Task"); … … 231 268 comboGraphImageFormat->addItem("svg"); 232 269 #endif // NOSVG && QT_VERSION >= 0x040500 233 // We create awhitelist of formats, supported by the most popular web browsers according to234 // http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support235 // + TIFF format (there are plugins to support it).270 // We create whitelist of formats, supported by the most popular web browsers according to 271 // http://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support 272 // + TIFF format (there are plugins to support it). 236 273 QStringList whitelist; 237 274 whitelist << "bmp" << "jpeg" << "png" << "tiff" << "xbm"; … … 327 364 settings->setValue("SavePos", cbSaveState->isChecked()); 328 365 #endif // HANDHELD 366 if (cbCheck4Updates != NULL) { 367 settings->beginGroup("Check4Updates"); 368 settings->setValue("Enabled", cbCheck4Updates->isChecked()); 369 if (cbCheck4Updates->isChecked()) 370 settings->setValue("Interval", spinUpdateCheckInterval->value()); 371 settings->endGroup(); 372 } 329 373 330 374 settings->beginGroup("Task");
Note: See TracChangeset
for help on using the changeset viewer.