Added DockWidgetBase::setUserType(int)

This is an opaque value which KDDW won't try to interpret or do
anything with it other than forward it to the FrameworkWidgetFactory.

Which if specialized by the user he can have different title bars
for different said "dock widget types"
This commit is contained in:
Sergio Martins
2021-02-28 18:45:56 +00:00
parent aa49ddacd5
commit 15e63381a9
13 changed files with 58 additions and 16 deletions

View File

@@ -410,6 +410,13 @@ public:
/// added bonus of remembering the requested geometry in case it's still hidden.
void setFloatingGeometry(QRect geo);
///@brief Allows the user to set a type on this dock widget
///The type is opaque and will not be interpreted by KDDockWidgets.
///This type is passed to FrameWorkWidgetFactory::createTitleBar(), which the user can override
///and return different TitleBar subclasses, depending on the type.
void setUserType(int userType);
int userType() const;
Q_SIGNALS:
#ifdef KDDOCKWIDGETS_QTWIDGETS
///@brief signal emitted when the parent changed