|
- #ifndef PROJECT_H
- #define PROJECT_H
-
- #include <QString>
- #include <QList>
-
- // PLC工程数据模型
- class Project
- {
- public:
- struct ItemData {
- QString type;
- double x, y;
- };
- 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<ItemData> items_;
- QList<ConnectionData> connections_;
- };
-
- #endif // PROJECT_H
|