#ifndef PROJECT_H #define PROJECT_H #include #include #include // PLC工程数据模型 class Project { public: struct ItemData { QString type; double x, y; QString registerId = ""; QString registerId2 = ""; QString compare = ""; QString imagePath; // 按钮的图片路径 QString onImagePath; // 指示灯的ON状态图片路径 QString offImagePath; // 指示灯的OFF状态图片路径 QSizeF size = QSizeF(50, 50); // 当前尺寸 }; struct ConnectionData { int from, to; int fromType, toType; }; void clear() { items_.clear(); connections_.clear(); } bool saveToFile(const QString& filePath) const; bool loadFromFile(const QString& filePath); QList items_; QList connections_; }; #endif // PROJECT_H