Ref T256, added foreign window utility functions

This commit is contained in:
Klaus Basan
2018-02-18 01:04:53 +01:00
parent 2bbc433d30
commit e93cfd3c25
2 changed files with 65 additions and 18 deletions

View File

@@ -13,7 +13,7 @@
#define BLACKGUI_FOREIGNWINDOWS_H
#include "blackgui/blackguiexport.h"
#include "blackmisc/simulation/simulatorinfo.h"
#include <QScopedPointer>
class QWidget;
@@ -26,23 +26,32 @@ namespace BlackGui
//! Foreign windows
class BLACKGUI_EXPORT CForeignWindows
{
public:
//! FS9 window
static QWindow *getFS9Window();
//! FSX window
static QWindow *getFSXWindow();
//! P3D window
static QWindow *getP3DWindow();
//! X-Plane window
static QWindow *getXPlaneWindow();
//! First simulator window found
static QWindow *getFirstFoundSimulatorWindow();
//! Simulator window
static QWindow *getSimulatorWindow(const BlackMisc::Simulation::CSimulatorInfo &simulator);
//! Set simulator as transient parent for child widget
static void setSimulatorAsParent(QWindow *simulatorWindow, QWidget *child);
static bool setSimulatorAsParent(QWindow *simulatorWindow, QWidget *child);
//! Unset the parent
static bool unsetSimulatorAsParent(QWidget *child);
private:
//! Constructor, use static methods only
CForeignWindows() {}