Update screenshot of main view
[weightgraph] / weightgraph / weightgraphview.h
1 #ifndef WEIGHTGRAPHVIEW_H
2 #define WEIGHTGRAPHVIEW_H
3
4 #include <QWidget>
5 #include <QKeyEvent>
6 #include <X11/Xlib.h>
7 #include "weightdata.h"
8 #include "settings.h"
9
10 class WeightGraphView : public QWidget
11 {
12     Q_OBJECT
13 public:
14   explicit WeightGraphView(WeightDataModel *wdm, const QString &id, QWidget *parent = 0);
15   QSize sizeHint() const;
16   void grabZoomKeys(bool grab);
17   static void grabZoomKeysForWindow(WId winId, bool grab);
18 signals:
19   void clicked();
20 public slots:
21   void paintEvent(QPaintEvent *);
22   void show();
23   void update();
24
25   void incPeriod();
26   void decPeriod();
27   void setPeriod(int period) { this->period = period; update(); }
28 protected:
29   void mousePressEvent(QMouseEvent *);
30   void keyPressEvent(QKeyEvent* event);
31 private:
32   QString id;
33   WeightDataModel *wdm;
34   int period;
35 };
36
37 #endif // WEIGHTGRAPHVIEW_H