-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhourlytab.h
55 lines (42 loc) · 1.06 KB
/
hourlytab.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
#ifndef HOURLYTAB_H
#define HOURLYTAB_H
#include <QWidget>
QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE
#include "reminder.h"
#include "accombobox.h"
#include "statusswitch.h"
class HourlyTab : public QWidget
{
Q_OBJECT
public:
explicit HourlyTab(const Reminder &reminder, QWidget *parent = nullptr);
void resetReminder();
signals:
void tabChanged(const Reminder &reminder);
private:
// Data
Reminder _reminder;
QStringList _dndDuration = { "00点", "00点" };
// UI
QLineEdit *_titleEdit;
ACComboBox *_minutes;
StatusSwitch<Reminder::DND> *_dndSwitch;
QWidget *_dndContainer;
ACComboBox *_dndStart;
ACComboBox *_dndEnd;
StatusSwitch<Reminder::Status> *_statusSwitch;
// Methods
void _resetReminder();
void _buildUI();
void _connectSlots();
private slots:
void _textChanged(const QString &text);
void _minuteChanged(int minute);
void _dndClicked();
void _dndStartChanged(int dndStart);
void _dndEndChanged(int dndEnd);
void _statusClicked();
};
#endif // HOURLYTAB_H