mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Some GUI adjustments / formatting found during #702
* selection in view (full row) * Unused function removed * Allow reduced message form
This commit is contained in:
@@ -121,9 +121,9 @@ namespace BlackGui
|
||||
|
||||
void CAtcStationComponent::update()
|
||||
{
|
||||
if (!sGui || !sGui->getIContextNetwork()) { return; }
|
||||
Q_ASSERT(this->ui->tvp_AtcStationsBooked);
|
||||
Q_ASSERT(this->ui->tvp_AtcStationsOnline);
|
||||
Q_ASSERT(sGui->getIContextNetwork());
|
||||
|
||||
// check if component is visible, if we have already data then skip udpate
|
||||
bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0;
|
||||
|
||||
@@ -82,11 +82,6 @@ namespace BlackGui
|
||||
CDbStashComponent::~CDbStashComponent()
|
||||
{ }
|
||||
|
||||
void CDbStashComponent::gracefulShutdown()
|
||||
{
|
||||
// shutdown
|
||||
}
|
||||
|
||||
CStatusMessage CDbStashComponent::validateStashModel(const CAircraftModel &model, bool allowReplace) const
|
||||
{
|
||||
if (!allowReplace && this->ui->tvp_StashAircraftModels->container().containsModelStringOrDbKey(model))
|
||||
|
||||
@@ -70,9 +70,6 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
~CDbStashComponent();
|
||||
|
||||
//! Graceful shutdown
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Test the given model if it can be stashed
|
||||
BlackMisc::CStatusMessage validateStashModel(const BlackMisc::Simulation::CAircraftModel &model, bool allowReplace) const;
|
||||
|
||||
|
||||
@@ -547,14 +547,14 @@ namespace BlackGui
|
||||
QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||
if (model.getAircraftIcaoCode().hasDesignator())
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1") << modelStr;
|
||||
CLogMessage(this).validationInfo("Reverse lookup for '%1'") << modelStr;
|
||||
|
||||
// update GUI
|
||||
this->setGuiIcaoValues(model, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for %1 failed, set data manually") << modelStr;
|
||||
CLogMessage(this).validationInfo("Reverse lookup for '%1'' failed, set data manually") << modelStr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CModelMatcherComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
|
||||
@@ -61,5 +61,16 @@ namespace BlackGui
|
||||
{
|
||||
this->setVisible(!isVisible());
|
||||
}
|
||||
|
||||
void CStatusMessageForm::setReducedInfo(bool minimized)
|
||||
{
|
||||
ui->le_Timestamp->setVisible(!minimized);
|
||||
ui->lbl_Timestamp->setVisible(!minimized);
|
||||
ui->le_Categories->setVisible(!minimized);
|
||||
ui->lbl_Categories->setVisible(!minimized);
|
||||
ui->le_Severity->setVisible(!minimized);
|
||||
ui->lbl_SeverityIcon->setVisible(!minimized);
|
||||
ui->lbl_Severity->setVisible(!minimized);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CStatusMessageForm; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -52,6 +51,9 @@ namespace BlackGui
|
||||
//! Toggle visibility
|
||||
void toggleVisibility();
|
||||
|
||||
//! Minimize by hiding status ...
|
||||
void setReducedInfo(bool minimized);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CStatusMessageForm> ui;
|
||||
};
|
||||
|
||||
@@ -48,6 +48,5 @@ namespace BlackGui
|
||||
this->m_timer->start(); // restart other timer
|
||||
this->m_timerSingleShot->start(10);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace BlackGui
|
||||
namespace Components
|
||||
{
|
||||
//! Timer used in components for updates
|
||||
//! \deprecated used at the beginning of the project, likely to be removed in the future
|
||||
class BLACKGUI_EXPORT CUpdateTimer: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace BlackGui
|
||||
|
||||
void CUserComponent::update()
|
||||
{
|
||||
if (!sGui || !sGui->getIContextNetwork()) { return; }
|
||||
Q_ASSERT(this->ui->tvp_AllUsers);
|
||||
Q_ASSERT(this->ui->tvp_Clients);
|
||||
Q_ASSERT(sGui->getIContextNetwork());
|
||||
|
||||
if (sGui->getIContextNetwork()->isConnected())
|
||||
{
|
||||
@@ -99,6 +99,5 @@ namespace BlackGui
|
||||
this->ui->tvp_Clients->clear();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
<string>Users</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_AllUsers">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -44,6 +41,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CUserView" name="tvp_AllUsers">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
@@ -56,9 +59,6 @@
|
||||
<string>Clients</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_Clients">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -73,6 +73,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CClientView" name="tvp_Clients">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
@@ -80,6 +86,35 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_MatchingLog">
|
||||
<attribute name="title">
|
||||
<string>Matching log</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_MatchingLog">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CModelMatcherLogComponent" name="comp_MatchingLog">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
@@ -92,6 +127,12 @@
|
||||
<extends>QTableView</extends>
|
||||
<header>blackgui/views/clientview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CModelMatcherLogComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/modelmatcherlogcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user