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