Compare commits

..

44 Commits

Author SHA1 Message Date
Uwe Kindler
949ed40006 Updated mingw tool to mingw1310 2025-06-11 22:33:21 +02:00
Uwe Kindler
f2a9dd4db4 Updated Windows workflow to use Qt MinGW 9 2025-06-01 19:53:32 +02:00
Uwe Kindler
ed67081b74 Removed caching from MinGW build 2025-06-01 18:21:41 +02:00
Uwe Kindler
705d931231 Updated MinGW build 2025-06-01 18:17:57 +02:00
Uwe Kindler
d1367c9dd4 Updated the MinGW build 2025-06-01 18:16:17 +02:00
Uwe Kindler
31402ee9f8 Updated windows-cmake.yml to use bundled Qt MinGW toolchain 2025-06-01 18:10:16 +02:00
Uwe Kindler
b7cbac88b3 Merge branch 'ci-dev' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System into ci-dev 2025-06-01 17:56:34 +02:00
Uwe Kindler
fe8c88771f Swicthed MinGW build from Ninja to MinGW 2025-06-01 17:56:23 +02:00
githubuser0xFFFF
befcd9eadf Update windows-cmake.yml 2025-06-01 17:41:30 +02:00
Uwe Kindler
46e5aea61c Updated arch 2025-06-01 17:20:26 +02:00
Uwe Kindler
103db689ff Updated CI MinGW Qt version to 6.8.2 2025-06-01 17:11:54 +02:00
Uwe Kindler
bc34470d3c Updated windows-cmake.yml 2025-06-01 17:07:17 +02:00
Uwe Kindler
646bddfea3 Workaround bug in install-qt-action 2025-06-01 16:57:59 +02:00
Uwe Kindler
cb63f0e6ea And another try 2025-06-01 12:12:23 +02:00
Uwe Kindler
c941b2dfde Updated MinGW build to work properly 2025-06-01 12:08:37 +02:00
Uwe Kindler
671b932804 An another try 2025-06-01 12:03:55 +02:00
Uwe Kindler
f76d3b4834 And another try 2025-06-01 11:59:28 +02:00
Uwe Kindler
c248f79971 And another try 2025-06-01 11:58:13 +02:00
Uwe Kindler
0566677a9d Updated workflow 2025-06-01 11:52:11 +02:00
Uwe Kindler
268998961b Updated windows-cmake.yml 2025-06-01 11:48:50 +02:00
Uwe Kindler
716d6f7f25 Updated run command in yaml for MSVC 2025-06-01 11:15:26 +02:00
Uwe Kindler
ceb7c91844 Updated workflow file to fix wrong CMake detection of MSVC 2025-06-01 11:06:38 +02:00
Uwe Kindler
0a78dcf460 Add workflow to build with CMake and MSVC / MinGW on Windows 2025-06-01 10:48:14 +02:00
Uwe Kindler
da7d23c127 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2025-06-01 10:39:10 +02:00
Michael Jackson
64d80b2c53 LIC: Move installation of license file to share/ads folder (#748)
Signed-off-by: Michael A. Jackson <mike.jackson@bluequartz.net>
2025-05-30 20:19:14 +02:00
githubuser0xFFFF
f2a029a0c6 Update linux-builds.yml 2025-05-08 22:03:21 +02:00
githubuser0xFFFF
c1b60959ae Update linux-builds.yml 2025-05-08 21:59:12 +02:00
githubuser0xFFFF
d53728c0a8 Update linux-builds.yml 2025-05-08 21:45:55 +02:00
githubuser0xFFFF
a7ad4386e4 Update linux-builds.yml 2025-05-08 21:37:14 +02:00
Pier-Yves Lessard
4e90a38c52 Remove dangling pointer to tab widget when a dock widget is removed from autohide side bar (#740) 2025-05-08 21:18:11 +02:00
Uwe Kindler
4947548224 Merge branch 'master' of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System 2025-05-08 21:06:32 +02:00
FelixBer
991b69cc51 fix compile with Qt 6.9.0 - qplatformnativeinterface.h missing (#736)
Co-authored-by: fb <f@b.com>
2025-04-23 19:10:16 +02:00
Federico Fuga
df1fa27127 Fix nasty and still unclear bug with "Close Other" not closing all tabs in certain conditions. (#725) 2025-03-17 10:38:10 +01:00
Uwe Kindler
936eba01cd Bring all floating widgets to foreground on Linux if a dockwidget is
dragged
2025-03-14 11:45:50 +01:00
Uwe Kindler
9f8dd99cac Improved fix #722 - it now works always even if focus highlighting is
disabled
2025-03-13 14:19:47 +01:00
Uwe Kindler
90e5adde29 Fixed #722 - Ensure that application is in front of other application what dragging floating windows 2025-03-07 09:59:24 +01:00
André Meyer
ddbed9ea14 Always show TitleBar if it contains any explicit actions (#720) 2025-03-07 08:55:42 +01:00
Josiah Bills
c305432ab2 Fixed crash caused by unparented widgets after restoring layout. (#724)
This is essentially due to `setDockArea` undoing the earlier
`setParent`.
2025-03-07 08:52:48 +01:00
Uwe Kindler
e836b154eb Fixed #711 - Focus loss when closing other dock widgets 2025-03-06 14:59:36 +01:00
githubuser0xFFFF
782589523e Update linux-builds.yml
Updated actions/cache@v1 to actions/cache@v3
2025-03-06 13:24:13 +01:00
Talley Lambert
bb105d2ef6 Mention pyqt6 bindings in readme (#723) 2025-03-03 21:38:40 +01:00
Michael Jackson
483bb7354a DOC: Update DREAM3D-NX information and screen shot (#712)
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
2025-02-07 10:03:16 +01:00
anoy.
7d9f9b43a7 update minimum CMake version to 3.16 (#710) 2025-02-05 11:52:17 +01:00
Uwe Kindler
7fd5cbe9d7 Improved user-guide.md 2025-01-16 08:07:08 +01:00
28 changed files with 272 additions and 79 deletions

View File

@@ -1,34 +1,59 @@
name: linux-builds
on: [push]
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04]
jobs:
build_ubuntu_2204_cmake:
runs-on: ubuntu-22.04
env:
QT_VERSION: 6.4.2
QT_DIR: ${{ github.workspace }}/Qt
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: install qt
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history and tags
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get install qt5-default
sudo apt-get install qtbase5-private-dev qtdeclarative5-dev
- name: qmake
run: qmake
- name: make
run: make -j4
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build libgl1-mesa-dev libxkbcommon-x11-0 libx11-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
target: desktop
host: linux
arch: gcc_64
dir: ${{ env.QT_DIR }}
setup-python: false
- name: Configure with CMake
run: |
cmake -S . -B build \
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}/Qt/${{ env.QT_VERSION }}/gcc_64" \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
- name: Build
run: cmake --build build
- name: Run CMake install (optional)
run: cmake --install build
build_ubuntu_2204:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt-6-4
uses: actions/cache@v1 # not v2!
uses: actions/cache@v3
with:
path: ../Qt/6.4.2
key: ${{ runner.os }}-QtCache-Qt6-4

102
.github/workflows/windows-cmake.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
name: windows-builds
on:
push:
workflow_dispatch:
jobs:
build_windows_msvc:
name: Build with MSVC and Ninja
runs-on: windows-2022
env:
QT_VERSION: 6.4.2
QT_DIR: ${{ github.workspace }}\Qt
steps:
- name: 📦 Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⚙️ Install Ninja build system
run: choco install ninja --no-progress
- name: 📥 Install Qt for MSVC
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
target: desktop
host: windows
arch: win64_msvc2019_64
dir: ${{ env.QT_DIR }}
setup-python: false
- name: 🏗️ Setup MSVC Developer Environment
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: 🛠️ Configure CMake with Ninja + MSVC
run: |
cmake -S . -B build -G Ninja `
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" `
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install" `
-DCMAKE_BUILD_TYPE=Release
shell: powershell
- name: 🔨 Build with Ninja + MSVC
run: cmake --build build
shell: powershell
- name: 📦 Install built files
run: cmake --install build
shell: powershell
build_windows_mingw:
name: Build with Qt's MinGW and CMake (no Ninja)
runs-on: windows-2022
env:
QT_VERSION: 6.8.3
QT_DIR: ${{ github.workspace }}\Qt
steps:
- name: 📦 Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📥 Install Qt + MinGW
uses: jurplel/install-qt-action@v4
with:
aqtversion: '==3.1.19'
version: ${{ env.QT_VERSION }}
target: desktop
host: windows
arch: win64_mingw
dir: ${{ env.QT_DIR }}
tools: 'tools_mingw1310'
setup-python: false
- name: Add Qt-bundled MinGW to PATH
shell: powershell
run: |
echo "${{ env.QT_DIR }}\Tools\mingw1310_64\bin" >> $env:GITHUB_PATH
- name: 🛠️ Configure CMake (MinGW)
shell: powershell
run: |
cmake -S . -B build-mingw `
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\mingw_64" `
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
-DCMAKE_BUILD_TYPE=Release `
-G "MinGW Makefiles"
- name: 🔨 Build with CMake (MinGW)
shell: powershell
run: cmake --build build-mingw -- -j2
- name: 📦 Install built files (MinGW)
shell: powershell
run: cmake --install build-mingw

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)

View File

@@ -161,6 +161,7 @@ know it from Visual Studio.
- [Auto-Hide Functionality](#auto-hide-functionality)
- [Python Bindings](#python-bindings)
- [PySide6](#pyside6)
- [PyQt6](#pyqt6)
- [PyQt5](#pyqt5)
- [Tested Compatible Environments](#tested-compatible-environments)
- [Supported Qt Versions](#supported-qt-versions)
@@ -189,7 +190,7 @@ know it from Visual Studio.
- [RDE Robox Development Environment](#rde--robox-development-environment)
- [ResInsight](#resinsight)
- [ADTF 3](#adtf-3)
- [DREAM.3D NX](#dream3d-nx)
- [DREAM3D-NX](#dream3d-nx)
- [LabPlot](#labplot)
- [Alternative Docking System Implementations](#alternative-docking-system-implementations)
- [KDDockWidgets](#kddockwidgets)
@@ -308,7 +309,7 @@ More about the auto hide configuration options in the [online documentation...](
![Python Logo](doc/python_logo.png)
Thanks to the contribution of several users, the Advanced Docking System comes
with a complete Python integration. Python bindings are available for **PyQt5** and
with a complete Python integration. Python bindings are available for **PyQt5**, **PyQt6**, and
**PySide6**.
### PySide6
@@ -328,6 +329,24 @@ The PySide6 bindings were contributed by:
Please file PySide6-QtAds-specific issues on its [pyside6_qtads](https://github.com/mborgerson/pyside6_qtads) fork for tracking. For more information about the PySide6 bindings read [this](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/298) issue.
### PyQt6
A PyQt6 ADS package is available via PyPi and can be installed on Windows,
macOS, and Linux with:
```bash
pip install PyQt6Ads
```
Sample code is available [here](https://github.com/pyapp-kit/PyQt6Ads/tree/main/examples).
The PyQt6 bindings were contributed by:
- [tlambert03](https://github.com/tlambert03)
Please file PyQt6Ads-specific issues at [pyapp-kit/PyQt6Ads](https://github.com/pyapp-kit/PyQt6Ads).
### PyQt5
A package is available via [conda-forge](https://github.com/conda-forge/pyqtads-feedstock).
@@ -667,15 +686,17 @@ says about the switch to Qt Advanced Docking:
![ADTF](doc/showcase_adtf.png)
### [DREAM.3D NX](https://github.com/BlueQuartzSoftware/DREAM3D)
### [DREAM3D-NX](https://www.dream3d.io)
DREAM.3D *(Digital Representation Environment for Analysis of Materials in 3D)* is an open source, cross-platform and modular, software suite that allows users to prepare, reconstruct, quantify, instantiate, and mesh, multidimensional, multimodal microstructural data, as well as many other applications.
DREAM3D-NX *(Digital Representation Environment for Analysis of Materials in 3D)* is a cross-platform and modular, software suite that allows users to prepare, reconstruct, quantify, instantiate, and mesh, multidimensional, multimodal microstructural data, as well as many other applications.
[BlueQuartz Software](http://www.bluequartz.net/) is currently completely rewriting the DREAM.3D application. For the upcoming version **[DREAM3D NX](http://www.dream3d.io/)** they improved the UI by using the Advanced Docking System. An [early version](http://www.dream3d.io/) of **DREAM3D NX** with ADS is already available to any user who would like to take the brand new version out for a spin.
[BlueQuartz Software](http://www.bluequartz.net/) has completely rewritten the old DREAM.3D version 6.5 application
taking advantage of the Advanced Docking System to present a highly customizable user interface
for DREAM3D-NX Version 7.
![DREAM.3D NX](doc/showcase_dream3d_nx.png)
[read more...](http://dream3d.bluequartz.net/)
[read more...](http://www.dream3d.io/)
### [LabPlot](https://labplot.kde.org/)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_demo VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 382 KiB

View File

@@ -860,12 +860,12 @@ undock.
You can use a combination of the following feature flags to define which features
shall get locked:
- CDockWidget::DockWidgetClosable
- CDockWidget::DockWidgetMovable
- CDockWidget::DockWidgetFloatable
- CDockWidget::DockWidgetPinable
- `CDockWidget::DockWidgetClosable`
- `CDockWidget::DockWidgetMovable`
- `CDockWidget::DockWidgetFloatable`
- `CDockWidget::DockWidgetPinable`
To clear the locked features, you can use CDockWidget::NoDockWidgetFeatures
To clear the locked features, you can use `CDockWidget::NoDockWidgetFeatures`
The following code shows how to lock and unlock all dock widget features
globally.

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(QtADSExamples LANGUAGES CXX VERSION ${VERSION_SHORT})
add_subdirectory(simple)
add_subdirectory(hideshow)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_autohide VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_autohide_dragndrop VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_centralwidget VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_centralwidget VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_deleteonclose VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_dockindock VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_centralwidget VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_hideshow VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_sidebar VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(ads_example_simple VERSION ${VERSION_SHORT})
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)

View File

@@ -425,8 +425,8 @@ void CAutoHideDockContainer::cleanupAndDelete()
const auto dockWidget = d->DockWidget;
if (dockWidget)
{
auto SideTab = d->SideTab;
dockWidget->setSideTabWidget(nullptr);
SideTab->removeFromSideBar();
SideTab->setParent(nullptr);
SideTab->hide();

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)
project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT})
include(GNUInstallDirs)
if (${QT_VERSION_MAJOR})
@@ -85,6 +85,11 @@ add_library(ads::${library_name} ALIAS ${library_name})
target_link_libraries(${library_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets)
if(QT_VERSION_MAJOR STREQUAL "6")
target_link_libraries(${library_name} PRIVATE Qt6::GuiPrivate) #needed for <qpa/qplatformnativeinterface.h>
endif()
if (UNIX AND NOT APPLE)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
find_package(X11 REQUIRED)
@@ -127,7 +132,7 @@ install(FILES ${ads_HEADERS}
install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE"
"${CMAKE_CURRENT_SOURCE_DIR}/../gnu-lgpl-v2.1.md"
DESTINATION license/ads
DESTINATION share/ads/license
COMPONENT license
)
install(TARGETS ${library_name}

View File

@@ -334,27 +334,13 @@ void CDockAreaTabBar::onTabCloseRequested()
void CDockAreaTabBar::onCloseOtherTabsRequested()
{
auto Sender = qobject_cast<CDockWidgetTab*>(sender());
for (int i = 0; i < count(); ++i)
{
auto Tab = tab(i);
if (Tab->isClosable() && !Tab->isHidden() && Tab != Sender)
{
// If the dock widget is deleted with the closeTab() call, its tab
// it will no longer be in the layout, and thus the index needs to
// be updated to not skip any tabs
int Offset = Tab->dockWidget()->features().testFlag(
CDockWidget::DockWidgetDeleteOnClose) ? 1 : 0;
closeTab(i);
// If the dock widget blocks closing, i.e. if the flag
// CustomCloseHandling is set, and the dock widget is still open,
// then we do not need to correct the index
if (Tab->dockWidget()->isClosed())
{
i -= Offset;
}
}
}
for (int i = count() - 1; i >= 0; --i) {
auto Tab = tab(i);
if (Tab->isClosable() && !Tab->isHidden() && Tab != Sender) {
closeTab(i);
}
}
}

View File

@@ -872,10 +872,22 @@ void CDockAreaWidget::updateTitleBarVisibility()
bool IsAutoHide = isAutoHide();
if (!CDockManager::testConfigFlag(CDockManager::AlwaysShowTabs))
{
bool Hidden = Container->hasTopLevelDockWidget() && (Container->isFloating()
|| CDockManager::testConfigFlag(CDockManager::HideSingleCentralWidgetTitleBar));
Hidden |= (d->Flags.testFlag(HideSingleWidgetTitleBar) && openDockWidgetsCount() == 1);
Hidden &= !IsAutoHide; // Titlebar must always be visible when auto hidden so it can be dragged
bool Hidden = false;
if (!IsAutoHide) // Titlebar must always be visible when auto hidden so it can be dragged
{
if (Container->isFloating() || CDockManager::testConfigFlag(CDockManager::HideSingleCentralWidgetTitleBar))
{
// Always show title bar if it contains title bar actions
if (CDockWidget* TopLevelWidget = Container->topLevelDockWidget())
Hidden |= TopLevelWidget->titleBarActions().empty();
}
if (!Hidden && d->Flags.testFlag(HideSingleWidgetTitleBar))
{
// Always show title bar if it contains title bar actions
auto DockWidgets = openedDockWidgets();
Hidden |= (DockWidgets.size() == 1) && DockWidgets.front()->titleBarActions().empty();
}
}
d->TitleBar->setVisible(!Hidden);
}

View File

@@ -423,6 +423,13 @@ CDockWidget* CDockFocusController::focusedDockWidget() const
}
//==========================================================================
CDockAreaWidget* CDockFocusController::focusedDockArea() const
{
return d->FocusedArea.data();
}
//==========================================================================
void CDockFocusController::setDockWidgetTabPressed(bool Value)
{

View File

@@ -69,6 +69,12 @@ public:
*/
CDockWidget* focusedDockWidget() const;
/**
* Returns the dock area that contains the focusedDockWidget() or nullptr if
* the focused dock widget is not in this area.
*/
CDockAreaWidget* focusedDockArea() const;
/**
* Request focus highlighting for the given dock widget assigned to the tab
* given in Tab parameter

View File

@@ -530,14 +530,27 @@ CDockManager::CDockManager(QWidget *parent) :
window()->installEventFilter(this);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
connect(qApp, &QApplication::focusWindowChanged, [](QWindow* focusWindow)
connect(qApp, &QApplication::focusWindowChanged, [this](QWindow* focusWindow)
{
// bring modal dialogs to foreground to ensure that they are in front of any
// floating dock widget
if (focusWindow && focusWindow->isModal())
if (!focusWindow)
{
focusWindow->raise();
return;
}
// bring the main application window that hosts the dock manager and all floating
// widgets in front of any other application
this->raise();
for (auto FloatingWidget : d->FloatingWidgets)
{
if (FloatingWidget)
{
FloatingWidget->raise();
}
}
// ensure that the dragged floating window is in front of the main application window
// and any other floating widget - this will also ensure that modal dialogs come to foreground
focusWindow->raise();
});
#endif
}
@@ -1523,6 +1536,16 @@ QVariant CDockManager::configParam(eConfigParam Param, QVariant Default)
}
//===========================================================================
void CDockManager::raise()
{
if (parentWidget())
{
parentWidget()->raise();
}
}
} // namespace ads
//---------------------------------------------------------------------------

View File

@@ -770,6 +770,12 @@ public Q_SLOTS:
*/
void hideManagerAndFloatingWidgets();
/**
* Calls raise() for the widget that hosts this dock manager.
* This will bring the widget in front of any other application that is running
*/
void raise();
Q_SIGNALS:
/**
* This signal is emitted if the list of perspectives changed.

View File

@@ -841,9 +841,9 @@ void CDockWidget::saveState(QXmlStreamWriter& s) const
void CDockWidget::flagAsUnassigned()
{
d->Closed = true;
setParent(d->DockManager);
setVisible(false);
setDockArea(nullptr);
setParent(d->DockManager);
tabWidget()->setParent(this);
}

View File

@@ -599,9 +599,9 @@ void CDockWidgetTab::setActiveTab(bool active)
if (CDockManager::testConfigFlag(CDockManager::FocusHighlighting) && !d->DockWidget->dockManager()->isRestoringState())
{
bool UpdateFocusStyle = false;
if (active && !hasFocus())
{
//setFocus(Qt::OtherFocusReason);
// Update the focus only, if this the dock area of this tab is the focused dock area
if (active && !hasFocus() && (d->focusController()->focusedDockArea() == this->dockAreaWidget()))
{
d->focusController()->setDockWidgetTabFocused(this);
UpdateFocusStyle = true;
}