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

@@ -778,6 +778,16 @@ DockWidgetBase *DockWidgetBase::deserialize(const LayoutSaver::DockWidget::Ptr &
return dw;
}
void DockWidgetBase::setUserType(int userType)
{
d->m_userType = userType;
}
int DockWidgetBase::userType() const
{
return d->m_userType;
}
LayoutSaver::DockWidget::Ptr DockWidgetBase::Private::serialize() const
{
auto ptr = LayoutSaver::DockWidget::dockWidgetForName(q->uniqueName());
@@ -859,7 +869,6 @@ Frame *DockWidgetBase::Private::frame() const
return nullptr;
}
void DockWidgetBase::Private::saveLastFloatingGeometry()
{
if (q->isFloating() && q->isVisible()) {