blob: 98dee57637b90559a8f835ba9196bda334d06075 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#ifndef SCHEDULESCREEN_H
#define SCHEDULESCREEN_H
#include <qglobal.h>
#include <QtGui>
#if QT_VERSION >= 0x050000
#include <QTimer>
#include <QGraphicsProxyWidget>
#include <QGraphicsView>
#include <QButtonGroup>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLabel>
#include <QDesktopWidget>
#include <QGraphicsSceneMouseEvent>
#endif
#include "schedulepoint.h"
class GlobalSettings;
class ScheduleScreen : public QWidget
{
Q_OBJECT
public:
explicit ScheduleScreen(QWidget *parent = 0);
signals:
void valueChanged();
void clicked();
public slots:
void shiftLeft();
void shiftRight();
void increaseTemp();
void decreaseTemp();
void selectDay(SchedulePoint *);
void unselectDay();
void updateData();
void createScheduleScene();
void showEvent(QShowEvent *);
void addSchedulePoints();
void disableRow(bool checked);
void initializeScene();
void initializeGraphics();
private:
QButtonGroup *daysButtonGroup;
QGraphicsScene *scene;
QGraphicsView *view;
int seqNumber;
QList <SchedulePoint *> pointList;
QList <QPair<QPointF, int> > pointSave;
SchedulePoint *currentPoint;
void showPoint(SchedulePoint *);
QLabel *currentTime;
QRectF pointArea;
qreal weekHeight;
qreal timeBlockWidth;
qreal timeWidth;
GlobalSettings* m_globalSettings;
bool m_initialized;
protected:
void mousePressEvent(QMouseEvent */* event */);
};
#endif // SCHEDULESCREEN_H
|