2025-02-06 16:36:50 +08:00
|
|
|
#ifndef ITEMPROPERTYDLG_H
|
|
|
|
|
#define ITEMPROPERTYDLG_H
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
#include <QMetaType>
|
2025-04-03 18:33:10 +08:00
|
|
|
#include <QButtonGroup>
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
#include "global.h"
|
2025-02-06 16:36:50 +08:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
namespace Ui { class itemPropertyDlg; }
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2025-06-13 19:00:05 +08:00
|
|
|
class GraphicsProjectModelItem;
|
2025-07-04 18:47:49 +08:00
|
|
|
class FixedPortsModel;
|
2025-02-06 16:36:50 +08:00
|
|
|
|
|
|
|
|
class ItemPropertyDlg : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ItemPropertyDlg(QWidget *parent = nullptr);
|
|
|
|
|
~ItemPropertyDlg();
|
|
|
|
|
|
2025-04-03 18:33:10 +08:00
|
|
|
void initial();
|
|
|
|
|
void loadGroupButton(QMap<QString,groupStateInfo>); //加载属性组列表
|
|
|
|
|
void createGroupView(const QString&); //创建属性页
|
2025-06-13 19:00:05 +08:00
|
|
|
void showDlg(modelDataInfo,QUuid,GraphicsProjectModelItem*); //显示属性页面
|
2025-07-04 18:47:49 +08:00
|
|
|
void setModelController(FixedPortsModel* p) {_curModelController = p;}
|
|
|
|
|
auto getModelController() {return _curModelController;}
|
2025-10-17 18:14:44 +08:00
|
|
|
auto getCurItem() {return _curItem;}
|
2025-02-06 16:36:50 +08:00
|
|
|
public slots:
|
|
|
|
|
void onOkClicked();
|
|
|
|
|
void onCancelClicked();
|
2025-04-03 18:33:10 +08:00
|
|
|
void onGroupSelected(const QString&);
|
2025-02-06 16:36:50 +08:00
|
|
|
private:
|
|
|
|
|
Ui::itemPropertyDlg *ui;
|
|
|
|
|
|
2025-04-03 18:33:10 +08:00
|
|
|
QVBoxLayout* layout_;
|
|
|
|
|
QButtonGroup* btnGroup_;
|
|
|
|
|
QMap<QString, QAbstractButton*> btnMap_;
|
|
|
|
|
|
|
|
|
|
QMap<QString, QWidget*> groupViews_; //stack中存储的属性页
|
|
|
|
|
QMap<QString,groupStateInfo> groupInfo_; //属性组结构信息
|
|
|
|
|
QMap<QString,groupStateValue> groupValue_; //属性数据
|
|
|
|
|
QUuid curUuid_; //当前显示对象的uuid
|
|
|
|
|
QString _curModel; //当前模型名
|
2025-06-13 19:00:05 +08:00
|
|
|
GraphicsProjectModelItem* _curItem;
|
2025-07-04 18:47:49 +08:00
|
|
|
FixedPortsModel* _curModelController;
|
2025-02-06 16:36:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|