mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Hide info window with no data, correcte field to le_SmCategories
This commit is contained in:
@@ -96,7 +96,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
this->ui->le_SmSeverity->setText(statusMessage.getSeverityAsString());
|
||||
this->ui->le_SmType->setText(statusMessage.getCategories().toQString()); // TODO should be called ui->le_SmCategories
|
||||
this->ui->le_SmCategories->setText(statusMessage.getCategories().toQString());
|
||||
this->ui->te_SmStatusMessage->setText(statusMessage.getMessage());
|
||||
this->ui->lbl_SmSeverityIcon->setPixmap(statusMessage.toPixmap());
|
||||
|
||||
@@ -109,13 +109,23 @@ namespace BlackGui
|
||||
*/
|
||||
void CInfoWindowComponent::display(const BlackMisc::CVariant &variant, int displayTimeMs)
|
||||
{
|
||||
if (variant.isNull()) return;
|
||||
if (variant.isNull())
|
||||
{
|
||||
this->hide();
|
||||
return;
|
||||
}
|
||||
if (variant.canConvert<CTextMessage>())
|
||||
{
|
||||
this->displayTextMessage(variant.value<CTextMessage>(), displayTimeMs);
|
||||
}
|
||||
else if (variant.canConvert<CStatusMessage>())
|
||||
{
|
||||
this->displayStatusMessage(variant.value<CStatusMessage>(), displayTimeMs);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->displayStringMessage(variant.toQString(), displayTimeMs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -152,9 +152,12 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gl_StatusMessage">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SmType">
|
||||
<widget class="QLabel" name="lbl_SmCategories">
|
||||
<property name="toolTip">
|
||||
<string>Categories</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
<string>Cat.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -169,7 +172,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_SmType">
|
||||
<widget class="QLineEdit" name="le_SmCategories">
|
||||
<property name="text">
|
||||
<string>type</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user