6 #ifndef STDGUI_SWIFTGUISTD_H
7 #define STDGUI_SWIFTGUISTD_H
11 #include <QScopedPointer>
21 #include "gui/mainwindowaccess.h"
42 namespace swift::misc::aviation
48 class CDbLoadDataDialog;
49 class CAutoPublishDialog;
50 class CModelBrowserDialog;
74 MainPageInternals = 2,
103 virtual void closeEvent(QCloseEvent *event)
override;
120 QScopedPointer<Ui::SwiftGuiStd> ui;
121 QScopedPointer<swift::gui::components::CNavigatorDialog> m_navigator {
124 QScopedPointer<swift::gui::components::CDbLoadDataDialog> m_dbLoadDialog;
125 QScopedPointer<swift::gui::components::CAutoPublishDialog> m_autoPublishDialog;
126 QScopedPointer<swift::gui::components::CModelBrowserDialog> m_modelBrower;
127 QScopedPointer<swift::gui::components::CAircraftModelSetValidationDialog>
131 swift::misc::CIcons::StandardIconRadio16,
this, &SwiftGuiStd::onPttChanged };
139 static constexpr
int MaxCoreFailures = 5;
140 int m_coreFailures = 0;
142 bool m_coreAvailable =
false;
143 bool m_contextNetworkAvailable =
false;
144 bool m_contextAudioAvailable =
false;
145 bool m_displayingDBusReconnect =
false;
146 bool m_dbDataLoading =
false;
147 QTimer m_timerContextWatchdog;
151 void updateGuiStatusInformation();
154 void initStyleSheet();
157 void initialContextDataReads();
163 void initGuiSignals();
169 void performGracefulShutdown();
172 void setAudioDeviceLists();
175 void setContextAvailability();
181 void setTestPosition(
const QString &wgsLatitude,
const QString &wgsLongitude,
191 void stopAllTimers(
bool disconnectSignalSlots);
200 void displayNetworkSettings();
203 void displayDBusReconnectDialog();
206 void onPttChanged(
bool enabled);
213 bool reloadOwnAircraft();
226 void setMainPageToInfoArea() { this->setMainPage(MainPageInfoArea); }
235 void setSettingsPage(
int settingsTabIndex = -1);
238 void loginRequested();
241 void onMenuClicked();
244 void onKickedFromNetwork(
const QString &kickMessage);
247 void handleTimerBasedUpdates();
250 void onChangedWindowOpacityTo50(
bool) { onChangedWindowOpacity(50); }
253 void onChangedWindowOpacityTo100(
bool) { onChangedWindowOpacity(100); }
256 void onChangedWindowOpacity(
int opacity = -1);
260 void toggleWindowStayOnTop();
264 void toggleWindowVisibility();
267 void onStyleSheetsChanged();
270 void onToggledWindowsOnTop(
bool onTop);
273 void onCurrentMainWidgetChanged(
int currentIndex);
276 void onChangedMainInfoAreaFloating(
bool floating);
282 void focusInMainEntryField();
285 void focusInTextMessageEntryField();
288 void showMinimized();
294 void onNavigatorClosed();
297 void verifyPrerequisites();
306 void displayValidationDialog();
309 void checkDbDataLoaded();
312 int autoPublishDialog();
315 bool triggerAutoPublishDialog();
318 bool startModelBrowser();
virtual void mousePressEvent(QMouseEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event)
void currentMainInfoAreaChanged(const QWidget *currentWidget)
Main info area has changed.
QAction * getToggleStayOnTopAction(QObject *parent)
Get a minimize action which minimizes the window.
SwiftGuiStd(WindowMode windowMode, QWidget *parent=nullptr)
Constructor.
virtual ~SwiftGuiStd()
Destructor.
QAction * getToggleWindowVisibilityAction(QObject *parent)
Get a minimize action which minimizes the window.
virtual void closeEvent(QCloseEvent *event)
MainPageIndex
Main page indexes.
QAction * getWindowNormalAction(QObject *parent)
Get a minimize action which minimizes the window.
QAction * getWindowMinimizeAction(QObject *parent)
Get a minimize action which minimizes the window.
virtual void changeEvent(QEvent *event)
virtual void mouseReleaseEvent(QMouseEvent *event)
CActionBind binds a member function to an action.
Main window which can be frameless.
Direct acccess to main window`s status bar, info bar and such.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Allows distributed access to the log messages of a central CLogHistory.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Altitude as used in aviation, can be AGL or MSL altitude.
Value object encapsulating information of a callsign.
Value object encapsulating information about a connection status.
Value object encapsulating a list of aircraft models.
Comprehensive information of an aircraft.
Simple hardcoded info about the corresponding simulator.
QList< CActionBinding > CActionBindings
List of bindings.
High level reusable GUI components.
NotificationFlag
Play notification.