Changeset 6652ac66a4 in tspsg for src/settingsdialog.cpp


Ignore:
Timestamp:
Sep 13, 2012, 12:38:53 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
5f8c8ea92c
Parents:
83e07f7194
git-author:
Oleksii Serdiuk <contacts@…> (09/13/12 12:38:53)
git-committer:
Oleksii Serdiuk <contacts@…> (09/13/12 13:43:55)
Message:

Added hidden Output/GraphWidth? setting in tspsg.ini to Settings Dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/settingsdialog.cpp

    r83e07f7194 r6652ac66a4  
    8080    hbox->addSpacing(10);
    8181    hbox->addWidget(cbHQGraph);
    82     box->insertLayout(box->indexOf(cbGenerateGraph) + 2, hbox);
     82    box->insertLayout(box->indexOf(cbGenerateGraph) + 3, hbox);
    8383    connect(cbGenerateGraph, SIGNAL(toggled(bool)), cbHQGraph, SLOT(setEnabled(bool)));
    8484#endif
     
    268268    cbGenerateGraph->setChecked(settings->value("GenerateGraph", DEF_GENERATE_GRAPH).toBool());
    269269
    270 #ifndef QT_NO_PRINTER
    271     cbHQGraph->setEnabled(cbGenerateGraph->isChecked());
    272     cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH).toBool());
    273 #endif
     270    spinGraphWidth->setEnabled(cbGenerateGraph->isChecked());
     271    spinGraphWidth->setValue(settings->value("GraphWidth", DEF_GRAPH_WIDTH).toDouble());
    274272
    275273#if !defined(NOSVG) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0))
     
    291289    labelGraphImageFormat->setEnabled(cbGenerateGraph->isChecked());
    292290    comboGraphImageFormat->setEnabled(cbGenerateGraph->isChecked());
     291
     292#ifndef QT_NO_PRINTER
     293    cbHQGraph->setEnabled(cbGenerateGraph->isChecked());
     294    cbHQGraph->setChecked(settings->value("HQGraph", DEF_HQ_GRAPH).toBool());
     295#endif
     296
     297    labelGraphWidth->setEnabled(cbGenerateGraph->isChecked());
     298    cbEmbedGraphIntoHTML->setEnabled(cbGenerateGraph->isChecked());
    293299    cbEmbedGraphIntoHTML->setChecked(settings->value("EmbedGraphIntoHTML", DEF_EMBED_GRAPH_INTO_HTML).toBool());
    294     cbEmbedGraphIntoHTML->setEnabled(cbGenerateGraph->isChecked());
    295300
    296301    cbShowMatrix->setChecked(settings->value("ShowMatrix", DEF_SHOW_MATRIX).toBool());
     
    406411    settings->setValue("GenerateGraph", cbGenerateGraph->isChecked());
    407412    if (cbGenerateGraph->isChecked()) {
    408 #ifndef QT_NO_PRINTER
    409         settings->setValue("HQGraph", cbHQGraph->isChecked());
    410 #endif
     413        settings->setValue("GraphWidth", spinGraphWidth->value());
    411414        if (cbGenerateGraph->isChecked()) {
    412415            if (comboGraphImageFormat->currentIndex() >= 0)
     
    415418                settings->setValue("GraphImageFormat", DEF_GRAPH_IMAGE_FORMAT);
    416419        }
     420#ifndef QT_NO_PRINTER
     421        settings->setValue("HQGraph", cbHQGraph->isChecked());
     422#endif
    417423        settings->setValue("EmbedGraphIntoHTML", cbEmbedGraphIntoHTML->isChecked());
    418424    }
Note: See TracChangeset for help on using the changeset viewer.