Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

30 righe
568 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. QString registerId = "";
  13. };
  14. struct ConnectionData {
  15. int from, to;
  16. int fromType, toType;
  17. };
  18. void clear() { items_.clear(); connections_.clear(); }
  19. bool saveToFile(const QString& filePath) const;
  20. bool loadFromFile(const QString& filePath);
  21. QList<ItemData> items_;
  22. QList<ConnectionData> connections_;
  23. };
  24. #endif // PROJECT_H