選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

29 行
535 B

  1. #ifndef PROJECT_H
  2. #define PROJECT_H
  3. #include <QString>
  4. #include <QList>
  5. // PLC工程数据模型
  6. class Project
  7. {
  8. public:
  9. struct ItemData {
  10. QString type;
  11. double x, y;
  12. };
  13. struct ConnectionData {
  14. int from, to;
  15. int fromType, toType;
  16. };
  17. void clear() { items_.clear(); connections_.clear(); }
  18. bool saveToFile(const QString& filePath) const;
  19. bool loadFromFile(const QString& filePath);
  20. QList<ItemData> items_;
  21. QList<ConnectionData> connections_;
  22. };
  23. #endif // PROJECT_H