mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 00:25:35 +08:00
Ref T506, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
6a9bde5095
commit
eddaeddfc4
@@ -91,9 +91,9 @@ namespace BlackGui
|
|||||||
if (this->isVisibleWidget()) { return; }
|
if (this->isVisibleWidget()) { return; }
|
||||||
|
|
||||||
// select myself
|
// select myself
|
||||||
if (getParentInfoArea())
|
if (this->getParentInfoArea())
|
||||||
{
|
{
|
||||||
getParentInfoArea()->selectArea(this->getDockWidgetInfoArea());
|
this->getParentInfoArea()->selectArea(this->getDockWidgetInfoArea());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Corresponding dockable widget in info area
|
//! Corresponding dockable widget in info area
|
||||||
BlackGui::CDockWidgetInfoArea *getDockWidgetInfoArea() const { return m_parentDockableInfoArea; }
|
CDockWidgetInfoArea *getDockWidgetInfoArea() const { return m_parentDockableInfoArea; }
|
||||||
|
|
||||||
//! Has dock area?
|
//! Has dock area?
|
||||||
bool hasDockWidgetArea() const { return m_parentDockableInfoArea; }
|
bool hasDockWidgetArea() const { return m_parentDockableInfoArea; }
|
||||||
|
|
||||||
//! Corresponding dockable widget in info area
|
//! Corresponding dockable widget in info area
|
||||||
//! \remarks Usually set from CDockWidgetInfoArea when it is fully initialized
|
//! \remarks Usually set from CDockWidgetInfoArea when it is fully initialized
|
||||||
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget);
|
virtual bool setParentDockWidgetInfoArea(CDockWidgetInfoArea *parentDockableWidget);
|
||||||
|
|
||||||
//! The parent info area
|
//! The parent info area
|
||||||
CInfoArea *getParentInfoArea() const;
|
CInfoArea *getParentInfoArea() const;
|
||||||
@@ -67,7 +67,7 @@ namespace BlackGui
|
|||||||
virtual ~CEnableForDockWidgetInfoArea() {}
|
virtual ~CEnableForDockWidgetInfoArea() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BlackGui::CDockWidgetInfoArea *m_parentDockableInfoArea = nullptr; //!< my parent dockable widget
|
CDockWidgetInfoArea *m_parentDockableInfoArea = nullptr; //!< my parent dockable widget
|
||||||
BlackMisc::CConnectionGuard m_connections;
|
BlackMisc::CConnectionGuard m_connections;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -643,12 +643,12 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
if (!callsign.isAtcCallsign() && sGui->getIContextNetwork()->isAircraftInRange(callsign))
|
if (!callsign.isAtcCallsign() && sGui->getIContextNetwork()->isAircraftInRange(callsign))
|
||||||
{
|
{
|
||||||
// we assume a private message
|
// we assume a private message from a pilot
|
||||||
w = this->addNewTextMessageTab(callsign);
|
w = this->addNewTextMessageTab(callsign);
|
||||||
}
|
}
|
||||||
else if (sGui->getIContextNetwork()->isOnlineStation(callsign))
|
else if (sGui->getIContextNetwork()->isOnlineStation(callsign))
|
||||||
{
|
{
|
||||||
// we assume a private message
|
// we assume a private message of ATC
|
||||||
w = this->addNewTextMessageTab(callsign);
|
w = this->addNewTextMessageTab(callsign);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace BlackGui
|
|||||||
const bool hasContexts = sGui && sGui->supportsContexts();
|
const bool hasContexts = sGui && sGui->supportsContexts();
|
||||||
if (hasContexts)
|
if (hasContexts)
|
||||||
{
|
{
|
||||||
CSimulatedAircraft aircraft(this->selectedObject());
|
const CSimulatedAircraft aircraft(this->selectedObject());
|
||||||
Q_ASSERT(!aircraft.getCallsign().isEmpty());
|
Q_ASSERT(!aircraft.getCallsign().isEmpty());
|
||||||
menuActions.addMenuCom();
|
menuActions.addMenuCom();
|
||||||
menuActions.addAction(CIcons::appTextMessages16(), "Show text messages", CMenuAction::pathClientCom(), { this, &CSimulatedAircraftView::requestTextMessage });
|
menuActions.addAction(CIcons::appTextMessages16(), "Show text messages", CMenuAction::pathClientCom(), { this, &CSimulatedAircraftView::requestTextMessage });
|
||||||
|
|||||||
@@ -859,7 +859,7 @@ namespace BlackGui
|
|||||||
template <class T>
|
template <class T>
|
||||||
bool CViewBase<T>::filterDialogFinished(int status)
|
bool CViewBase<T>::filterDialogFinished(int status)
|
||||||
{
|
{
|
||||||
QDialog::DialogCode statusCode = static_cast<QDialog::DialogCode>(status);
|
const QDialog::DialogCode statusCode = static_cast<QDialog::DialogCode>(status);
|
||||||
return filterWidgetChangedFilter(statusCode == QDialog::Accepted);
|
return filterWidgetChangedFilter(statusCode == QDialog::Accepted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user