From d5ffd8f6a7518aa888ce0d48752e6917bb33c6aa Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Mon, 14 Nov 2022 14:56:06 +0100 Subject: [PATCH] Removed debug output --- demo/MainWindow.cpp | 13 ++++++++++--- demo/demo.qrc | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/demo/MainWindow.cpp b/demo/MainWindow.cpp index 6d8d0c9..f4d07cd 100644 --- a/demo/MainWindow.cpp +++ b/demo/MainWindow.cpp @@ -544,6 +544,14 @@ void MainWindowPrivate::createActions() _this->connect(a, SIGNAL(triggered()), SLOT(createEditor())); ui.menuTests->addAction(a); + a = ui.toolBar->addAction("Create Editor Tab"); + a->setProperty("Floating", false); + a->setToolTip("Creates a editor tab and inserts it as second tab into an area"); + a->setIcon(svgIcon(":/adsdemo/images/tab.svg")); + a->setProperty("Tabbed", true); + _this->connect(a, SIGNAL(triggered()), SLOT(createEditor())); + ui.menuTests->addAction(a); + a = ui.toolBar->addAction("Create Floating Table"); a->setToolTip("Creates floating dynamic dockable table with millions of entries"); a->setIcon(svgIcon(":/adsdemo/images/grid_on.svg")); @@ -769,6 +777,8 @@ void CMainWindow::createEditor() QObject* Sender = sender(); QVariant vFloating = Sender->property("Floating"); bool Floating = vFloating.isValid() ? vFloating.toBool() : true; + QVariant vTabbed = Sender->property("Tabbed"); + bool Tabbed = vTabbed.isValid() ? vTabbed.toBool() : true; auto DockWidget = d->createEditorWidget(); DockWidget->setFeature(ads::CDockWidget::DockWidgetDeleteOnClose, true); DockWidget->setFeature(ads::CDockWidget::DockWidgetForceCloseWithArea, true); @@ -786,16 +796,13 @@ void CMainWindow::createEditor() ads::CDockAreaWidget* EditorArea = d->LastDockedEditor ? d->LastDockedEditor->dockAreaWidget() : nullptr; if (EditorArea) { - std::cout << "DockAreaCount before: " << EditorArea->dockContainer()->dockAreaCount() << std::endl; d->DockManager->setConfigFlag(ads::CDockManager::EqualSplitOnInsertion, true); d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, EditorArea); - std::cout << "DockAreaCount after: " << DockWidget->dockContainer()->dockAreaCount() << std::endl; } else { if (d->LastCreatedFloatingEditor) { - std::cout << "LastCreated" << std::endl; d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, d->LastCreatedFloatingEditor->dockAreaWidget()); } else diff --git a/demo/demo.qrc b/demo/demo.qrc index cabf109..a097571 100644 --- a/demo/demo.qrc +++ b/demo/demo.qrc @@ -17,5 +17,6 @@ images/create_floating_editor.svg images/create_floating_table.svg images/docked_editor.svg + images/tab.svg