qt/LedOK/program/progitem.h

34 lines
780 B
C
Raw Permalink 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:
2024-02-21 18:08:50 +08:00
using TreeWidgetItem::TreeWidgetItem;
explicit ProgItem(const QString &progsDir, const QString &name, int w, int h, const QString & remarks, std::vector<int> &, int, bool isVer, 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;
2024-02-21 18:08:50 +08:00
std::vector<int> partLens;
int maxLen = 0;
2024-08-19 16:10:49 +08:00
bool isInsert = false, isVer = false;
2022-10-27 15:07:45 +08:00
QString mProgsDir;
QString mProgDir;
2024-02-21 18:08:50 +08:00
qint64 m_fsize = 0;
QPushButton *btnName;
2022-09-30 18:08:39 +08:00
void init();
2023-09-19 11:49:20 +08:00
QString m_orgName;
2022-09-30 18:08:39 +08:00
};
#endif // PROGITEM_H