Release 1.0.4
[weightgraph] / weightgraph / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QMainWindow>
5 #include <QtGui>
6 #include "editwindow.h"
7 #include "weightspinbox.h"
8 #include "weightgraphview.h"
9 #include "settingswindow.h"
10
11 namespace Ui {
12     class MainWindow;
13 }
14
15 class MainWindow : public QMainWindow
16 {
17   Q_OBJECT
18
19 public:
20   explicit MainWindow(QWidget *parent = 0);
21 public slots:
22   void grabZoomKeys(bool grab);
23 private slots:
24   void setTodaysWeight();
25   void update() {
26     grabZoomKeys(Settings::grabZoomKeys());
27     QWidget::update();
28   }
29 protected:
30   void keyPressEvent(QKeyEvent* event);
31 private:
32   //Ui::MainWindow *ui;
33   WeightSpinBox *weight;
34   EditWindow *ew;
35   WeightGraphView *smallGraph;
36   WeightGraphView *bigGraph;
37   SettingsWindow *settingsWindow;
38   QMessageBox *aboutDialog;
39
40   QWidget *createLeftColumn(QWidget *central);
41   QWidget *createRightColumn(QWidget *central);
42   void createBigGraph();
43   void createAboutDialog();
44   void createMenuBar();
45 };
46
47 #endif // MAINWINDOW_H