diff --git a/README.md b/README.md index 60dfe46..9ad198e 100644 --- a/README.md +++ b/README.md @@ -385,12 +385,14 @@ Taken from the [Qt Blog](https://www.qt.io/blog/qt-design-studio-1.5-beta-releas [![Qt Design Studio](doc/showcase_qt_design_studio_video.png)](https://youtu.be/za9KBWcFXEw?t=84) -### [CETONI Elements](https://www.cetoni.com/products/qmixelements/) +### [CETONI Elements](https://cetoni.com/cetoni-elements/) The CETONI Elements software from [CETONI](https://www.cetoni.com) is a comprehensive, plugin-based and modular laboratory automation software for controlling CETONI devices using a joint graphical user interface. The software features a powerful script system to automate processes. The software uses the advanced docking system to give the user the freedom to arrange all the views and windows that are provided by the various plugins. -![CETONI_Elements](doc/showcase_qmix_elements.png) +[learn more...](https://cetoni.com/cetoni-elements/) + +[![CETONI_Elements](doc/showcase_qmix_elements.png)](https://www.youtube.com/watch?v=7pdNfafg3Qc) ### [ezEditor](https://github.com/ezEngine/ezEngine) @@ -406,7 +408,7 @@ D-Tect X is a X-ray inspection software for industrial radiography. It is a stat [learn more...](https://www.duerr-ndt.com/products/ndt-software/d-tect-xray-inspection-software.html) -![D-TectX](doc/showcase_d-tect-x.jpg) +[![D-TectX](doc/showcase_d-tect-x.png)](https://youtu.be/mOor7GmmIJo?t=13) ### [HiveWE](https://github.com/stijnherfst/HiveWE) diff --git a/doc/showcase_d-tect-x.png b/doc/showcase_d-tect-x.png new file mode 100644 index 0000000..16adf7f Binary files /dev/null and b/doc/showcase_d-tect-x.png differ diff --git a/doc/showcase_qmix_elements.png b/doc/showcase_qmix_elements.png index ef837a6..4223f2c 100644 Binary files a/doc/showcase_qmix_elements.png and b/doc/showcase_qmix_elements.png differ diff --git a/doc/user-guide.md b/doc/user-guide.md index 1d6cb17..d08a6bd 100644 --- a/doc/user-guide.md +++ b/doc/user-guide.md @@ -288,7 +288,8 @@ current dock widget. ![FloatingContainerHasWidgetTitle true](cfg_flag_FloatingContainerHasWidgetTitle_true.png) -otherwise it displays application name as window title. +otherwise it displays the title set with `CDockManager::setFloatingContainersTitle` or +application name as window title. ![FloatingContainerHasWidgetTitle false](cfg_flag_FloatingContainerHasWidgetTitle_false.png) diff --git a/src/DockFocusController.cpp b/src/DockFocusController.cpp index c3076fc..f1d3435 100644 --- a/src/DockFocusController.cpp +++ b/src/DockFocusController.cpp @@ -43,7 +43,7 @@ struct DockFocusControllerPrivate CDockFocusController *_this; QPointer FocusedDockWidget = nullptr; QPointer FocusedArea = nullptr; - CDockWidget* OldFocusedDockWidget = nullptr; + QPointer OldFocusedDockWidget = nullptr; #ifdef Q_OS_LINUX QPointer FloatingWidget = nullptr; #endif diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 9b1a181..845d23b 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -95,6 +95,8 @@ enum eStateFileVersion static CDockManager::ConfigFlags StaticConfigFlags = CDockManager::DefaultNonOpaqueConfig; static CDockManager::AutoHideFlags StaticAutoHideConfigFlags = CDockManager::DefaultAutoHideConfig; +static QString FloatingContainersTitle; + /** * Private data class of CDockManager class (pimpl) */ @@ -1304,6 +1306,21 @@ CDockFocusController* CDockManager::dockFocusController() const return d->FocusController; } +//=========================================================================== +void CDockManager::setFloatingContainersTitle(const QString& Title) +{ + FloatingContainersTitle = Title; +} + +//=========================================================================== +QString CDockManager::floatingContainersTitle() +{ + if (FloatingContainersTitle.isEmpty()) + return qApp->applicationDisplayName(); + + return FloatingContainersTitle; +} + } // namespace ads //--------------------------------------------------------------------------- diff --git a/src/DockManager.h b/src/DockManager.h index 1aa4952..c967de0 100644 --- a/src/DockManager.h +++ b/src/DockManager.h @@ -187,7 +187,7 @@ public: DockAreaHasTabsMenuButton = 0x8000, //!< If the flag is set each dock area has a tabs menu button DockAreaHideDisabledButtons = 0x10000, //!< If the flag is set disabled dock area buttons will not appear on the toolbar at all (enabling them will bring them back) DockAreaDynamicTabsMenuButtonVisibility = 0x20000, //!< If the flag is set, the tabs menu button will be shown only when it is required - that means, if the tabs are elided. If the tabs are not elided, it is hidden - FloatingContainerHasWidgetTitle = 0x40000, //!< If set, the Floating Widget window title reflects the title of the current dock widget otherwise it displays application name as window title + FloatingContainerHasWidgetTitle = 0x40000, //!< If set, the Floating Widget window title reflects the title of the current dock widget otherwise it displays the title set with `CDockManager::setFloatingContainersTitle` or application name as window title FloatingContainerHasWidgetIcon = 0x80000, //!< If set, the Floating Widget icon reflects the icon of the current dock widget otherwise it displays application icon HideSingleCentralWidgetTitleBar = 0x100000, //!< If there is only one single visible dock widget in the main dock container (the dock manager) and if this flag is set, then the titlebar of this dock widget will be hidden //!< this only makes sense for non draggable and non floatable widgets and enables the creation of some kind of "central" widget @@ -584,6 +584,21 @@ public: */ void setSplitterSizes(CDockAreaWidget *ContainedArea, const QList& sizes); + /** + * Set a custom title for all FloatingContainer that does not reflect + * the title of the current dock widget. + */ + static void setFloatingContainersTitle(const QString& Title); + + /** + * Returns the title used by all FloatingContainer that does not + * reflect the title of the current dock widget. + * + * If not title was set with setFloatingContainersTitle(), it returns + * QGuiApplication::applicationDisplayName(). + */ + static QString floatingContainersTitle(); + public Q_SLOTS: /** * Opens the perspective with the given name. diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index f78e0a0..2152b6b 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -433,7 +433,7 @@ struct FloatingDockContainerPrivate } else { - setWindowTitle(qApp->applicationDisplayName()); + setWindowTitle(floatingContainersTitle()); } // reflect CurrentWidget's icon if configured to do so, otherwise display application icon as window icon @@ -453,6 +453,18 @@ struct FloatingDockContainerPrivate * Handles escape key press when dragging around the floating widget */ void handleEscapeKey(); + + /** + * Returns the title used by all FloatingContainer that does not + * reflect the title of the current dock widget. + * + * If not title was set with CDockManager::setFloatingContainersTitle(), + * it returns QGuiApplication::applicationDisplayName(). + */ + static QString floatingContainersTitle() + { + return CDockManager::floatingContainersTitle(); + } }; // struct FloatingDockContainerPrivate @@ -985,7 +997,7 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved() SLOT(onDockAreaCurrentChanged(int))); d->SingleDockArea = nullptr; } - d->setWindowTitle(qApp->applicationDisplayName()); + d->setWindowTitle(d->floatingContainersTitle()); setWindowIcon(QApplication::windowIcon()); } } @@ -1012,7 +1024,7 @@ void CFloatingDockContainer::updateWindowTitle() } else { - d->setWindowTitle(qApp->applicationDisplayName()); + d->setWindowTitle(d->floatingContainersTitle()); setWindowIcon(QApplication::windowIcon()); } }