mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-12 16:20:25 +08:00
Some small changes
This commit is contained in:
parent
da9062ef62
commit
2d67e9e1e5
@ -107,7 +107,7 @@ struct AutoHideDockContainerPrivate
|
|||||||
SideBarLocation SideTabBarArea;
|
SideBarLocation SideTabBarArea;
|
||||||
QBoxLayout* Layout;
|
QBoxLayout* Layout;
|
||||||
CResizeHandle* ResizeHandle = nullptr;
|
CResizeHandle* ResizeHandle = nullptr;
|
||||||
QSize Size;
|
QSize Size; // creates invalid size
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private data constructor
|
* Private data constructor
|
||||||
@ -194,6 +194,7 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, SideBa
|
|||||||
d->Layout->insertWidget(resizeHandleLayoutPosition(area), d->ResizeHandle);
|
d->Layout->insertWidget(resizeHandleLayoutPosition(area), d->ResizeHandle);
|
||||||
d->Size = d->DockArea->size();
|
d->Size = d->DockArea->size();
|
||||||
|
|
||||||
|
|
||||||
updateSize();
|
updateSize();
|
||||||
parent->registerAutoHideWidget(this);
|
parent->registerAutoHideWidget(this);
|
||||||
}
|
}
|
||||||
@ -212,6 +213,7 @@ void CAutoHideDockContainer::updateSize()
|
|||||||
{
|
{
|
||||||
auto dockContainerParent = parentContainer();
|
auto dockContainerParent = parentContainer();
|
||||||
auto rect = dockContainerParent->contentRect();
|
auto rect = dockContainerParent->contentRect();
|
||||||
|
qDebug() << "Size " << d->Size;
|
||||||
|
|
||||||
switch (sideTabBarArea())
|
switch (sideTabBarArea())
|
||||||
{
|
{
|
||||||
@ -343,6 +345,9 @@ void CAutoHideDockContainer::saveState(QXmlStreamWriter& s)
|
|||||||
{
|
{
|
||||||
s.writeAttribute("SideTabBarArea", QString::number(sideTabBarArea()));
|
s.writeAttribute("SideTabBarArea", QString::number(sideTabBarArea()));
|
||||||
s.writeAttribute("Size", QString::number(d->isHorizontal() ? d->Size.height() : d->Size.width()));
|
s.writeAttribute("Size", QString::number(d->isHorizontal() ? d->Size.height() : d->Size.width()));
|
||||||
|
|
||||||
|
qDebug() << ": saveState Size: " << d->Size;
|
||||||
|
qDebug() << ": saveState Size " << QString::number(d->isHorizontal() ? d->Size.height() : d->Size.width());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -368,8 +373,10 @@ bool CAutoHideDockContainer::restoreState(CDockingStateReader& s, bool Testing)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
d->Size.setWidth(Size);
|
d->Size.setWidth(Size);
|
||||||
|
qDebug() << ": restoreState Width " << Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << ": restoreState Size: " << d->Size;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,6 @@ CDockAreaTabBar::CDockAreaTabBar(CDockAreaWidget* parent) :
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
CDockAreaTabBar::~CDockAreaTabBar()
|
CDockAreaTabBar::~CDockAreaTabBar()
|
||||||
{
|
{
|
||||||
qDebug() << "~CDockAreaTabBar count " << count();
|
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,9 +117,6 @@ public:
|
|||||||
* returns the dock widget this belongs to
|
* returns the dock widget this belongs to
|
||||||
*/
|
*/
|
||||||
CDockWidget* dockWidget() const;
|
CDockWidget* dockWidget() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void elidedChanged(bool elided);
|
|
||||||
}; // class DockWidgetSideTab
|
}; // class DockWidgetSideTab
|
||||||
}
|
}
|
||||||
// namespace ads
|
// namespace ads
|
||||||
|
@ -352,7 +352,6 @@ CDockWidgetTab::CDockWidgetTab(CDockWidget* DockWidget, QWidget *parent) :
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
CDockWidgetTab::~CDockWidgetTab()
|
CDockWidgetTab::~CDockWidgetTab()
|
||||||
{
|
{
|
||||||
qDebug() << "~CDockWidgetTab " << text();
|
|
||||||
ADS_PRINT("~CDockWidgetTab()");
|
ADS_PRINT("~CDockWidgetTab()");
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user