qt/LedOK/wProgramManager/wplanitem.h
2022-08-25 18:37:24 +08:00

46 lines
869 B
C++

#ifndef WPLANITEM_H
#define WPLANITEM_H
#include <QWidget>
#include <QListWidgetItem>
#include <QJsonValue>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonDocument>
namespace Ui {
class wPlanItem;
}
class wPlanItem : public QWidget
{
Q_OBJECT
public:
explicit wPlanItem(QListWidgetItem *item, QWidget *parent = nullptr);
explicit wPlanItem(const QJsonObject &oRoot, QListWidgetItem *item, QWidget *parent = nullptr);
~wPlanItem();
void setNum(int n);
void setPlan(const QJsonObject &oRoot);
QJsonObject planJson() const;
private:
void initBegin();
void initEnd();
signals:
void sigItemChanged(QListWidgetItem *);
void sigDelete(QListWidgetItem *);
protected slots:
void onItemChanged();
void onDelete(bool);
private:
Ui::wPlanItem *ui;
QListWidgetItem *m_item;
};
#endif // WPLANITEM_H