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