mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +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->te_Message->setPlainText(message.getMessage());
|
||||||
ui->lbl_SeverityIcon->setPixmap(message.toPixmap());
|
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_Severity->setText(message.getSeverityAsString());
|
||||||
ui->le_Timestamp->setText(message.getFormattedUtcTimestampYmdhms());
|
ui->le_Timestamp->setText(message.getFormattedUtcTimestampYmdhms());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>407</width>
|
<width>407</width>
|
||||||
<height>129</height>
|
<height>158</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -35,6 +35,13 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</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">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QLabel" name="lbl_Categories">
|
<widget class="QLabel" name="lbl_Categories">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -42,13 +49,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="0" column="7">
|
||||||
<widget class="QLineEdit" name="le_Timestamp">
|
<widget class="QLineEdit" name="le_Timestamp">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@@ -62,6 +62,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="lbl_Severity">
|
<widget class="QLabel" name="lbl_Severity">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -69,26 +76,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="3" column="1" colspan="8">
|
||||||
<widget class="QPlainTextEdit" name="te_Message">
|
<widget class="QPlainTextEdit" name="te_Message">
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
@@ -96,16 +83,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="0" column="8">
|
||||||
<spacer name="hs_Top2">
|
<spacer name="hs_Top2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -119,6 +96,29 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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">
|
<item row="0" column="5">
|
||||||
<spacer name="hs_Top1">
|
<spacer name="hs_Top1">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@@ -116,8 +116,7 @@ namespace BlackMisc
|
|||||||
QString CStatusMessage::getHumanReadablePattern() const
|
QString CStatusMessage::getHumanReadablePattern() const
|
||||||
{
|
{
|
||||||
QStringList patternNames(getHumanReadablePatterns());
|
QStringList patternNames(getHumanReadablePatterns());
|
||||||
return patternNames.isEmpty() ?
|
return patternNames.isEmpty() ? "" : patternNames.join(", ");
|
||||||
"None" : patternNames.join(", ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList CStatusMessage::getHumanReadablePatterns() const
|
QStringList CStatusMessage::getHumanReadablePatterns() const
|
||||||
|
|||||||
Reference in New Issue
Block a user