diff --git a/README.md b/README.md index d4ae02c..7b30737 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ of his docking system project. - [Qt Creator IDE](#qt-creator-ide) - [Qt Design Studio](#qt-design-studio) - [QmixElements](#qmixelements) + - [ezEditor](#ezeditor) ### Docking everywhere - no central widget @@ -304,3 +305,11 @@ plugin-based and modular laboratory automation software for controlling CETONI d Advanced Docking System in the QmixElements sofware. ![QmixElements](doc/qmix_elements.png) + +### [ezEditor](https://github.com/ezEngine/ezEngine) + +The ezEditor is a full blown graphical editor used for editing scenes and +importing and authoring assets for the [ezEngine](https://github.com/ezEngine/ezEngine) - +an open source C++ game engine in active development. + +![ezEditor](doc/ezEngine_editor.png) diff --git a/demo/StatusDialog.h b/demo/StatusDialog.h index 07d82bd..977fe82 100644 --- a/demo/StatusDialog.h +++ b/demo/StatusDialog.h @@ -23,7 +23,7 @@ class CStatusDialog : public QDialog Q_OBJECT private: StatusDialogPrivate* d; ///< private data (pimpl) - friend class StatusDialogPrivate; + friend struct StatusDialogPrivate; private slots: void on_dockWidgetsComboBox_currentIndexChanged(int index); diff --git a/doc/ezEngine_editor.png b/doc/ezEngine_editor.png new file mode 100644 index 0000000..98df567 Binary files /dev/null and b/doc/ezEngine_editor.png differ diff --git a/examples/sidebar/MainWindow.h b/examples/sidebar/MainWindow.h index bb6148f..5e2cd8c 100644 --- a/examples/sidebar/MainWindow.h +++ b/examples/sidebar/MainWindow.h @@ -4,10 +4,11 @@ #include #include "DockManager.h" +QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } - +QT_END_NAMESPACE /** * This example shows, how to place a dock widget container and a static diff --git a/examples/simple/MainWindow.h b/examples/simple/MainWindow.h index 462d4f6..8d90885 100644 --- a/examples/simple/MainWindow.h +++ b/examples/simple/MainWindow.h @@ -4,9 +4,11 @@ #include #include "DockManager.h" +QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } +QT_END_NAMESPACE class MainWindow : public QMainWindow { diff --git a/src/DockAreaTitleBar.h b/src/DockAreaTitleBar.h index 2a4505f..426e07a 100644 --- a/src/DockAreaTitleBar.h +++ b/src/DockAreaTitleBar.h @@ -34,7 +34,7 @@ #include "ads_globals.h" -class QAbstractButton; +QT_FORWARD_DECLARE_CLASS(QAbstractButton) namespace ads { diff --git a/src/DockAreaWidget.h b/src/DockAreaWidget.h index 50ccd01..16f42d7 100644 --- a/src/DockAreaWidget.h +++ b/src/DockAreaWidget.h @@ -35,8 +35,8 @@ #include "ads_globals.h" #include "DockWidget.h" -class QXmlStreamWriter; -class QAbstractButton; +QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter) +QT_FORWARD_DECLARE_CLASS(QAbstractButton) namespace ads { diff --git a/src/DockContainerWidget.h b/src/DockContainerWidget.h index c9a764f..8f1b04c 100644 --- a/src/DockContainerWidget.h +++ b/src/DockContainerWidget.h @@ -35,7 +35,7 @@ #include "ads_globals.h" #include "DockWidget.h" -class QXmlStreamWriter; +QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter) namespace ads diff --git a/src/DockManager.h b/src/DockManager.h index ec9bc74..e0983fb 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -36,8 +36,8 @@ #include "FloatingDockContainer.h" -class QSettings; -class QMenu; +QT_FORWARD_DECLARE_CLASS(QSettings) +QT_FORWARD_DECLARE_CLASS(QMenu) namespace ads { diff --git a/src/DockOverlay.h b/src/DockOverlay.h index 3cb87aa..88905e0 100644 --- a/src/DockOverlay.h +++ b/src/DockOverlay.h @@ -26,10 +26,11 @@ #include #include #include -class QGridLayout; #include "ads_globals.h" +QT_FORWARD_DECLARE_CLASS(QGridLayout) + namespace ads { struct DockOverlayPrivate; diff --git a/src/DockWidget.h b/src/DockWidget.h index d66d769..15f58d3 100644 --- a/src/DockWidget.h +++ b/src/DockWidget.h @@ -34,8 +34,8 @@ #include "ads_globals.h" -class QToolBar; -class QXmlStreamWriter; +QT_FORWARD_DECLARE_CLASS(QToolBar) +QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter) namespace ads { diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index c5bab75..18e7bfa 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -68,6 +68,7 @@ struct FloatingDockContainerPrivate CDockContainerWidget *DropContainer = nullptr; CDockAreaWidget *SingleDockArea = nullptr; QPoint DragStartPos; + bool Hiding = false; #ifdef Q_OS_LINUX QWidget* MouseEventHandler = nullptr; CFloatingWidgetTitleBar* TitleBar = nullptr; @@ -455,6 +456,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event) return; } + d->Hiding = true; for (auto DockArea : d->DockContainer->openedDockAreas()) { for (auto DockWidget : DockArea->openedDockWidgets()) @@ -462,6 +464,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event) DockWidget->toggleView(false); } } + d->Hiding = false; } //============================================================================ @@ -652,11 +655,22 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved() //============================================================================ void CFloatingDockContainer::updateWindowTitle() { + // If this floating container will be hidden, then updating the window + // tile is not required anymore + if (d->Hiding) + { + return; + } + + auto TopLevelDockArea = d->DockContainer->topLevelDockArea(); if (TopLevelDockArea) { CDockWidget* CurrentWidget = TopLevelDockArea->currentDockWidget(); - d->reflectCurrentWidget(CurrentWidget); + if (CurrentWidget) + { + d->reflectCurrentWidget(CurrentWidget); + } } else { diff --git a/src/ads_globals.h b/src/ads_globals.h index abcc332..e7dee67 100644 --- a/src/ads_globals.h +++ b/src/ads_globals.h @@ -37,7 +37,7 @@ #include #include -class QAbstractButton; +QT_FORWARD_DECLARE_CLASS(QAbstractButton) #ifndef ADS_STATIC #ifdef ADS_SHARED_EXPORT @@ -60,7 +60,7 @@ class QAbstractButton; // dumps to qDebug and std::cout after layout changes #define ADS_DEBUG_LEVEL 0 -class QSplitter; +QT_FORWARD_DECLARE_CLASS(QSplitter) namespace ads {