wpamsg.h 670 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef WPAMSG_H
  2. #define WPAMSG_H
  3. class WpaMsg;
  4. #if QT_VERSION >= 0x040000
  5. #include <QDateTime>
  6. #include <QLinkedList>
  7. typedef QLinkedList<WpaMsg> WpaMsgList;
  8. #else
  9. #include <qdatetime.h>
  10. typedef QValueList<WpaMsg> WpaMsgList;
  11. #endif
  12. class WpaMsg {
  13. public:
  14. WpaMsg() {}
  15. WpaMsg(const QString &_msg, int _priority = 2)
  16. : msg(_msg), priority(_priority)
  17. {
  18. timestamp = QDateTime::currentDateTime();
  19. }
  20. QString getMsg() const { return msg; }
  21. int getPriority() const { return priority; }
  22. QDateTime getTimestamp() const { return timestamp; }
  23. private:
  24. QString msg;
  25. int priority;
  26. QDateTime timestamp;
  27. };
  28. #endif /* WPAMSG_H */