mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #568, improved display for status message categories
This commit is contained in:
@@ -35,7 +35,17 @@ namespace BlackGui
|
||||
{
|
||||
ui->te_Message->setPlainText(message.getMessage());
|
||||
ui->lbl_SeverityIcon->setPixmap(message.toPixmap());
|
||||
ui->le_Categories->setText(message.getHumanReadablePattern());
|
||||
const QString hrc(message.getHumanReadablePattern());
|
||||
if (hrc.isEmpty())
|
||||
{
|
||||
ui->le_Categories->setText(message.getCategories().toQString());
|
||||
ui->le_Categories->setToolTip("");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->le_Categories->setText(hrc);
|
||||
ui->le_Categories->setToolTip(message.getCategories().toQString());
|
||||
}
|
||||
ui->le_Severity->setText(message.getSeverityAsString());
|
||||
ui->le_Timestamp->setText(message.getFormattedUtcTimestampYmdhms());
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>407</width>
|
||||
<height>129</height>
|
||||
<height>158</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -35,6 +35,13 @@
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="2" column="3" colspan="6">
|
||||
<widget class="QLineEdit" name="le_Categories">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLabel" name="lbl_Categories">
|
||||
<property name="text">
|
||||
@@ -42,13 +49,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lbl_Timestamp">
|
||||
<property name="text">
|
||||
<string>Timestamp:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7">
|
||||
<widget class="QLineEdit" name="le_Timestamp">
|
||||
<property name="maximumSize">
|
||||
@@ -62,6 +62,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="lbl_Timestamp">
|
||||
<property name="text">
|
||||
<string>Timestamp:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbl_Severity">
|
||||
<property name="text">
|
||||
@@ -69,26 +76,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="6">
|
||||
<widget class="QLineEdit" name="le_Categories">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="le_Severity">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="8">
|
||||
<widget class="QPlainTextEdit" name="te_Message">
|
||||
<property name="readOnly">
|
||||
@@ -96,16 +83,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lbl_SeverityIcon">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../blackmisc/blackmisc.qrc">:/diagona/icons/diagona/icons/question.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="8">
|
||||
<spacer name="hs_Top2">
|
||||
<property name="orientation">
|
||||
@@ -119,6 +96,29 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="le_Severity">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lbl_SeverityIcon">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../blackmisc/blackmisc.qrc">:/diagona/icons/diagona/icons/question.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="hs_Top1">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -116,8 +116,7 @@ namespace BlackMisc
|
||||
QString CStatusMessage::getHumanReadablePattern() const
|
||||
{
|
||||
QStringList patternNames(getHumanReadablePatterns());
|
||||
return patternNames.isEmpty() ?
|
||||
"None" : patternNames.join(", ");
|
||||
return patternNames.isEmpty() ? "" : patternNames.join(", ");
|
||||
}
|
||||
|
||||
QStringList CStatusMessage::getHumanReadablePatterns() const
|
||||
|
||||
Reference in New Issue
Block a user