Update screenshot of main view
[weightgraph] / weightgraph / settingswindow.h
1 #ifndef SETTINGSWINDOW_H
2 #define SETTINGSWINDOW_H
3
4 #include <QMainWindow>
5 #include <QTabWidget>
6 #include <QPushButton>
7 #include <QList>
8 #ifdef Q_WS_MAEMO_5
9 # include <QtMaemo5>
10 #else
11 # include <QComboBox>
12 #endif
13 #include "weightspinbox.h"
14
15 class GraphSettingsWidget;
16
17 class SettingsWindow : public QMainWindow
18 {
19   Q_OBJECT
20 public:
21   explicit SettingsWindow(QWidget *parent = 0);
22 protected:
23   void closeEvent(QCloseEvent *);
24 signals:
25
26 public slots:
27 private:
28 #ifdef Q_WS_MAEMO_5
29   QMaemo5ValueButton *weightUnit;
30 #else
31   QComboBox *weightUnit;
32 #endif
33   WeightSpinBox *goalMin;
34   WeightSpinBox *goalMax;
35   QPushButton *grabZoomKeys;
36   QList<GraphSettingsWidget*> *graphSettingsList;
37
38   QWidget *makeGeneralSettingsWidget(QWidget *parentContainer);
39   QWidget *makeGraphSettingsWidget(QWidget *parentContainer);
40 };
41
42 class GraphSettingsWidget : public QWidget {
43   Q_OBJECT
44 public:
45   GraphSettingsWidget(QString graphId, QWidget *parent);
46 private slots:
47   void weightIntervalModeChanged(QString mode);
48 public:
49   QString graphId;
50   QPushButton *goalWeightEnabled;
51 #ifdef Q_WS_MAEMO_5
52   QMaemo5ValueButton *weightIntervalMode;
53   QMaemo5ValueButton *defaultTimeInterval;
54 #else
55   QComboBox *weightIntervalMode;
56   QComboBox *defaultTimeInterval;
57 #endif
58
59   WeightSpinBox *weightIntervalMin;
60   WeightSpinBox *weightIntervalMax;
61 };
62
63 #endif // SETTINGSWINDOW_H