mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
Improved samples and debugging information
* DBus test for CSimulatedAircraft * Output of metatypes in GUI/core * Changed output from qDebug() to QTextStream * Variant test for CSimulatedAircraft
This commit is contained in:
@@ -243,8 +243,15 @@
|
||||
</property>
|
||||
<addaction name="menu_ReloadSettings"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Debug">
|
||||
<property name="title">
|
||||
<string>Debug</string>
|
||||
</property>
|
||||
<addaction name="menu_DebugMetaTypes"/>
|
||||
</widget>
|
||||
<addaction name="menu_PlanePositions"/>
|
||||
<addaction name="menu_Reload"/>
|
||||
<addaction name="menu_Debug"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Help">
|
||||
<property name="title">
|
||||
@@ -357,6 +364,11 @@
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_DebugMetaTypes">
|
||||
<property name="text">
|
||||
<string>Meta types (to console)</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
||||
@@ -157,6 +157,7 @@ void SwiftGuiStd::initGuiSignals()
|
||||
connect(this->ui->menu_FileResetSettings, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(this->ui->menu_FileReloadStyleSheets, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(this->ui->menu_FileFont, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(this->ui->menu_DebugMetaTypes, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
|
||||
// command line / text messages
|
||||
connect(this->ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::displayInInfoWindow, this->m_compInfoWindow, &CInfoWindowComponent::display);
|
||||
|
||||
@@ -66,6 +66,13 @@ void SwiftGuiStd::ps_onMenuClicked()
|
||||
Q_ASSERT(this->getIContextSettings());
|
||||
this->getIContextSettings()->reset(true);
|
||||
}
|
||||
else if (sender == this->ui->menu_DebugMetaTypes)
|
||||
{
|
||||
QString metadata;
|
||||
QTextStream stream(&metadata);
|
||||
BlackMisc::displayAllUserMetatypesTypes(stream);
|
||||
this->ui->comp_MainInfoArea->getLogComponent()->appendPlainTextToConsole(metadata);
|
||||
}
|
||||
}
|
||||
|
||||
void SwiftGuiStd::initDynamicMenus()
|
||||
|
||||
Reference in New Issue
Block a user