Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

29 Zeilen
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