mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 07:21:32 +08:00
Some smal improvements in FloatingDockContainer
This commit is contained in:
parent
1dfabb3bef
commit
268f8655a1
@ -177,13 +177,13 @@ void MainWindowPrivate::createContent()
|
||||
DockWidget->setFeature(ads::CDockWidget::DockWidgetClosable, false);
|
||||
DockManager->addDockWidget(ads::LeftDockWidgetArea, DockWidget);
|
||||
DockManager->addDockWidget(ads::LeftDockWidgetArea, createLongTextLabelDockWidget(ViewMenu));
|
||||
/*auto FileSystemWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
auto FileSystemWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
auto ToolBar = FileSystemWidget->toolBar();
|
||||
ToolBar->addAction(ui.actionSaveState);
|
||||
ToolBar->addAction(ui.actionRestoreState);
|
||||
DockManager->addDockWidget(ads::BottomDockWidgetArea, FileSystemWidget);*/
|
||||
DockManager->addDockWidget(ads::BottomDockWidgetArea, FileSystemWidget);
|
||||
|
||||
/*FileSystemWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
FileSystemWidget = createFileSystemTreeDockWidget(ViewMenu);
|
||||
ToolBar = FileSystemWidget->toolBar();
|
||||
ToolBar->addAction(ui.actionSaveState);
|
||||
ToolBar->addAction(ui.actionRestoreState);
|
||||
@ -198,7 +198,7 @@ void MainWindowPrivate::createContent()
|
||||
DockManager->addDockWidget(ads::TopDockWidgetArea, createLongTextLabelDockWidget(ViewMenu), RighDockArea);
|
||||
auto BottomDockArea = DockManager->addDockWidget(ads::BottomDockWidgetArea, createLongTextLabelDockWidget(ViewMenu), RighDockArea);
|
||||
DockManager->addDockWidget(ads::RightDockWidgetArea, createLongTextLabelDockWidget(ViewMenu), RighDockArea);
|
||||
DockManager->addDockWidget(ads::CenterDockWidgetArea, createLongTextLabelDockWidget(ViewMenu), BottomDockArea);*/
|
||||
DockManager->addDockWidget(ads::CenterDockWidgetArea, createLongTextLabelDockWidget(ViewMenu), BottomDockArea);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "DockWidget.h"
|
||||
#include "DockOverlay.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace ads
|
||||
{
|
||||
@ -332,13 +333,11 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
|
||||
//============================================================================
|
||||
void CFloatingDockContainer::hideEvent(QHideEvent *event)
|
||||
{
|
||||
qDebug() << "CFloatingDockContainer hideEvent";
|
||||
std::cout << "CFloatingDockContainer hideEvent" << std::endl;
|
||||
QWidget::hideEvent(event);
|
||||
auto OpenDockAreas = d->DockContainer->openedDockAreas();
|
||||
for (auto DockArea : OpenDockAreas)
|
||||
for (auto DockArea : d->DockContainer->openedDockAreas())
|
||||
{
|
||||
auto OpenDockWidgets = DockArea->openedDockWidgets();
|
||||
for (auto DockWidget : OpenDockWidgets)
|
||||
for (auto DockWidget : DockArea->openedDockWidgets())
|
||||
{
|
||||
DockWidget->toggleView(false);
|
||||
}
|
||||
@ -349,15 +348,22 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
|
||||
//============================================================================
|
||||
void CFloatingDockContainer::showEvent(QShowEvent *event)
|
||||
{
|
||||
std::cout << "CFloatingDockContainer showEvent" << std::endl;
|
||||
QWidget::showEvent(event);
|
||||
CDockContainerWidget* DockContainer = dockContainer();
|
||||
for (int i = 0; i < DockContainer->dockAreaCount(); ++i)
|
||||
/*for (int i = 0; i < DockContainer->dockAreaCount(); ++i)
|
||||
{
|
||||
auto DockArea = DockContainer->dockArea(i);
|
||||
for (auto DockWidget : DockArea->openedDockWidgets())
|
||||
{
|
||||
DockWidget->setToggleViewActionChecked(true);
|
||||
}
|
||||
}*/
|
||||
for (auto DockArea : d->DockContainer->openedDockAreas())
|
||||
{
|
||||
for (auto DockWidget : DockArea->openedDockWidgets())
|
||||
{
|
||||
DockWidget->setToggleViewActionChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user