Changeset 1757eb594b in tspsg for src/settingsdialog.cpp
- Timestamp:
- Jan 12, 2010, 3:11:24 PM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- fcd8c1e4c1
- Parents:
- 64f288c0f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/settingsdialog.cpp
r64f288c0f8 r1757eb594b 1 1 /* 2 2 * TSPSG: TSP Solver and Generator 3 * Copyright (C) 2007-20 09Lёppa <contacts[at]oleksii[dot]name>3 * Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name> 4 4 * 5 5 * $Id$ … … 34 34 { 35 35 setupUi(this); 36 // Laying out elements 37 /* layoutCitiesLimit = new QHBoxLayout(); 38 layoutCitiesLimit->setMargin(0); 39 layoutCitiesLimit->setSpacing(0); 40 layoutCitiesLimit->addSpacing(10); 41 layoutCitiesLimit->addWidget(cbCitiesLimit); 42 layoutCitiesLimit->addWidget(spinCitiesLimit); 43 layoutCitiesLimit->addStretch(); 44 */ 36 45 37 buttonBox->button(QDialogButtonBox::Save)->setIcon(QIcon(":/images/icons/button_ok.png")); 46 buttonBox->button(QDialogButtonBox::Save)->setStatusTip(tr Utf8("Save new preferences"));38 buttonBox->button(QDialogButtonBox::Save)->setStatusTip(tr("Save new preferences")); 47 39 buttonBox->button(QDialogButtonBox::Save)->setCursor(QCursor(Qt::PointingHandCursor)); 48 40 buttonBox->button(QDialogButtonBox::Cancel)->setIcon(QIcon(":/images/icons/button_cancel.png")); 49 buttonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr Utf8("Close without saving preferences"));41 buttonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Close without saving preferences")); 50 42 buttonBox->button(QDialogButtonBox::Cancel)->setCursor(QCursor(Qt::PointingHandCursor)); 51 43 … … 80 72 cbSaveState->setObjectName("cbSaveState"); 81 73 #ifndef QT_NO_STATUSTIP 82 cbSaveState->setStatusTip(tr Utf8("Restore main window state and position on application restart"));74 cbSaveState->setStatusTip(tr("Restore main window state and position on application restart")); 83 75 #endif // QT_NO_STATUSTIP 84 cbSaveState->setText(tr Utf8("Save main window state and position"));76 cbSaveState->setText(tr("Save main window state and position")); 85 77 cbSaveState->setCursor(QCursor(Qt::PointingHandCursor)); 86 78 … … 105 97 labelHint->setWordWrap(true); 106 98 #ifndef QT_NO_STATUSTIP 107 labelHint->setStatusTip(tr Utf8("Hover mouse pointer over dialog elements to get additional help"));99 labelHint->setStatusTip(tr("Hover mouse pointer over dialog elements to get additional help")); 108 100 #endif // QT_NO_STATUSTIP 109 101 … … 121 113 122 114 vbox1 = static_cast<QVBoxLayout *>(tabGeneral->layout()); 123 vbox1->insertWidget(vbox 2->indexOf(cbUseNativeDialogs) + 1, cbSaveState);115 vbox1->insertWidget(vbox1->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 124 116 125 117 // Bottom part (with grey bg) … … 152 144 settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", this); 153 145 154 spinRandMin->setMaximum(MAX_RAND_VALUE);155 spinRandMin->setValue(settings->value("MinCost",DEF_RAND_MIN).toInt());156 spinRandMax->setMaximum(MAX_RAND_VALUE);157 spinRandMax->setValue(settings->value("MaxCost",DEF_RAND_MAX).toInt());158 cbFractionalRandom->setChecked(settings->value("FractionalRandom", DEF_FRACTIONAL_RANDOM).toBool());159 146 cbAutosize->setChecked(settings->value("Autosize", DEF_AUTOSIZE).toBool()); 160 147 cbUseNativeDialogs->setChecked(settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool()); … … 162 149 cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool()); 163 150 #endif // Q_OS_WINCE 151 152 settings->beginGroup("Task"); 153 spinFractionalAccuracy->setValue(settings->value("FractionalAccuracy", DEF_FRACTIONAL_ACCURACY).toInt()); 154 spinRandMin->setMaximum(MAX_RAND_VALUE); 155 spinRandMin->setValue(settings->value("RandMin",DEF_RAND_MIN).toInt()); 156 spinRandMax->setMaximum(MAX_RAND_VALUE); 157 spinRandMax->setValue(settings->value("RandMax",DEF_RAND_MAX).toInt()); 158 cbFractionalRandom->setChecked(settings->value("FractionalRandom", DEF_FRACTIONAL_RANDOM).toBool()); 159 settings->endGroup(); 164 160 165 161 settings->beginGroup("Output"); … … 206 202 settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked()); 207 203 settings->setValue("Autosize", cbAutosize->isChecked()); 208 settings->setValue("MinCost", spinRandMin->value()); 209 settings->setValue("MaxCost", spinRandMax->value()); 204 205 settings->beginGroup("Task"); 206 settings->setValue("FractionalAccuracy", spinFractionalAccuracy->value()); 207 settings->setValue("RandMin", spinRandMin->value()); 208 settings->setValue("RandMax", spinRandMax->value()); 210 209 settings->setValue("FractionalRandom", cbFractionalRandom->isChecked()); 210 settings->endGroup(); 211 211 212 212 settings->beginGroup("Output");
Note: See TracChangeset
for help on using the changeset viewer.