[65] | 1 | /*! |
---|
[67] | 2 | * \file settingsdialog.h |
---|
[87] | 3 | * \author Copyright © 2007-2010 Lёppa <contacts[at]oleksii[dot]name> |
---|
[1] | 4 | * |
---|
[6] | 5 | * $Id: settingsdialog.h 100 2010-04-08 21:02:26Z laleppa $ |
---|
| 6 | * $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/src/settingsdialog.h $ |
---|
[3] | 7 | * |
---|
[67] | 8 | * \brief Defines SettingsDialog class. |
---|
| 9 | * |
---|
[65] | 10 | * <b>TSPSG: TSP Solver and Generator</b> |
---|
| 11 | * |
---|
[6] | 12 | * This file is part of TSPSG. |
---|
[1] | 13 | * |
---|
[6] | 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. |
---|
[1] | 18 | * |
---|
[6] | 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. |
---|
[1] | 23 | * |
---|
[6] | 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/>. |
---|
[1] | 26 | */ |
---|
| 27 | |
---|
| 28 | #ifndef SETTINGSDIALOG_H |
---|
| 29 | #define SETTINGSDIALOG_H |
---|
| 30 | |
---|
[31] | 31 | #include "globals.h" |
---|
[64] | 32 | |
---|
[56] | 33 | #include "ui_settingsdialog.h" |
---|
[1] | 34 | |
---|
[67] | 35 | /*! |
---|
| 36 | * \brief Class for handling Settings Dialog UI and logic. |
---|
[87] | 37 | * \author Copyright © 2007-2010 Lёppa <contacts[at]oleksii[dot]name> |
---|
[67] | 38 | */ |
---|
[65] | 39 | class SettingsDialog: public QDialog, Ui::SettingsDialog |
---|
[1] | 40 | { |
---|
| 41 | Q_OBJECT |
---|
| 42 | public: |
---|
| 43 | SettingsDialog(QWidget *parent = 0); |
---|
[56] | 44 | bool colorChanged() const; |
---|
[42] | 45 | bool fontChanged() const; |
---|
[92] | 46 | qint8 translucencyChanged() const; |
---|
[9] | 47 | |
---|
| 48 | private: |
---|
[92] | 49 | bool _newFont; |
---|
| 50 | bool _newColor; |
---|
| 51 | qint8 _translucency; |
---|
| 52 | |
---|
[56] | 53 | QColor color; |
---|
[21] | 54 | QFont font; |
---|
[92] | 55 | |
---|
[56] | 56 | QSettings *settings; |
---|
[78] | 57 | QHBoxLayout *layoutCitiesLimit; |
---|
[92] | 58 | #ifdef Q_OS_WIN32 |
---|
| 59 | QCheckBox *cbUseTranslucency; |
---|
| 60 | #endif // Q_OS_WIN32 |
---|
[100] | 61 | #ifdef Q_OS_WINCE_WM |
---|
[94] | 62 | QRect currentGeometry; |
---|
| 63 | #elif !defined(Q_OS_SYMBIAN) |
---|
[65] | 64 | QCheckBox *cbSaveState; |
---|
| 65 | QLabel *imgIcon; |
---|
[93] | 66 | QFrame *lineVertical; |
---|
[65] | 67 | QLabel *labelHint; |
---|
[67] | 68 | |
---|
[71] | 69 | bool event(QEvent *ev); |
---|
[100] | 70 | #endif // Q_OS_WINCE_WM |
---|
[65] | 71 | |
---|
[1] | 72 | private slots: |
---|
[21] | 73 | void accept(); |
---|
[56] | 74 | void buttonColorClicked(); |
---|
| 75 | void buttonFontClicked(); |
---|
[100] | 76 | #ifdef Q_OS_WINCE_WM |
---|
[94] | 77 | void desktopResized(int screen); |
---|
[95] | 78 | void showEvent(QShowEvent *ev); |
---|
[100] | 79 | #endif // Q_OS_WINCE_WM |
---|
[71] | 80 | void spinRandMinValueChanged(int val); |
---|
[1] | 81 | }; |
---|
| 82 | |
---|
[12] | 83 | #endif // SETTINGSDIALOG_H |
---|