-
Notifications
You must be signed in to change notification settings - Fork 1
/
taskswindow.h
69 lines (55 loc) · 1.29 KB
/
taskswindow.h
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
#ifndef CREATETASKDIALOG_H
#define CREATETASKDIALOG_H
#include <QDialog>
#include <QWidget>
#include <QWindow>
#include <QGridLayout>
#include <QLineEdit>
#include <QSpinBox>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
#include <QJsonDocument>
#include <QTextStream>
#include <QDebug>
#include <QCheckBox>
#include "def.h"
#include "tasksrepository.h"
class TasksWindow : public QWidget
{
Q_OBJECT
public:
TasksWindow();
~TasksWindow();
private:
QVBoxLayout *mainLayout;
QLineEdit *lineTaskName;
QSpinBox *spinRunningMinutes;
QSpinBox *spinRunningSeconds;
QSpinBox *spinRunningMillSec;
QSpinBox *spinBreakMinutes;
QSpinBox *spinBreakSeconds;
QSpinBox *spinBreakMillSec;
QLabel *labelTaskName;
QLabel *labelStart;
QPushButton *buttonSubmit;
QPushButton *buttonCancel;
QCheckBox *checkEndSpin;
QLabel *labelError;
bool isValidTaskData();
bool isTaskDataUnique();
void setErrorMessage(QString message);
void clearAllInputs();
QJsonObject createNewTask();
signals:
void tasksUpdated();
private slots:
void submit();
void enableEndSpin();
void setLabelErrorInvisible();
};
#endif // CREATETASKDIALOG_H