mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #368, function for mainWindow widgets in info area
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
*/
|
||||
|
||||
#include "enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
|
||||
using namespace BlackGui;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
@@ -64,5 +67,17 @@ namespace BlackGui
|
||||
return this->m_parentDockableInfoArea->isVisibleWidget();
|
||||
}
|
||||
|
||||
CEnableForFramelessWindow *CEnableForDockWidgetInfoArea::mainApplicationWindow() const
|
||||
{
|
||||
CEnableForFramelessWindow *mw = CGuiUtility::mainApplicationWindow();
|
||||
return mw;
|
||||
}
|
||||
|
||||
QWidget *CEnableForDockWidgetInfoArea::mainApplicationWindowWidget() const
|
||||
{
|
||||
CEnableForFramelessWindow *mw = this->mainApplicationWindow();
|
||||
return mw ? mw->getWidget() : nullptr;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
#ifndef BLACKGUI_ENABLEFORDOCKWIDGETINFOAREA_H
|
||||
#define BLACKGUI_ENABLEFORDOCKWIDGETINFOAREA_H
|
||||
|
||||
#include "../dockwidgetinfoarea.h"
|
||||
#include "../infoarea.h"
|
||||
#include "blackgui/dockwidgetinfoarea.h"
|
||||
#include "blackgui/infoarea.h"
|
||||
#include "blackgui/enableforframelesswindow.h"
|
||||
#include <QWidget>
|
||||
|
||||
namespace BlackGui
|
||||
@@ -48,6 +49,12 @@ namespace BlackGui
|
||||
//! \copydoc CDockWidgetInfoArea::isVisibleWidget
|
||||
bool isVisibleWidget() const;
|
||||
|
||||
//! Main application window if any
|
||||
BlackGui::CEnableForFramelessWindow *mainApplicationWindow() const;
|
||||
|
||||
//! Main application window widget if any
|
||||
QWidget *mainApplicationWindowWidget() const;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
//! \remarks Normally the infoa area will be provided later \sa setParentDockWidgetInfoArea
|
||||
|
||||
Reference in New Issue
Block a user