Add static function DockWidgetBase::byName()
So users don't have to use private API. Fixes issue #126
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
* v1.3.0 (unreleased)
|
* v1.3.0 (unreleased)
|
||||||
- [TODO] QtQuick support
|
- [TODO] QtQuick support
|
||||||
|
- Added static DockWidgetBase::byName() (#126)
|
||||||
|
|
||||||
* v1.2.1 (unreleased)
|
* v1.2.1 (unreleased)
|
||||||
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
||||||
|
|||||||
@@ -522,6 +522,11 @@ QSize DockWidgetBase::lastOverlayedSize() const
|
|||||||
return d->m_lastOverlayedSize;
|
return d->m_lastOverlayedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DockWidgetBase *DockWidgetBase::byName(const QString &uniqueName)
|
||||||
|
{
|
||||||
|
return DockRegistry::self()->dockByName(uniqueName);
|
||||||
|
}
|
||||||
|
|
||||||
FloatingWindow *DockWidgetBase::morphIntoFloatingWindow()
|
FloatingWindow *DockWidgetBase::morphIntoFloatingWindow()
|
||||||
{
|
{
|
||||||
qCDebug(creation) << "DockWidget::morphIntoFloatingWindow() this=" << this
|
qCDebug(creation) << "DockWidget::morphIntoFloatingWindow() this=" << this
|
||||||
|
|||||||
@@ -366,6 +366,12 @@ public:
|
|||||||
/// Empty otherwise
|
/// Empty otherwise
|
||||||
QSize lastOverlayedSize() const;
|
QSize lastOverlayedSize() const;
|
||||||
|
|
||||||
|
|
||||||
|
/// @brief Returns a dock widget by its name
|
||||||
|
/// This is the same name you passed to DockWidget CTOR.
|
||||||
|
/// nullptr is returned if the dock widget isn't found.
|
||||||
|
static DockWidgetBase* byName(const QString &uniqueName);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
///@brief signal emitted when the parent changed
|
///@brief signal emitted when the parent changed
|
||||||
void parentChanged();
|
void parentChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user