Changeset 162 in tspsg-svn for trunk/src/settingsdialog.cpp
- Timestamp:
- Apr 14, 2011, 9:30:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/settingsdialog.cpp
r151 r162 76 76 hbox->addSpacing(10); 77 77 hbox->addWidget(cbHQGraph); 78 box->insertLayout(box->indexOf(cb ShowGraph) + 1, hbox);79 connect(cb ShowGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool)));78 box->insertLayout(box->indexOf(cbGenerateGraph) + 2, hbox); 79 connect(cbGenerateGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool))); 80 80 #endif 81 81 … … 147 147 cbUseTranslucency->setObjectName("cbUseTranslucency"); 148 148 #ifndef QT_NO_STATUSTIP 149 cbUseTranslucency->setStatusTip(tr(" Use translucent effect on the Main Window under Windows Vista and 7"));149 cbUseTranslucency->setStatusTip(tr("Make Main Window background translucent")); 150 150 #endif // QT_NO_STATUSTIP 151 151 cbUseTranslucency->setText(tr("Use translucency effects")); … … 174 174 labelHint->setObjectName("labelHint"); 175 175 labelHint->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); 176 // labelHint->setMinimumSize(QSize(190,28)); 177 labelHint->setMinimumSize(QSize(0,28)); 178 labelHint->setMaximumSize(QSize(QWIDGETSIZE_MAX,28)); 176 labelHint->setMinimumSize(QSize(250, 28)); 177 labelHint->setMaximumSize(QSize(QWIDGETSIZE_MAX, 28)); 179 178 labelHint->setTextFormat(Qt::PlainText); 180 179 // labelHint->setAlignment(Qt::AlignLeft | Qt::AlignTop); … … 260 259 261 260 settings->beginGroup("Output"); 262 cb ShowGraph->setChecked(settings->value("ShowGraph", DEF_SHOW_GRAPH).toBool());261 cbGenerateGraph->setChecked(settings->value("GenerateGraph", DEF_GENERATE_GRAPH).toBool()); 263 262 264 263 #ifndef QT_NO_PRINTER 265 cbHQGraph->setEnabled(cb ShowGraph->isChecked());266 cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH && cbShowGraph->isChecked()).toBool());264 cbHQGraph->setEnabled(cbGenerateGraph->isChecked()); 265 cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH).toBool()); 267 266 #endif 268 267 … … 283 282 if (comboGraphImageFormat->currentIndex() < 0) 284 283 comboGraphImageFormat->setCurrentIndex(comboGraphImageFormat->findText(DEF_GRAPH_IMAGE_FORMAT, Qt::MatchFixedString)); 285 labelGraphImageFormat->setEnabled(cbShowGraph->isChecked()); 286 comboGraphImageFormat->setEnabled(cbShowGraph->isChecked()); 284 labelGraphImageFormat->setEnabled(cbGenerateGraph->isChecked()); 285 comboGraphImageFormat->setEnabled(cbGenerateGraph->isChecked()); 286 cbEmbedGraphIntoHTML->setChecked(settings->value("EmbedGraphIntoHTML", DEF_EMBED_GRAPH_INTO_HTML).toBool()); 287 cbEmbedGraphIntoHTML->setEnabled(cbGenerateGraph->isChecked()); 287 288 288 289 cbShowMatrix->setChecked(settings->value("ShowMatrix", DEF_SHOW_MATRIX).toBool()); … … 326 327 * \brief Indicates whether and how the translucency setting was changed 327 328 * \retval -1 the translucency was \em disabled. 328 * \retval 0 the translucency was <em>not changed</em>.329 * \retval 0 the translucency <em>didn't change</em>. 329 330 * \retval 1 the translucency was \em enabled. 330 331 */ … … 381 382 382 383 settings->beginGroup("Output"); 383 settings->setValue("ShowGraph", cbShowGraph->isChecked()); 384 settings->setValue("GenerateGraph", cbGenerateGraph->isChecked()); 385 if (cbGenerateGraph->isChecked()) { 384 386 #ifndef QT_NO_PRINTER 385 settings->setValue("HQGraph", cbShowGraph->isChecked() &&cbHQGraph->isChecked());387 settings->setValue("HQGraph", cbHQGraph->isChecked()); 386 388 #endif 387 if (cbShowGraph->isChecked()) { 388 if (comboGraphImageFormat->currentIndex() >= 0) 389 settings->setValue("GraphImageFormat", comboGraphImageFormat->currentText()); 390 else 391 settings->setValue("GraphImageFormat", DEF_GRAPH_IMAGE_FORMAT); 389 if (cbGenerateGraph->isChecked()) { 390 if (comboGraphImageFormat->currentIndex() >= 0) 391 settings->setValue("GraphImageFormat", comboGraphImageFormat->currentText()); 392 else 393 settings->setValue("GraphImageFormat", DEF_GRAPH_IMAGE_FORMAT); 394 } 395 settings->setValue("EmbedGraphIntoHTML", cbEmbedGraphIntoHTML->isChecked()); 392 396 } 393 397 settings->setValue("ShowMatrix", cbShowMatrix->isChecked());
Note: See TracChangeset
for help on using the changeset viewer.