src/messageLog.h

changeset 739
152b33a6d51b
parent 655
b376645315ab
child 789
4b7306f52bb5
equal deleted inserted replaced
738:16b63398aa1f 739:152b33a6d51b
48 //! A single line of the message log. 48 //! A single line of the message log.
49 class Line 49 class Line
50 { 50 {
51 public: 51 public:
52 //! Constructs a line with the given \c text 52 //! Constructs a line with the given \c text
53 Line (QString text); 53 Line (String text);
54 54
55 //! Check this line's expiry and update alpha accordingly. 55 //! Check this line's expiry and update alpha accordingly.
56 //! \c changed is updated to whether the line has somehow 56 //! \c changed is updated to whether the line has somehow
57 //! changed since the last update. 57 //! changed since the last update.
58 //! \returns true if the line is to still stick around, false 58 //! \returns true if the line is to still stick around, false
59 //! \returns if it expired. 59 //! \returns if it expired.
60 bool update (bool& changed); 60 bool update (bool& changed);
61 61
62 QString text; 62 String text;
63 float alpha; 63 float alpha;
64 QDateTime expiry; 64 QDateTime expiry;
65 }; 65 };
66 66
67 //! Constructs the message manager. 67 //! Constructs the message manager.
68 explicit MessageManager (QObject* parent = null); 68 explicit MessageManager (QObject* parent = null);
69 69
70 //! Adds a line with the given \c text to the message manager. 70 //! Adds a line with the given \c text to the message manager.
71 void addLine (QString line); 71 void addLine (String line);
72 72
73 //! \returns all active lines in the message manager. 73 //! \returns all active lines in the message manager.
74 const QList<Line>& getLines() const; 74 const QList<Line>& getLines() const;
75 75
76 private: 76 private:

mercurial