Changeset f1fb54b9f7 in tspsg for src/settingsdialog.cpp


Ignore:
Timestamp:
Jan 7, 2010, 2:24:18 AM (15 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
946f442ab0
Parents:
4ccf855df8
Message:

+ Added the ability to generate fractional random numbers.
+ Added "Scroll to the end of solution output after solving" option.

  • Set the accuracy for fractional numbers on output to 2 decimail places.
  • Updated translations to reflect changes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/settingsdialog.cpp

    r4ccf855df8 rf1fb54b9f7  
    6363        vbox2->addWidget(groupOutputSettings);
    6464        vbox2->addStretch();
     65        vbox2->addWidget(cbFractionalRandom);
    6566        vbox2->addWidget(cbShowMatrix);
    6667        vbox2->addLayout(layoutCitiesLimit);
     68        vbox2->addWidget(cbScrollToEnd);
    6769        vbox2->addWidget(cbAutosize);
    6870
     
    150152        vbox2->addStretch();
    151153        vbox2->addLayout(hbox2);
     154        vbox2->addWidget(cbFractionalRandom);
    152155        vbox2->addWidget(cbShowMatrix);
    153156        vbox2->addLayout(layoutCitiesLimit);
     157        vbox2->addWidget(cbScrollToEnd);
    154158        vbox2->addWidget(cbAutosize);
    155159        vbox2->addWidget(cbSaveState);
     
    188192        spinRandMax->setMaximum(MAX_RAND_VALUE);
    189193        spinRandMax->setValue(settings->value("MaxCost",DEF_RAND_MAX).toInt());
     194        cbFractionalRandom->setChecked(settings->value("FractionalRandom", DEF_FRACTIONAL_RANDOM).toBool());
    190195        cbAutosize->setChecked(settings->value("Autosize",true).toBool());
    191196#ifndef Q_OS_WINCE
     
    200205        spinCitiesLimit->setValue(settings->value("ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt());
    201206        spinCitiesLimit->setMaximum(MAX_NUM_CITIES);
     207        cbScrollToEnd->setChecked(settings->value("ScrollToEnd", DEF_SCROLL_TO_END).toBool());
    202208
    203209        font = settings->value("Font",QFont(DEF_FONT_FAMILY,DEF_FONT_SIZE)).value<QFont>();
     
    236242        settings->setValue("MinCost", spinRandMin->value());
    237243        settings->setValue("MaxCost", spinRandMax->value());
     244        settings->setValue("FractionalRandom", cbFractionalRandom->isChecked());
    238245
    239246        settings->beginGroup("Output");
     
    242249        if (cbCitiesLimit->isChecked())
    243250                settings->setValue("ShowMatrixCitiesLimit", spinCitiesLimit->value());
     251        settings->setValue("ScrollToEnd", cbScrollToEnd->isChecked());
    244252        if (newFont)
    245253                settings->setValue("Font", font);
Note: See TracChangeset for help on using the changeset viewer.