Changeset e26679937d in tspsg for src/settingsdialog.cpp
- Timestamp:
- Sep 1, 2010, 8:31:16 PM (14 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- ac76a6a753
- Parents:
- 672e522ba2
- git-author:
- Oleksii Serdiuk <contacts@…> (09/01/10 20:31:16)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:45:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/settingsdialog.cpp
r672e522ba2 re26679937d 55 55 p.setColor(QPalette::Window, p.color(QPalette::Text)); 56 56 lineHorizontal->setPalette(p); 57 58 #ifndef QT_NO_PRINTER 59 cbHQGraph = new QCheckBox(bgWhite); 60 cbHQGraph->setObjectName("cbHQGraph"); 61 #ifndef QT_NO_STATUSTIP 62 cbHQGraph->setStatusTip(tr("Higher quality graph looks much better when printing but uglier on the screen")); 63 #endif // QT_NO_STATUSTIP 64 cbHQGraph->setText(tr("Draw solution graph in higher quality")); 65 cbHQGraph->setCursor(QCursor(Qt::PointingHandCursor)); 66 67 QBoxLayout *box = static_cast<QBoxLayout *>(tabOutput->layout()); 68 QHBoxLayout *hbox1 = new QHBoxLayout(); 69 hbox1->addSpacing(10); 70 hbox1->addWidget(cbHQGraph); 71 box->insertLayout(box->indexOf(cbShowGraph) + 1, hbox1); 72 connect(cbShowGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool))); 73 #endif 57 74 58 75 #ifdef HANDHELD … … 87 104 #else // HANDHELD 88 105 // Layout helper elements 89 QVBoxLayout *vbox 1, *vbox2;90 QHBoxLayout *hbox 1;106 QVBoxLayout *vbox; 107 QHBoxLayout *hbox; 91 108 92 109 #ifdef Q_OS_WIN32 … … 139 156 140 157 // Top line 141 hbox1 = new QHBoxLayout(); 142 hbox1->addWidget(imgIcon); 143 hbox1->addWidget(lineVertical); 144 hbox1->addWidget(bgWhite); 145 146 vbox1 = static_cast<QVBoxLayout *>(tabGeneral->layout()); 147 vbox1->insertWidget(vbox1->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 158 hbox = new QHBoxLayout(); 159 hbox->addWidget(imgIcon); 160 hbox->addWidget(lineVertical); 161 hbox->addWidget(bgWhite); 162 163 #ifdef QT_NO_PRINTER 164 QBoxLayout *box; 165 #endif 166 box = static_cast<QBoxLayout *>(tabGeneral->layout()); 167 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 148 168 #ifdef Q_OS_WIN32 149 169 if (QtWin::isCompositionEnabled()) 150 vbox1->insertWidget(vbox1->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency);170 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency); 151 171 #endif // Q_OS_WIN32 152 172 … … 155 175 156 176 // Central layout 157 vbox 2= new QVBoxLayout(this);158 vbox 2->setMargin(0);159 vbox 2->setSpacing(0);160 vbox 2->addLayout(hbox1);161 vbox 2->addWidget(bgGrey);162 setLayout(vbox 2);177 vbox = new QVBoxLayout(this); 178 vbox->setMargin(0); 179 vbox->setSpacing(0); 180 vbox->addLayout(hbox); 181 vbox->addWidget(bgGrey); 182 setLayout(vbox); 163 183 #endif // HANDHELD 164 184 … … 167 187 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int))); 168 188 #endif // Q_OS_WINCE_WM 169 connect(spinRandMin, SIGNAL(valueChanged(int)),this,SLOT(spinRandMinValueChanged(int)));170 connect(buttonFont, SIGNAL(clicked()),this,SLOT(buttonFontClicked()));171 connect(buttonColor, SIGNAL(clicked()),this,SLOT(buttonColorClicked()));189 connect(spinRandMin, SIGNAL(valueChanged(int)), SLOT(spinRandMinValueChanged(int))); 190 connect(buttonFont, SIGNAL(clicked()), SLOT(buttonFontClicked())); 191 connect(buttonColor, SIGNAL(clicked()), SLOT(buttonColorClicked())); 172 192 setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); 173 193 #ifndef HANDHELD … … 201 221 settings->beginGroup("Output"); 202 222 cbShowGraph->setChecked(settings->value("ShowGraph", DEF_SHOW_GRAPH).toBool()); 223 224 #ifndef QT_NO_PRINTER 225 cbHQGraph->setEnabled(cbShowGraph->isChecked()); 226 cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH && cbShowGraph->isChecked()).toBool()); 227 #endif 203 228 204 229 #if !defined(NOSVG) && (QT_VERSION >= 0x040500) … … 311 336 settings->beginGroup("Output"); 312 337 settings->setValue("ShowGraph", cbShowGraph->isChecked()); 338 #ifndef QT_NO_PRINTER 339 settings->setValue("HQGraph", cbShowGraph->isChecked() && cbHQGraph->isChecked()); 340 #endif 313 341 if (cbShowGraph->isChecked()) { 314 342 if (comboGraphImageFormat->currentIndex() >= 0)
Note: See TracChangeset
for help on using the changeset viewer.