Added DockWidgetBase::isOverlayed()
This commit is contained in:
@@ -497,6 +497,14 @@ void DockWidgetBase::moveToSideBar()
|
||||
}
|
||||
}
|
||||
|
||||
bool DockWidgetBase::isOverlayed() const
|
||||
{
|
||||
if (MainWindowBase *m = mainWindow())
|
||||
return m->overlayedDockWidget() == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
FloatingWindow *DockWidgetBase::morphIntoFloatingWindow()
|
||||
{
|
||||
qCDebug(creation) << "DockWidget::morphIntoFloatingWindow() this=" << this
|
||||
|
||||
@@ -349,6 +349,10 @@ public:
|
||||
*/
|
||||
void moveToSideBar();
|
||||
|
||||
/// @brief Returns whether this dock widget is overlayed on top of the main window, instead of
|
||||
/// docked into the layout. This is only relevant when using the auto-hide and side-bar feature.
|
||||
bool isOverlayed() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
///@brief signal emitted when the parent changed
|
||||
void parentChanged();
|
||||
|
||||
@@ -293,6 +293,11 @@ SideBar *MainWindowBase::sideBarForDockWidget(DockWidgetBase *dw) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DockWidgetBase *MainWindowBase::overlayedDockWidget() const
|
||||
{
|
||||
return d->m_overlayedDockWidget;
|
||||
}
|
||||
|
||||
void MainWindowBase::setUniqueName(const QString &uniqueName)
|
||||
{
|
||||
if (uniqueName.isEmpty())
|
||||
|
||||
@@ -155,6 +155,10 @@ public:
|
||||
/// @brief Returns the sidebar this dockwidget is in. nullptr if not in any.
|
||||
SideBar * sideBarForDockWidget(DockWidgetBase *) const;
|
||||
|
||||
/// @brief returns the dock widget which is currently overlayed. nullptr if none.
|
||||
/// This is only relevant when using the auto-hide and side-bar feature.
|
||||
DockWidgetBase *overlayedDockWidget() const;
|
||||
|
||||
protected:
|
||||
void setUniqueName(const QString &uniqueName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user