mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Fixed / tweaks as result of testing after merge with RW's stuff
* fixed wrong channel for received prviate messages * allow to minimize window * fixed sort coumn indicator for simulated aircraft
This commit is contained in:
@@ -259,7 +259,7 @@ namespace BlackGui
|
||||
void CTextMessageComponent::addPrivateChannelTextMessage(const CTextMessage &textMessage)
|
||||
{
|
||||
if (!textMessage.isPrivateMessage()) { return; }
|
||||
CCallsign cs = textMessage.getRecipientCallsign();
|
||||
CCallsign cs = textMessage.wasSent() ? textMessage.getRecipientCallsign() : textMessage.getSenderCallsign();
|
||||
if (cs.isEmpty()) { return; }
|
||||
QWidget *tab = this->findTextMessageTabByCallsign(cs);
|
||||
if (tab == nullptr) { tab = this->addNewTextMessageTab(cs); }
|
||||
@@ -346,6 +346,7 @@ namespace BlackGui
|
||||
if (!this->isVisible()) { return; }
|
||||
|
||||
QString cl(this->ui->le_textMessages->text().trimmed().simplified());
|
||||
this->ui->le_textMessages->clear();
|
||||
this->handleEnteredTextMessage(cl);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ namespace BlackGui
|
||||
|
||||
void CSimulatedAircraftView::setAircraftMode(CSimulatedAircraftListModel::AircraftMode mode)
|
||||
{
|
||||
Q_ASSERT(this->m_model);
|
||||
this->m_model->setAircraftMode(mode);
|
||||
this->setSortIndicator();
|
||||
}
|
||||
|
||||
void CSimulatedAircraftView::customMenu(QMenu &menu) const
|
||||
|
||||
@@ -224,10 +224,7 @@ private slots:
|
||||
//! Update timer
|
||||
void ps_handleTimerBasedUpdates();
|
||||
|
||||
/*!
|
||||
* \brief changeOpacity
|
||||
* \param opacity 0-100
|
||||
*/
|
||||
//! Change opacity 0-100
|
||||
void ps_onChangedWindowOpacity(int opacity = -1);
|
||||
|
||||
//! Toogle Windows stay on top
|
||||
@@ -244,6 +241,7 @@ private slots:
|
||||
|
||||
//! Whole main info area floating
|
||||
void ps_onChangedMainInfoAreaFloating(bool floating);
|
||||
|
||||
};
|
||||
|
||||
#pragma pop_macro("interface")
|
||||
|
||||
@@ -290,7 +290,6 @@
|
||||
<addaction name="menu_FileSettingsDirectory"/>
|
||||
<addaction name="menu_FileResetSettings"/>
|
||||
<addaction name="menu_FileReloadStyleSheets"/>
|
||||
<addaction name="menu_FileFont"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menu_FileClose"/>
|
||||
</widget>
|
||||
@@ -299,7 +298,15 @@
|
||||
<string>Info areas</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuWindow">
|
||||
<property name="title">
|
||||
<string>Window</string>
|
||||
</property>
|
||||
<addaction name="menu_WindowFont"/>
|
||||
<addaction name="menu_WindowMinimize"/>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
<addaction name="menuWindow"/>
|
||||
<addaction name="menu_InfoAreas"/>
|
||||
<addaction name="menu_Help"/>
|
||||
<addaction name="menu_Test"/>
|
||||
@@ -384,7 +391,7 @@
|
||||
<string>Reload style sheets</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_FileFont">
|
||||
<action name="menu_WindowFont">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
@@ -404,6 +411,14 @@
|
||||
<string>Internals</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="menu_WindowMinimize">
|
||||
<property name="text">
|
||||
<string>Minimize</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+W, Ctrl+M</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
||||
@@ -156,7 +156,8 @@ void SwiftGuiStd::initGuiSignals()
|
||||
connect(this->ui->menu_FileSettingsDirectory, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
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_WindowFont, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(this->ui->menu_WindowMinimize, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
connect(this->ui->menu_DebugMetaTypes, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
|
||||
// command line / text messages
|
||||
|
||||
@@ -63,11 +63,15 @@ void SwiftGuiStd::ps_onMenuClicked()
|
||||
{
|
||||
CStyleSheetUtility::instance().read();
|
||||
}
|
||||
else if (sender == this->ui->menu_FileFont)
|
||||
else if (sender == this->ui->menu_WindowFont)
|
||||
{
|
||||
this->ps_setMainPageToInfoArea();
|
||||
this->ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui);
|
||||
}
|
||||
else if (sender == this->ui->menu_WindowMinimize)
|
||||
{
|
||||
this->showMinimized();
|
||||
}
|
||||
else if (sender == this->ui->menu_FileClose)
|
||||
{
|
||||
CLogMessage(this).info("Closing");
|
||||
@@ -98,3 +102,4 @@ void SwiftGuiStd::initDynamicMenus()
|
||||
Q_ASSERT(this->ui->comp_MainInfoArea);
|
||||
this->ui->menu_InfoAreas->addActions(this->ui->comp_MainInfoArea->getInfoAreaSelectActions(this->ui->menu_InfoAreas));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user