Merge branch 'master' into auto_hide_dockcontainer

This commit is contained in:
Uwe Kindler 2022-10-24 09:21:30 +02:00
commit 93d0d4b1c2
8 changed files with 56 additions and 9 deletions

View File

@ -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)

BIN
doc/showcase_d-tect-x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 KiB

After

Width:  |  Height:  |  Size: 529 KiB

View File

@ -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)

View File

@ -43,7 +43,7 @@ struct DockFocusControllerPrivate
CDockFocusController *_this;
QPointer<CDockWidget> FocusedDockWidget = nullptr;
QPointer<CDockAreaWidget> FocusedArea = nullptr;
CDockWidget* OldFocusedDockWidget = nullptr;
QPointer<CDockWidget> OldFocusedDockWidget = nullptr;
#ifdef Q_OS_LINUX
QPointer<CFloatingDockContainer> FloatingWidget = nullptr;
#endif

View File

@ -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
//---------------------------------------------------------------------------

View File

@ -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<int>& 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.

View File

@ -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());
}
}