qt/LedOK/program/wplanitem.h

42 lines
795 B
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef WPLANITEM_H
#define WPLANITEM_H
2023-04-25 16:30:58 +08:00
#include <QPushButton>
2022-01-04 18:11:48 +08:00
#include <QListWidgetItem>
2023-04-25 16:30:58 +08:00
#include <QLabel>
#include <QTimeEdit>
2022-01-04 18:11:48 +08:00
#include <QJsonObject>
2023-04-25 16:30:58 +08:00
class wPlanItem : public QWidget {
2022-01-04 18:11:48 +08:00
Q_OBJECT
public:
2023-04-25 16:30:58 +08:00
explicit wPlanItem(QListWidgetItem *item, const QJsonObject * = 0);
2022-01-04 18:11:48 +08:00
QJsonObject planJson() const;
2023-04-25 16:30:58 +08:00
QLabel *fdIdx;
2022-01-04 18:11:48 +08:00
signals:
void sigItemChanged(QListWidgetItem *);
void sigDelete(QListWidgetItem *);
protected slots:
void onItemChanged();
void onDelete(bool);
private:
QListWidgetItem *m_item;
2023-04-25 16:30:58 +08:00
QTimeEdit *tStart;
QTimeEdit *tEnd;
QPushButton *bnDel;
QPushButton *sMon;
QPushButton *sTues;
QPushButton *sWed;
QPushButton *sThur;
QPushButton *sFri;
QPushButton *sSat;
QPushButton *sSun;
2022-01-04 18:11:48 +08:00
};
#endif // WPLANITEM_H