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