mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-12 16:20:25 +08:00
add set size to allow the user to set a size for the pinned widget manually
This commit is contained in:
parent
85da93c2fe
commit
c2bd56e2e9
@ -322,7 +322,7 @@ CDockAreaWidget* CAutoHideDockContainer::dockAreaWidget() const
|
|||||||
void CAutoHideDockContainer::moveContentsToParent()
|
void CAutoHideDockContainer::moveContentsToParent()
|
||||||
{
|
{
|
||||||
cleanupAndDelete();
|
cleanupAndDelete();
|
||||||
// If we unpin the auto hide tock widget, then we insert it into the same
|
// If we unpin the auto hide dock widget, then we insert it into the same
|
||||||
// location like it had as a auto hide widget. This brings the least surprise
|
// location like it had as a auto hide widget. This brings the least surprise
|
||||||
// to the user and he does not have to search where the widget was inserted.
|
// to the user and he does not have to search where the widget was inserted.
|
||||||
parentContainer()->addDockWidget(d->getDockWidgetArea(d->SideTabBarArea), d->DockWidget);
|
parentContainer()->addDockWidget(d->getDockWidgetArea(d->SideTabBarArea), d->DockWidget);
|
||||||
@ -439,6 +439,12 @@ void CAutoHideDockContainer::toggleCollapseState()
|
|||||||
collapseView(isVisible());
|
collapseView(isVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAutoHideDockContainer::setSize(int width, int height)
|
||||||
|
{
|
||||||
|
d->Size = QSize(width, height);
|
||||||
|
updateSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
|
bool CAutoHideDockContainer::eventFilter(QObject* watched, QEvent* event)
|
||||||
|
@ -144,6 +144,13 @@ public:
|
|||||||
* Toggles the current collapse state
|
* Toggles the current collapse state
|
||||||
*/
|
*/
|
||||||
void toggleCollapseState();
|
void toggleCollapseState();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this instead of resize. This will ensure the size is consistent internally.
|
||||||
|
* E.g. If you set a height less than the parent height when it's vertical
|
||||||
|
* It will simply be rescaled to the parent height while the width will be resized
|
||||||
|
*/
|
||||||
|
void setSize(int width, int height);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,6 @@ struct DockWidgetPrivate
|
|||||||
QList<QAction*> TitleBarActions;
|
QList<QAction*> TitleBarActions;
|
||||||
CDockWidget::eMinimumSizeHintMode MinimumSizeHintMode = CDockWidget::MinimumSizeHintFromDockWidget;
|
CDockWidget::eMinimumSizeHintMode MinimumSizeHintMode = CDockWidget::MinimumSizeHintFromDockWidget;
|
||||||
WidgetFactory* Factory = nullptr;
|
WidgetFactory* Factory = nullptr;
|
||||||
double DefaultAutoHideDockProportion = 0.25;
|
|
||||||
CDockWidget::eAutoHideInsertOrder AutoHideInsertOrder = CDockWidget::Last;
|
CDockWidget::eAutoHideInsertOrder AutoHideInsertOrder = CDockWidget::Last;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1131,20 +1130,6 @@ bool CDockWidget::isCurrentTab() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
void CDockWidget::setDefaultAutoHideDockProportion(float Proportion)
|
|
||||||
{
|
|
||||||
d->DefaultAutoHideDockProportion = Proportion;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
|
||||||
float CDockWidget::DefaultAutoHideDockProportion() const
|
|
||||||
{
|
|
||||||
return d->DefaultAutoHideDockProportion;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockWidget::setAutoHideInsertOrder(eAutoHideInsertOrder insertOrder)
|
void CDockWidget::setAutoHideInsertOrder(eAutoHideInsertOrder insertOrder)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user