Changeset 162 in tspsg-svn for trunk/src/settingsdialog.cpp


Ignore:
Timestamp:
Apr 14, 2011, 9:30:23 PM (14 years ago)
Author:
laleppa
Message:
  • NEW: Solution graph size can now be controlled using Output/GraphWidth? setting in tspsg.ini (see ticket:8). Value is in centimeters.
  • NEW: Support for embedded base64 encoded images when saving solution as HTML (closed ticket:4).
  • Renamed Output/ShowGraph? setting to Output/GenerateGraph?.
  • Made some other small tweaks and fixes.
  • FIX: Solution graph is still exported to HTML when graph generation is disabled (fixed bug:9).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/settingsdialog.cpp

    r151 r162  
    7676    hbox->addSpacing(10);
    7777    hbox->addWidget(cbHQGraph);
    78     box->insertLayout(box->indexOf(cbShowGraph) + 1, hbox);
    79     connect(cbShowGraph, 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)));
    8080#endif
    8181
     
    147147        cbUseTranslucency->setObjectName("cbUseTranslucency");
    148148#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"));
    150150#endif // QT_NO_STATUSTIP
    151151        cbUseTranslucency->setText(tr("Use translucency effects"));
     
    174174    labelHint->setObjectName("labelHint");
    175175    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));
    179178    labelHint->setTextFormat(Qt::PlainText);
    180179//      labelHint->setAlignment(Qt::AlignLeft | Qt::AlignTop);
     
    260259
    261260    settings->beginGroup("Output");
    262     cbShowGraph->setChecked(settings->value("ShowGraph", DEF_SHOW_GRAPH).toBool());
     261    cbGenerateGraph->setChecked(settings->value("GenerateGraph", DEF_GENERATE_GRAPH).toBool());
    263262
    264263#ifndef QT_NO_PRINTER
    265     cbHQGraph->setEnabled(cbShowGraph->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());
    267266#endif
    268267
     
    283282    if (comboGraphImageFormat->currentIndex() < 0)
    284283        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());
    287288
    288289    cbShowMatrix->setChecked(settings->value("ShowMatrix", DEF_SHOW_MATRIX).toBool());
     
    326327 * \brief Indicates whether and how the translucency setting was changed
    327328 * \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>.
    329330 * \retval  1 the translucency was \em enabled.
    330331 */
     
    381382
    382383    settings->beginGroup("Output");
    383     settings->setValue("ShowGraph", cbShowGraph->isChecked());
     384    settings->setValue("GenerateGraph", cbGenerateGraph->isChecked());
     385    if (cbGenerateGraph->isChecked()) {
    384386#ifndef QT_NO_PRINTER
    385     settings->setValue("HQGraph", cbShowGraph->isChecked() && cbHQGraph->isChecked());
     387        settings->setValue("HQGraph", cbHQGraph->isChecked());
    386388#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());
    392396    }
    393397    settings->setValue("ShowMatrix", cbShowMatrix->isChecked());
Note: See TracChangeset for help on using the changeset viewer.