node.h 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NODE_H
  2. #define NODE_H
  3. #include <QString>
  4. #include <QObject>
  5. //#include <algorithm>
  6. #include <memory>
  7. class Node:public QObject
  8. {
  9. unsigned int m_id;//id
  10. int m_pld;//parent id
  11. bool m_status;//active, not active
  12. QString m_message;//QMessageBox
  13. public:
  14. Node(QObject *parent = 0):QObject(parent){};
  15. Node(Node*);
  16. Node(unsigned int id, int pld, bool status, QString message, QObject *parent = 0);
  17. Node(const Node&) = delete;
  18. Node(Node&&)=default;
  19. ~Node()=default;
  20. void setId(unsigned int id){m_id = id;}
  21. void setPld(int pld){m_pld = pld;}
  22. void setStatus(bool status){m_status = status;}
  23. void setMessage(QString message){m_message = message;}
  24. unsigned int id() const
  25. {return m_id;}
  26. int pld()const
  27. {return m_pld;}
  28. bool status() const
  29. {return m_status;}
  30. QString message()const
  31. {return m_message;}
  32. };
  33. #endif // NODE_H