1 #ifndef SCHEDULESCREEN_H
2 #define SCHEDULESCREEN_H
4 #include <QtGui>
5 #include "schedulepoint.h"
7 class GlobalSettings;
9 class ScheduleScreen : public QWidget
10 {
11 Q_OBJECT
12 public:
13 explicit ScheduleScreen(QWidget *parent = 0);
15 signals:
16 void valueChanged();
17 void clicked();
19 public slots:
20 void shiftLeft();
21 void shiftRight();
22 void increaseTemp();
23 void decreaseTemp();
24 void selectDay(SchedulePoint *);
25 void unselectDay();
26 void updateData();
27 void createScheduleScene();
28 void showEvent(QShowEvent *);
29 void addSchedulePoints();
30 void disableRow(bool checked);
31 void initializeScene();
32 void initializeGraphics();
34 private:
35 QButtonGroup *daysButtonGroup;
36 QGraphicsScene *scene;
37 QGraphicsView *view;
39 int seqNumber;
40 QList <SchedulePoint *> pointList;
41 QList <QPair<QPointF, int> > pointSave;
44 SchedulePoint *currentPoint;
45 void showPoint(SchedulePoint *);
46 QLabel *currentTime;
48 QRectF pointArea;
49 qreal weekHeight;
50 qreal timeBlockWidth;
51 qreal timeWidth;
53 GlobalSettings* m_globalSettings;
55 bool m_initialized;
57 protected:
58 void mousePressEvent(QMouseEvent */* event */);
59 };
61 #endif // SCHEDULESCREEN_H