source: tspsg/src/settingsdialog.h @ a5be8eb2c8

0.1.3.145-beta1-symbian0.1.4.170-beta2-bb10appveyorimgbotreadme
Last change on this file since a5be8eb2c8 was 1fbf016a09, checked in by Oleksii Serdiuk, 14 years ago

+ Added an ability to disable showing of the solution steps' matrices in solution output.

  • Replaced Ok and Cancel buttons in SettingsDialog? with QButtonBox. Now the buttons conform the interface guidelines of the target platform.
  • Increased the allowed maximum number of cities to 50. Solution steps' matrices aren't shown by default if the number of cities in task is more than 15.
  • For WinCE the size of the toolbar buttons is now determined based on the device DPI instead of its resolution.
  • Open and save file dialogs are now using native dialogs where supported.
  • Reworked About dialog a little bit.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*!
2 * \file settingsdialog.h
3 * \author Copyright &copy; 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
4 *
5 *  $Id$
6 *  $URL$
7 *
8 * \brief Defines SettingsDialog class.
9 *
10 *  <b>TSPSG: TSP Solver and Generator</b>
11 *
12 *  This file is part of TSPSG.
13 *
14 *  TSPSG is free software: you can redistribute it and/or modify
15 *  it under the terms of the GNU General Public License as published by
16 *  the Free Software Foundation, either version 3 of the License, or
17 *  (at your option) any later version.
18 *
19 *  TSPSG is distributed in the hope that it will be useful,
20 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
21 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 *  GNU General Public License for more details.
23 *
24 *  You should have received a copy of the GNU General Public License
25 *  along with TSPSG.  If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#ifndef SETTINGSDIALOG_H
29#define SETTINGSDIALOG_H
30
31#include "globals.h"
32
33#include "ui_settingsdialog.h"
34
35/*!
36 * \brief Class for handling Settings Dialog UI and logic.
37 * \author Copyright &copy; 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
38 */
39class SettingsDialog: public QDialog, Ui::SettingsDialog
40{
41        Q_OBJECT
42public:
43        SettingsDialog(QWidget *parent = 0);
44        bool colorChanged() const;
45        bool fontChanged() const;
46
47private:
48        QColor color;
49        QFont font;
50        bool newFont;
51        bool newColor;
52        QSettings *settings;
53        QHBoxLayout *layoutCitiesLimit;
54#ifndef Q_OS_WINCE
55        QCheckBox *cbSaveState;
56        QLabel *imgIcon;
57        QLabel *labelHint;
58        QFrame *lineVertical;
59
60        bool event(QEvent *ev);
61#endif // Q_OS_WINCE
62
63private slots:
64        void accept();
65        void buttonColorClicked();
66        void buttonFontClicked();
67        void spinRandMinValueChanged(int val);
68};
69
70#endif // SETTINGSDIALOG_H
Note: See TracBrowser for help on using the repository browser.