Skip to content

Commit d5ffd8f

Browse files
Removed debug output
1 parent 296c7ed commit d5ffd8f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

demo/MainWindow.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,14 @@ void MainWindowPrivate::createActions()
544544
_this->connect(a, SIGNAL(triggered()), SLOT(createEditor()));
545545
ui.menuTests->addAction(a);
546546

547+
a = ui.toolBar->addAction("Create Editor Tab");
548+
a->setProperty("Floating", false);
549+
a->setToolTip("Creates a editor tab and inserts it as second tab into an area");
550+
a->setIcon(svgIcon(":/adsdemo/images/tab.svg"));
551+
a->setProperty("Tabbed", true);
552+
_this->connect(a, SIGNAL(triggered()), SLOT(createEditor()));
553+
ui.menuTests->addAction(a);
554+
547555
a = ui.toolBar->addAction("Create Floating Table");
548556
a->setToolTip("Creates floating dynamic dockable table with millions of entries");
549557
a->setIcon(svgIcon(":/adsdemo/images/grid_on.svg"));
@@ -769,6 +777,8 @@ void CMainWindow::createEditor()
769777
QObject* Sender = sender();
770778
QVariant vFloating = Sender->property("Floating");
771779
bool Floating = vFloating.isValid() ? vFloating.toBool() : true;
780+
QVariant vTabbed = Sender->property("Tabbed");
781+
bool Tabbed = vTabbed.isValid() ? vTabbed.toBool() : true;
772782
auto DockWidget = d->createEditorWidget();
773783
DockWidget->setFeature(ads::CDockWidget::DockWidgetDeleteOnClose, true);
774784
DockWidget->setFeature(ads::CDockWidget::DockWidgetForceCloseWithArea, true);
@@ -786,16 +796,13 @@ void CMainWindow::createEditor()
786796
ads::CDockAreaWidget* EditorArea = d->LastDockedEditor ? d->LastDockedEditor->dockAreaWidget() : nullptr;
787797
if (EditorArea)
788798
{
789-
std::cout << "DockAreaCount before: " << EditorArea->dockContainer()->dockAreaCount() << std::endl;
790799
d->DockManager->setConfigFlag(ads::CDockManager::EqualSplitOnInsertion, true);
791800
d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, EditorArea);
792-
std::cout << "DockAreaCount after: " << DockWidget->dockContainer()->dockAreaCount() << std::endl;
793801
}
794802
else
795803
{
796804
if (d->LastCreatedFloatingEditor)
797805
{
798-
std::cout << "LastCreated" << std::endl;
799806
d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, d->LastCreatedFloatingEditor->dockAreaWidget());
800807
}
801808
else

demo/demo.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<file>images/create_floating_editor.svg</file>
1818
<file>images/create_floating_table.svg</file>
1919
<file>images/docked_editor.svg</file>
20+
<file>images/tab.svg</file>
2021
</qresource>
2122
</RCC>

0 commit comments

Comments
 (0)