Changeset 224 for Evidence/Edd
- Timestamp:
- 06/17/10 09:00:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Evidence/Edd/Edd.cc
r222 r224 99 99 100 100 // Update widget 101 void EddLineDisplay::Update(QString Name, int Time, QByteArray Array, QString Format, QString Text) {101 void EddLineDisplay::Update(QString Name, int Time, QByteArray, QString Format, QString Text) { 102 102 103 103 if (ServiceName != Name) return; … … 109 109 setText("n/a"); 110 110 Pal.setColor(QPalette::Base, Qt::lightGray); 111 } 112 else { 113 // Backgound colour determined by last byte 114 switch (Array[Array.size()]) { 111 setPalette(Pal); 112 return; 113 } 114 115 // Message service backgound colour determined by severity 116 if (Name.endsWith("/Message")) { 117 switch (Text.section(' ', 0, 0).toInt()) { 115 118 case 0: Pal.setColor(QPalette::Base, Qt::white); break; 116 119 case 1: Pal.setColor(QPalette::Base, Qt::yellow); break; … … 119 122 default: break; 120 123 } 121 122 if (Format[0].toUpper() != 'C') Text = Text.section(' ', Index, Index); 123 124 if (!ShowAsTime) setText(Text); 125 else setText(QDateTime::fromTime_t(Text.toInt()).toString());126 setCursorPosition(0);127 } 128 124 Text = Text.section(' ', 1); 125 } 126 else if (Format[0].toUpper() != 'C') Text = Text.section(' ', Index, Index); 127 128 if (!ShowAsTime) setText(Text); 129 else setText(QDateTime::fromTime_t(Text.toInt()).toString()); 130 131 setCursorPosition(0); 129 132 setPalette(Pal); 130 133 }
Note:
See TracChangeset
for help on using the changeset viewer.