qt/LedOK/program/progitem.h

35 lines
816 B
C
Raw Normal View History

2022-09-30 18:08:39 +08:00
#ifndef PROGITEM_H
#define PROGITEM_H
2023-09-19 11:49:20 +08:00
#include "base/loqtreewidget.h"
2022-09-30 18:08:39 +08:00
#include <QJsonObject>
#include <QPushButton>
2023-05-11 11:47:00 +08:00
2022-10-27 15:07:45 +08:00
class ProgPanel;
2023-09-19 11:49:20 +08:00
class ProgItem : public TreeWidgetItem {
2022-09-30 18:08:39 +08:00
public:
2023-05-11 11:47:00 +08:00
explicit ProgItem(const QString &progsDir, const QString &name, int w, int h, const QString & remarks, QList<int> &splitWidths, int, LoQTreeWidget *parent);
explicit ProgItem(const QString &progsDir, const QJsonObject &json, LoQTreeWidget *parent);
2022-09-30 18:08:39 +08:00
void save();
void del();
2023-09-19 11:49:20 +08:00
void onSetProgram();
2022-09-30 18:08:39 +08:00
2022-10-27 15:07:45 +08:00
QString mName;
int mWidth;
int mHeight;
QString mRemark;
2023-04-18 14:14:46 +08:00
QList<int> mSplitWidths;
int mMaxWidth{0};
2022-10-27 15:07:45 +08:00
QString mProgsDir;
QString mProgDir;
qint64 m_fsize{0};
2022-09-30 18:08:39 +08:00
QDateTime m_last;
QPushButton *m_bnName;
private:
void init();
2023-09-19 11:49:20 +08:00
QString m_orgName;
2022-09-30 18:08:39 +08:00
};
#endif // PROGITEM_H