TSP Solver and Generator
settingsdialog.h
Go to the documentation of this file.
1 
28 #ifndef SETTINGSDIALOG_H
29 #define SETTINGSDIALOG_H
30 
31 #include "globals.h"
32 
33 #include "ui_settingsdialog.h"
34 
39 class SettingsDialog: public QDialog, Ui::SettingsDialog
40 {
41  Q_OBJECT
42 public:
44  bool colorChanged() const;
45  bool fontChanged() const;
46  qint8 translucencyChanged() const;
47 
48 private:
49  bool _fontChanged;
50  bool _colorChanged;
51  qint8 _translucency;
52 
53  QColor textColor, selColor, altColor, borderColor, bgColor;
54  QFont font;
55 
56  QSettings *settings;
57  QHBoxLayout *layoutCitiesLimit;
58 #ifndef HANDHELD
59  QCheckBox *cbUseTranslucency;
60 #endif // HANDHELD
61  QCheckBox *cbCheck4Updates;
62  QSpinBox *spinUpdateCheckInterval;
63 #ifndef QT_NO_PRINTER
64  QCheckBox *cbHQGraph;
65 #endif
66 #ifdef Q_OS_WINCE_WM
67  QRect currentGeometry;
68 #elif !defined(HANDHELD)
69  QCheckBox *cbSaveState;
70  QLabel *imgIcon;
71  QFrame *lineVertical;
72  QLabel *labelHint;
73 
74 #ifndef QT_NO_STATUSTIP
75  bool event(QEvent *ev);
76 #endif // QT_NO_STATUSTIP
77 #endif // Q_OS_WINCE_WM
78 
79  void pickColor(QColor &where);
80  void setBgColor(QWidget *widget, const QColor &color);
81 
82 private slots:
83  void accept();
84  void buttonTextColorClicked();
85  void buttonSelectedColorClicked();
86  void buttonAlternateColorClicked();
87  void buttonBorderColorClicked();
88 // void buttonBgColorClicked();
89  void buttonFontClicked();
90 #ifdef Q_OS_WINCE_WM
91  void desktopResized(int screen);
92  void showEvent(QShowEvent *ev);
93 #endif // Q_OS_WINCE_WM
94  void spinRandMinValueChanged(int val);
95 };
96 
97 #endif // SETTINGSDIALOG_H
bool fontChanged() const
Indicates whether or not the font properties have been changed.
Definition: settingsdialog.cpp:369
Class for handling Settings Dialog UI and logic.
Definition: settingsdialog.h:39
Contains TSPSG global defines.
qint8 translucencyChanged() const
Indicates whether and how the translucency setting was changed.
Definition: settingsdialog.cpp:380
const QFont & font() const
virtual void showEvent(QShowEvent *event)
SettingsDialog(QWidget *parent=0)
Class constructor.
Definition: settingsdialog.cpp:51
QObject * parent() const
bool colorChanged() const
Indicates whether or not the font color has been changed.
Definition: settingsdialog.cpp:360