Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
985ff74ccf | ||
|
|
a9aa10f4c2 | ||
|
|
7b30229355 | ||
|
|
4a0b636148 | ||
|
|
544c624f07 | ||
|
|
bbde511603 | ||
|
|
ee3a526adb | ||
|
|
e2c960238d | ||
|
|
62bc6fced7 | ||
|
|
dd83812b29 | ||
|
|
88db64451e | ||
|
|
1a96a06cb6 | ||
|
|
00f88d9666 | ||
|
|
664d02edd4 | ||
|
|
72e5c566b7 | ||
|
|
e78133b7b2 | ||
|
|
f9ad1d7801 | ||
|
|
34b68d6eab | ||
|
|
f8143d5419 | ||
|
|
d01ffe3bee | ||
|
|
87cffe5d40 | ||
|
|
d47d87e4b8 | ||
|
|
3b0f6f92a9 | ||
|
|
12cb417682 | ||
|
|
a674eea1cd | ||
|
|
a2854a7740 | ||
|
|
cd984881e5 | ||
|
|
eb22a9aef6 | ||
|
|
d709230510 | ||
|
|
d467b21960 | ||
|
|
893af516b2 | ||
|
|
9fd5002886 | ||
|
|
39c8407e0c | ||
|
|
e922a1e5bc | ||
|
|
66e10e022b | ||
|
|
3342fd6596 | ||
|
|
c1977c51fa | ||
|
|
dc1e76d60c | ||
|
|
6c073b2833 | ||
|
|
11004ebaa0 |
151
.appveyor.yml
151
.appveyor.yml
@@ -1,151 +0,0 @@
|
|||||||
version: '{build}'
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
image: Visual Studio 2017
|
|
||||||
|
|
||||||
environment:
|
|
||||||
global:
|
|
||||||
# Appveyor doesn't have Qt 12 yet
|
|
||||||
LatestQtVersion: 5.13
|
|
||||||
matrix:
|
|
||||||
# 32 bit builds
|
|
||||||
# MSVC 2015 builds
|
|
||||||
# Dynamic Library builds
|
|
||||||
# LTS version of Qt, dll, 32bit, MSVC 2015, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, dll, 32bit, MSVC 2015, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Dynamic Library builds
|
|
||||||
# Static Library builds
|
|
||||||
# LTS version of Qt, static, 32bit, MSVC 2015, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, static, 32bit, MSVC 2015, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Static Library builds
|
|
||||||
# end MSVC 2015 builds
|
|
||||||
# MinGW builds
|
|
||||||
# Dynamic Library builds
|
|
||||||
# LTS version of Qt, dll, 32bit, MinGW, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\mingw73_32
|
|
||||||
COMPILER: C:\Qt\Tools\mingw730_32
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "true"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, dll, 32bit, MinGW, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\mingw73_32
|
|
||||||
COMPILER: C:\Qt\Tools\mingw730_32
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "true"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Dynamic Library builds
|
|
||||||
# Static Library builds
|
|
||||||
# LTS version of Qt, static, 32bit, MinGW, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\mingw73_32
|
|
||||||
COMPILER: C:\Qt\Tools\mingw730_32
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "true"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, static, 32bit, MinGW, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\mingw73_32
|
|
||||||
COMPILER: C:\Qt\Tools\mingw730_32
|
|
||||||
targetPlatform: x86
|
|
||||||
use_mingw: "true"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Static Library builds
|
|
||||||
# end MinGW builds
|
|
||||||
# end 32 bit builds
|
|
||||||
# 64 bit builds
|
|
||||||
# MSVC 2015 builds
|
|
||||||
# Dynamic Library builds
|
|
||||||
# LTS version of Qt, dll, 64bit, MSVC 2015, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017_64
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: amd64
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, dll, 64bit, MSVC 2015, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017_64
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: amd64
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "false"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Dynamic Library builds
|
|
||||||
# Static Library builds
|
|
||||||
# LTS version of Qt, static, 64bit, MSVC 2015, qmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017_64
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: amd64
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "false"
|
|
||||||
# LTS version of Qt, static, 64bit, MSVC 2015, cmake
|
|
||||||
- QT5: C:\Qt\%LatestQtVersion%\msvc2017_64
|
|
||||||
COMPILER: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
|
|
||||||
targetPlatform: amd64
|
|
||||||
use_mingw: "false"
|
|
||||||
use_static: "true"
|
|
||||||
use_cmake: "true"
|
|
||||||
# end Static Library builds
|
|
||||||
# end MSVC 2015 builds
|
|
||||||
# end 64 bit builds
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
before_build:
|
|
||||||
- set originalWD=%CD%
|
|
||||||
- call "%QT5%\bin\qtenv2.bat"
|
|
||||||
- cd /D %originalWD%
|
|
||||||
- if %use_mingw%==false call "%COMPILER%\vcvarsall.bat" %targetPlatform%
|
|
||||||
- if %use_static%==true (set USESTATIC=ON) else (set USESTATIC=OFF)
|
|
||||||
- if %use_mingw%==true (set CMAKEGENERATOR="MinGW Makefiles") else (set CMAKEGENERATOR="NMake Makefiles")
|
|
||||||
- if %use_mingw%==true (set MAKEENGINE=mingw32-make) else (set MAKEENGINE=nmake)
|
|
||||||
- if %use_mingw%==true set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- if %use_cmake%==true mkdir build
|
|
||||||
- if %use_cmake%==true cd build
|
|
||||||
- if %use_cmake%==true cmake --version
|
|
||||||
- if %use_cmake%==true cmake -G %CMAKEGENERATOR% -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_EXAMPLES=ON -DCMAKE_DEBUG_POSTFIX=d -DBUILD_STATIC=%USESTATIC% -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- if %use_cmake%==true cmake --build .
|
|
||||||
- if %use_cmake%==true cmake --build . --target install
|
|
||||||
- if %use_cmake%==true cmake -G %CMAKEGENERATOR% -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_EXAMPLES=ON -DBUILD_STATIC=%USESTATIC% -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- if %use_cmake%==true cmake --build .
|
|
||||||
- if %use_cmake%==true cmake --build . --target install
|
|
||||||
- if %use_cmake%==false if %use_static%==true qmake "CONFIG+=adsBuildStatic"
|
|
||||||
- if %use_cmake%==false if %use_static%==false qmake
|
|
||||||
- if %use_cmake%==false %MAKEENGINE% debug
|
|
||||||
- if %use_cmake%==false %MAKEENGINE% install
|
|
||||||
- if %use_cmake%==false %MAKEENGINE% release
|
|
||||||
- if %use_cmake%==false %MAKEENGINE% install
|
|
||||||
|
|
||||||
after_build:
|
|
||||||
- if %use_mingw%==true set PATH=C:\Program Files\Git\usr\bin;%PATH%
|
|
||||||
233
.travis.yml
233
.travis.yml
@@ -1,233 +0,0 @@
|
|||||||
language: cpp
|
|
||||||
# gcc is clang on mac
|
|
||||||
compiler: gcc
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- name: Ubuntu qmake Qt5.5.1
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
group: stable
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt551-trusty'
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt55base
|
|
||||||
- qt55tools
|
|
||||||
- gcc-9
|
|
||||||
- g++-9
|
|
||||||
script:
|
|
||||||
- PATH="/opt/qt55/bin:$PATH"
|
|
||||||
- CXX="g++-9"
|
|
||||||
- CC="gcc-9"
|
|
||||||
- qt55-env.sh
|
|
||||||
- qmake
|
|
||||||
- make
|
|
||||||
- make install
|
|
||||||
- name: Ubuntu qmake dll
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
group: stable
|
|
||||||
services:
|
|
||||||
- xvfb
|
|
||||||
compiler: gcc
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt514base
|
|
||||||
- qt514tools
|
|
||||||
- gcc-9
|
|
||||||
- g++-9
|
|
||||||
- libc6-i386
|
|
||||||
- libgl-dev
|
|
||||||
- libgl1-mesa-dev
|
|
||||||
- mesa-common-dev
|
|
||||||
script:
|
|
||||||
- PATH="/opt/qt514/bin:$PATH"
|
|
||||||
- CXX="g++-9"
|
|
||||||
- CC="gcc-9"
|
|
||||||
- qt514-env.sh
|
|
||||||
- qmake
|
|
||||||
- make
|
|
||||||
- make install
|
|
||||||
- name: Ubuntu qmake static
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
group: stable
|
|
||||||
services:
|
|
||||||
- xvfb
|
|
||||||
compiler: gcc
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt514base
|
|
||||||
- qt514tools
|
|
||||||
- gcc-9
|
|
||||||
- g++-9
|
|
||||||
- libc6-i386
|
|
||||||
- libgl-dev
|
|
||||||
- libgl1-mesa-dev
|
|
||||||
- mesa-common-dev
|
|
||||||
script:
|
|
||||||
- PATH="/opt/qt514/bin:$PATH"
|
|
||||||
- CXX="g++-9"
|
|
||||||
- CC="gcc-9"
|
|
||||||
- qt514-env.sh
|
|
||||||
- qmake "CONFIG+=adsBuildStatic"
|
|
||||||
- make
|
|
||||||
- make install
|
|
||||||
- name: Ubuntu CMake dll
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
group: stable
|
|
||||||
services:
|
|
||||||
- xvfb
|
|
||||||
compiler: gcc
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt514base
|
|
||||||
- qt514tools
|
|
||||||
- gcc-9
|
|
||||||
- g++-9
|
|
||||||
- libc6-i386
|
|
||||||
- libgl-dev
|
|
||||||
- libgl1-mesa-dev
|
|
||||||
- mesa-common-dev
|
|
||||||
script:
|
|
||||||
- PATH="/opt/qt514/bin:$PATH"
|
|
||||||
- CXX="g++-9"
|
|
||||||
- CC="gcc-9"
|
|
||||||
- qt514-env.sh
|
|
||||||
- mkdir ./build
|
|
||||||
- cd ./build
|
|
||||||
- cmake --version
|
|
||||||
- cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_STATIC=OFF -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_STATIC=OFF -DBUILD_EXAMPLES=ON -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- name: Ubuntu CMake Static
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
group: stable
|
|
||||||
services:
|
|
||||||
- xvfb
|
|
||||||
compiler: gcc
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
|
|
||||||
update: true
|
|
||||||
packages:
|
|
||||||
- qt514base
|
|
||||||
- qt514tools
|
|
||||||
- gcc-9
|
|
||||||
- g++-9
|
|
||||||
- libc6-i386
|
|
||||||
- libgl-dev
|
|
||||||
- libgl1-mesa-dev
|
|
||||||
- mesa-common-dev
|
|
||||||
script:
|
|
||||||
- PATH="/opt/qt514/bin:$PATH"
|
|
||||||
- CXX="g++-9"
|
|
||||||
- CC="gcc-9"
|
|
||||||
- qt514-env.sh
|
|
||||||
- mkdir ./build
|
|
||||||
- cd ./build
|
|
||||||
- cmake --version
|
|
||||||
- cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_STATIC=ON -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DBUILD_STATIC=ON -DBUILD_EXAMPLES=ON -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- name: macOS CMake dll
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode11.3
|
|
||||||
compiler: clang
|
|
||||||
addons:
|
|
||||||
homebrew:
|
|
||||||
packages:
|
|
||||||
- qt
|
|
||||||
update: true
|
|
||||||
script:
|
|
||||||
- PATH="/usr/local/opt/qt5/bin:$PATH"
|
|
||||||
- mkdir -p build
|
|
||||||
- cd build
|
|
||||||
- cmake --version
|
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX=_debug -DBUILD_EXAMPLES=ON -DBUILD_STATIC=OFF -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_EXAMPLES=ON -DBUILD_STATIC=OFF -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- name: macOS CMake static
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode11.3
|
|
||||||
compiler: clang
|
|
||||||
addons:
|
|
||||||
homebrew:
|
|
||||||
packages:
|
|
||||||
- qt
|
|
||||||
update: true
|
|
||||||
script:
|
|
||||||
- PATH="/usr/local/opt/qt5/bin:$PATH"
|
|
||||||
- mkdir -p build
|
|
||||||
- cd build
|
|
||||||
- cmake --version
|
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX=_debug -DBUILD_EXAMPLES=ON -DBUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_EXAMPLES=ON -DBUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX="./installed" ../
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target install
|
|
||||||
- name: macOS qmake dll
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode11.3
|
|
||||||
compiler: clang
|
|
||||||
addons:
|
|
||||||
homebrew:
|
|
||||||
packages:
|
|
||||||
- qt
|
|
||||||
update: true
|
|
||||||
script:
|
|
||||||
- PATH="/usr/local/opt/qt5/bin:$PATH"
|
|
||||||
- qmake
|
|
||||||
- make
|
|
||||||
- make install
|
|
||||||
- name: macOS qmake static
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode11.3
|
|
||||||
compiler: clang
|
|
||||||
addons:
|
|
||||||
homebrew:
|
|
||||||
packages:
|
|
||||||
- qt
|
|
||||||
update: true
|
|
||||||
script:
|
|
||||||
- PATH="/usr/local/opt/qt5/bin:$PATH"
|
|
||||||
- qmake "CONFIG+=adsBuildStatic"
|
|
||||||
- make
|
|
||||||
- make install
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
@@ -4,23 +4,32 @@ if (POLICY CMP0091)
|
|||||||
cmake_policy(SET CMP0091 NEW)
|
cmake_policy(SET CMP0091 NEW)
|
||||||
endif (POLICY CMP0091)
|
endif (POLICY CMP0091)
|
||||||
|
|
||||||
|
# Add cmake modules path (required for Versioning.cmake and git revision description)
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# By default, the version information is extracted from the git index. However,
|
# By default, the version information is extracted from the git index. However,
|
||||||
# we can override this behavior by explicitly setting ADS_VERSION and
|
# we can override this behavior by explicitly setting ADS_VERSION and
|
||||||
# skipping the git checks. This is useful for cases where this project is being
|
# skipping the git checks. This is useful for cases where this project is being
|
||||||
# used independently of its original git repo (e.g. vendored in another project)
|
# used independently of its original git repo (e.g. vendored in another project)
|
||||||
if(NOT ADS_VERSION)
|
if(NOT ADS_VERSION)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
git_describe(GitTagVersion --tags)
|
git_describe(GitTagVersion --tags)
|
||||||
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GitTagVersion}")
|
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GitTagVersion}")
|
||||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GitTagVersion}")
|
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GitTagVersion}")
|
||||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GitTagVersion}")
|
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GitTagVersion}")
|
||||||
set(VERSION_SHORT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
set(VERSION_SHORT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||||
|
set(VERSION_SONAME "${VERSION_MAJOR}")
|
||||||
else()
|
else()
|
||||||
string(REGEX MATCHALL "[\.]" VERSION_DOT_MATCHES ${ADS_VERSION})
|
string(REGEX MATCHALL "[\.]" VERSION_DOT_MATCHES ${ADS_VERSION})
|
||||||
list(LENGTH VERSION_DOT_MATCHES VERSION_DOT_COUNT)
|
list(LENGTH VERSION_DOT_MATCHES VERSION_DOT_COUNT)
|
||||||
if(VERSION_DOT_COUNT EQUAL 2)
|
if(VERSION_DOT_COUNT EQUAL 2)
|
||||||
set(VERSION_SHORT ${ADS_VERSION})
|
set(VERSION_SHORT ${ADS_VERSION})
|
||||||
|
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_SONAME "${ADS_VERSION}")
|
||||||
|
# Set PROJECT_VERSION_* variables for Versioning.cmake
|
||||||
|
string(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${ADS_VERSION}")
|
||||||
|
list(GET VERSION_PARTS 0 PROJECT_VERSION_MAJOR)
|
||||||
|
list(GET VERSION_PARTS 1 PROJECT_VERSION_MINOR)
|
||||||
|
list(GET VERSION_PARTS 2 PROJECT_VERSION_PATCH)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "ADS_VERSION must be in major.minor.patch format, e.g. 3.8.1. Got ${ADS_VERSION}")
|
message(FATAL_ERROR "ADS_VERSION must be in major.minor.patch format, e.g. 3.8.1. Got ${ADS_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
@@ -32,10 +41,15 @@ project(QtADS LANGUAGES CXX VERSION ${VERSION_SHORT})
|
|||||||
option(BUILD_STATIC "Build the static library" OFF)
|
option(BUILD_STATIC "Build the static library" OFF)
|
||||||
option(BUILD_EXAMPLES "Build the examples" ON)
|
option(BUILD_EXAMPLES "Build the examples" ON)
|
||||||
|
|
||||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
# Platform directory: auto-detected based on pointer size, or manually set
|
||||||
set(ads_PlatformDir "x86")
|
if(NOT ADS_PLATFORM_DIR)
|
||||||
|
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
||||||
|
set(ads_PlatformDir "x86")
|
||||||
|
else()
|
||||||
|
set(ads_PlatformDir "x64")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(ads_PlatformDir "x64")
|
set(ads_PlatformDir "${ADS_PLATFORM_DIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -7,7 +7,6 @@
|
|||||||
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/latest)
|
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/latest)
|
||||||
[](gnu-lgpl-v2.1.md)
|
[](gnu-lgpl-v2.1.md)
|
||||||
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions?query=workflow%3Alinux-builds)
|
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions?query=workflow%3Alinux-builds)
|
||||||
[](https://ci.appveyor.com/project/githubuser0xFFFF/qt-advanced-docking-system/branch/master)
|
|
||||||
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions/workflows/windows-cmake.yml)
|
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions/workflows/windows-cmake.yml)
|
||||||
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/graphs/contributors)
|
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/graphs/contributors)
|
||||||
|
|
||||||
@@ -23,6 +22,18 @@ integrated development environments (IDEs) such as Visual Studio.
|
|||||||
|
|
||||||
## New and Noteworthy
|
## New and Noteworthy
|
||||||
|
|
||||||
|
### Release 4.5
|
||||||
|
|
||||||
|
#### Tabs at Bottom
|
||||||
|
|
||||||
|
A new global dock manager flag `TabsAtBottom` has been added to configuration flags. This flag allows to configure if the tabs of dock areas are shown at the top (default) or at the bottom of the respective container.
|
||||||
|
|
||||||
|
If the flag is set, tabs will be shown at the bottom instead of in the title bar.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Release 4.1
|
||||||
|
|
||||||
Release [4.1](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/latest) significantly improves the Auto-Hide functionality and also brings improvements
|
Release [4.1](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/latest) significantly improves the Auto-Hide functionality and also brings improvements
|
||||||
for Drag and Drop of dock widgets into dock area tabs. These are the highlights of the new version:
|
for Drag and Drop of dock widgets into dock area tabs. These are the highlights of the new version:
|
||||||
|
|
||||||
@@ -142,6 +153,9 @@ know it from Visual Studio.
|
|||||||
### Overview
|
### Overview
|
||||||
|
|
||||||
- [New and Noteworthy](#new-and-noteworthy)
|
- [New and Noteworthy](#new-and-noteworthy)
|
||||||
|
- [Release 4.5](#release-45)
|
||||||
|
- [Tabs at Bottom](#tabs-at-bottom)
|
||||||
|
- [Release 4.1](#release-41)
|
||||||
- [Drag \& Drop to Auto-Hide](#drag--drop-to-auto-hide)
|
- [Drag \& Drop to Auto-Hide](#drag--drop-to-auto-hide)
|
||||||
- [Auto-Hide Tab Insertion Order](#auto-hide-tab-insertion-order)
|
- [Auto-Hide Tab Insertion Order](#auto-hide-tab-insertion-order)
|
||||||
- [Auto-Hide Tab Sorting](#auto-hide-tab-sorting)
|
- [Auto-Hide Tab Sorting](#auto-hide-tab-sorting)
|
||||||
@@ -194,6 +208,7 @@ know it from Visual Studio.
|
|||||||
- [DREAM3D-NX](#dream3d-nx)
|
- [DREAM3D-NX](#dream3d-nx)
|
||||||
- [LabPlot](#labplot)
|
- [LabPlot](#labplot)
|
||||||
- [Scrutiny Debugger](#scrutiny-debugger)
|
- [Scrutiny Debugger](#scrutiny-debugger)
|
||||||
|
- [PiSoWorks](#pisoworks)
|
||||||
- [Alternative Docking System Implementations](#alternative-docking-system-implementations)
|
- [Alternative Docking System Implementations](#alternative-docking-system-implementations)
|
||||||
- [KDDockWidgets](#kddockwidgets)
|
- [KDDockWidgets](#kddockwidgets)
|
||||||
- [QtitanDocking](#qtitandocking)
|
- [QtitanDocking](#qtitandocking)
|
||||||
@@ -372,7 +387,7 @@ The library supports **Qt5** and **Qt6**.
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
Windows 10 / 11 [](https://ci.appveyor.com/project/githubuser0xFFFF/qt-advanced-docking-system/branch/master)
|
Windows 10 / 11
|
||||||
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions/workflows/windows-cmake.yml)
|
[](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/actions/workflows/windows-cmake.yml)
|
||||||
|
|
||||||
The library was developed on and for Windows. It is used in a commercial Windows application and is therefore constantly tested.
|
The library was developed on and for Windows. It is used in a commercial Windows application and is therefore constantly tested.
|
||||||
@@ -729,6 +744,15 @@ ADS powers Scrutiny’s flexible interface, letting users organize views and dat
|
|||||||
|
|
||||||
[](https://www.youtube.com/watch?v=Dd3osxW-Clo)
|
[](https://www.youtube.com/watch?v=Dd3osxW-Clo)
|
||||||
|
|
||||||
|
|
||||||
|
### [PiSoWorks](https://pypi.org/project/pisoworks/)
|
||||||
|
|
||||||
|
PiSoWorks is an application for controlling the piezo amplifiers, such as the [NV200/D](https://www.piezosystem.com/product/nv-200-d-compact-amplifier/), from [piezosystem jena](https://www.piezosystem.com/) GmbH.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[read more...](https://piezosystemjena.github.io/PiSoWorks/)
|
||||||
|
|
||||||
## Alternative Docking System Implementations
|
## Alternative Docking System Implementations
|
||||||
|
|
||||||
If this Qt Advanced Docking System does not fit to your needs you may consider some of the alternative docking system solutions for Qt.
|
If this Qt Advanced Docking System does not fit to your needs you may consider some of the alternative docking system solutions for Qt.
|
||||||
|
|||||||
29
cmake/modules/FileVersionInfo.rc.in
Normal file
29
cmake/modules/FileVersionInfo.rc.in
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||||
|
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
FILEFLAGS 0
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE VFT_APP
|
||||||
|
FILESUBTYPE 0
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "My Company\0"
|
||||||
|
VALUE "FileDescription", "@PROJECT_NAME@\0"
|
||||||
|
VALUE "FileVersion", "@PROJECT_VERSION_STRING@\0"
|
||||||
|
VALUE "ProductVersion", "@PROJECT_VERSION_STRING@\0"
|
||||||
|
VALUE "GitCommitFull", "@PROJECT_GIT_HASH@\0"
|
||||||
|
VALUE "GitCommitShort", "@PROJECT_GIT_HASH_SHORT@\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
100
cmake/modules/Versioning.cmake
Normal file
100
cmake/modules/Versioning.cmake
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
# ============================================================
|
||||||
|
# Versioning.cmake (Reusable Version + Resource Generator)
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# Freeze the directory where this module lives
|
||||||
|
# This is critical — it prevents paths from breaking when the
|
||||||
|
# function is invoked from other CMakeLists.txt files.
|
||||||
|
set(_VERSIONING_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "Versioning module directory")
|
||||||
|
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Extract version information from Git or use predefined version
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
if(NOT DEFINED PROJECT_VERSION_MAJOR OR NOT DEFINED PROJECT_VERSION_MINOR OR NOT DEFINED PROJECT_VERSION_PATCH)
|
||||||
|
# Get tag (expected: v1.2.3 or 1.2.3 or 1.2.3-12-gHASH)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git describe --tags --dirty
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_DESC_RAW
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# Remove leading "v" if present
|
||||||
|
string(REGEX REPLACE "^v" "" GIT_DESC "${GIT_DESC_RAW}")
|
||||||
|
|
||||||
|
# Extract major.minor.patch
|
||||||
|
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" _ "${GIT_DESC}")
|
||||||
|
set(PROJECT_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||||
|
set(PROJECT_VERSION_MINOR "${CMAKE_MATCH_2}")
|
||||||
|
set(PROJECT_VERSION_PATCH "${CMAKE_MATCH_3}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Commit hash (full + short)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE PROJECT_GIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse --short HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE PROJECT_GIT_HASH_SHORT
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(PROJECT_VERSION_STRING
|
||||||
|
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Export variables to parent scope
|
||||||
|
set(PROJECT_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_PATCH "${PROJECT_VERSION_PATCH}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_STRING}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_GIT_HASH "${PROJECT_GIT_HASH}" PARENT_SCOPE)
|
||||||
|
set(PROJECT_GIT_HASH_SHORT "${PROJECT_GIT_HASH_SHORT}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
# Public variable for users
|
||||||
|
set(PROJECT_AUTO_VERSION "${PROJECT_VERSION_STRING}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Reusable function: Attach Windows version resources to target
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
function(add_windows_version_resources target)
|
||||||
|
if(NOT WIN32)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT TARGET "${target}")
|
||||||
|
message(FATAL_ERROR "add_windows_version_resources: target '${target}' not found.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Absolute path to the template (never changes)
|
||||||
|
get_filename_component(_rc_in
|
||||||
|
"${_VERSIONING_MODULE_DIR}/FileVersionInfo.rc.in"
|
||||||
|
ABSOLUTE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT EXISTS "${_rc_in}")
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"FileVersionInfo.rc.in missing at: ${_rc_in}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Output in the caller's binary dir
|
||||||
|
set(_rc_out "${CMAKE_CURRENT_BINARY_DIR}/${target}_version.rc")
|
||||||
|
get_filename_component(_rc_out "${_rc_out}" ABSOLUTE)
|
||||||
|
|
||||||
|
# Ensure directory exists
|
||||||
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
# Configure the template
|
||||||
|
configure_file("${_rc_in}" "${_rc_out}" @ONLY)
|
||||||
|
|
||||||
|
# Add to the target
|
||||||
|
target_sources(${target} PRIVATE "${_rc_out}")
|
||||||
|
endfunction()
|
||||||
@@ -396,7 +396,7 @@ struct MainWindowPrivate
|
|||||||
DockWidget->setMinimumSizeHintMode(ads::CDockWidget::MinimumSizeHintFromContent);
|
DockWidget->setMinimumSizeHintMode(ads::CDockWidget::MinimumSizeHintFromContent);
|
||||||
auto ToolBar = DockWidget->createDefaultToolBar();
|
auto ToolBar = DockWidget->createDefaultToolBar();
|
||||||
auto Action = ToolBar->addAction(svgIcon(":/adsdemo/images/fullscreen.svg"), "Toggle Fullscreen");
|
auto Action = ToolBar->addAction(svgIcon(":/adsdemo/images/fullscreen.svg"), "Toggle Fullscreen");
|
||||||
QObject::connect(Action, &QAction::triggered, [=]()
|
QObject::connect(Action, &QAction::triggered, [DockWidget]()
|
||||||
{
|
{
|
||||||
if (DockWidget->isFullScreen())
|
if (DockWidget->isFullScreen())
|
||||||
{
|
{
|
||||||
@@ -510,7 +510,7 @@ void MainWindowPrivate::createContent()
|
|||||||
auto TitleBar = DockArea->titleBar();
|
auto TitleBar = DockArea->titleBar();
|
||||||
int Index = TitleBar->indexOf(TitleBar->tabBar());
|
int Index = TitleBar->indexOf(TitleBar->tabBar());
|
||||||
TitleBar->insertWidget(Index + 1, CustomButton);
|
TitleBar->insertWidget(Index + 1, CustomButton);
|
||||||
QObject::connect(CustomButton, &QToolButton::clicked, [=]()
|
QObject::connect(CustomButton, &QToolButton::clicked, [DockArea, this]()
|
||||||
{
|
{
|
||||||
auto DockWidget = createEditorWidget();
|
auto DockWidget = createEditorWidget();
|
||||||
DockWidget->setFeature(ads::CDockWidget::DockWidgetDeleteOnClose, true);
|
DockWidget->setFeature(ads::CDockWidget::DockWidgetDeleteOnClose, true);
|
||||||
@@ -779,6 +779,9 @@ CMainWindow::CMainWindow(QWidget *parent) :
|
|||||||
// uncomment if you would like to close tabs with the middle mouse button, web browser style
|
// uncomment if you would like to close tabs with the middle mouse button, web browser style
|
||||||
// CDockManager::setConfigFlag(CDockManager::MiddleMouseButtonClosesTab, true);
|
// CDockManager::setConfigFlag(CDockManager::MiddleMouseButtonClosesTab, true);
|
||||||
|
|
||||||
|
// uncomment if you would like to avoid using the built-in QSS stylesheet
|
||||||
|
// CDockManager::setConfigFlag(CDockManager::DisableStylesheet, true);
|
||||||
|
|
||||||
// Now create the dock manager and its content
|
// Now create the dock manager and its content
|
||||||
d->DockManager = new CDockManager(this);
|
d->DockManager = new CDockManager(this);
|
||||||
d->DockManager->setDockWidgetToolBarStyle(Qt::ToolButtonIconOnly, ads::CDockWidget::StateFloating);
|
d->DockManager->setDockWidgetToolBarStyle(Qt::ToolButtonIconOnly, ads::CDockWidget::StateFloating);
|
||||||
|
|||||||
BIN
doc/cfg_flag_TabsAtBottom.png
Normal file
BIN
doc/cfg_flag_TabsAtBottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
doc/cfg_flag_TabsAtBottom_true.png
Normal file
BIN
doc/cfg_flag_TabsAtBottom_true.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
BIN
doc/showcase_pysoworks.png
Normal file
BIN
doc/showcase_pysoworks.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
@@ -1,79 +1,81 @@
|
|||||||
# User Guide
|
# User Guide
|
||||||
|
|
||||||
- [Configuration Flags](#configuration-flags)
|
- [User Guide](#user-guide)
|
||||||
- [Setting Configuration Flags](#setting-configuration-flags)
|
- [Configuration Flags](#configuration-flags)
|
||||||
- [`ActiveTabHasCloseButton`](#activetabhasclosebutton)
|
- [Setting Configuration Flags](#setting-configuration-flags)
|
||||||
- [`DockAreaHasCloseButton`](#dockareahasclosebutton)
|
- [`ActiveTabHasCloseButton`](#activetabhasclosebutton)
|
||||||
- [`DockAreaCloseButtonClosesTab`](#dockareaclosebuttonclosestab)
|
- [`DockAreaHasCloseButton`](#dockareahasclosebutton)
|
||||||
- [`OpaqueSplitterResize`](#opaquesplitterresize)
|
- [`DockAreaCloseButtonClosesTab`](#dockareaclosebuttonclosestab)
|
||||||
- [`XmlAutoFormattingEnabled`](#xmlautoformattingenabled)
|
- [`OpaqueSplitterResize`](#opaquesplitterresize)
|
||||||
- [`XmlCompressionEnabled`](#xmlcompressionenabled)
|
- [`XmlAutoFormattingEnabled`](#xmlautoformattingenabled)
|
||||||
- [`TabCloseButtonIsToolButton`](#tabclosebuttonistoolbutton)
|
- [`XmlCompressionEnabled`](#xmlcompressionenabled)
|
||||||
- [`AllTabsHaveCloseButton`](#alltabshaveclosebutton)
|
- [`TabCloseButtonIsToolButton`](#tabclosebuttonistoolbutton)
|
||||||
- [`RetainTabSizeWhenCloseButtonHidden`](#retaintabsizewhenclosebuttonhidden)
|
- [`AllTabsHaveCloseButton`](#alltabshaveclosebutton)
|
||||||
- [`DragPreviewIsDynamic`](#dragpreviewisdynamic)
|
- [`RetainTabSizeWhenCloseButtonHidden`](#retaintabsizewhenclosebuttonhidden)
|
||||||
- [`DragPreviewShowsContentPixmap`](#dragpreviewshowscontentpixmap)
|
- [`DragPreviewIsDynamic`](#dragpreviewisdynamic)
|
||||||
- [`DragPreviewHasWindowFrame`](#dragpreviewhaswindowframe)
|
- [`DragPreviewShowsContentPixmap`](#dragpreviewshowscontentpixmap)
|
||||||
- [`AlwaysShowTabs`](#alwaysshowtabs)
|
- [`DragPreviewHasWindowFrame`](#dragpreviewhaswindowframe)
|
||||||
- [`DockAreaHasUndockButton`](#dockareahasundockbutton)
|
- [`AlwaysShowTabs`](#alwaysshowtabs)
|
||||||
- [`DockAreaHasTabsMenuButton`](#dockareahastabsmenubutton)
|
- [`DockAreaHasUndockButton`](#dockareahasundockbutton)
|
||||||
- [`DockAreaHideDisabledButtons`](#dockareahidedisabledbuttons)
|
- [`DockAreaHasTabsMenuButton`](#dockareahastabsmenubutton)
|
||||||
- [`DockAreaDynamicTabsMenuButtonVisibility`](#dockareadynamictabsmenubuttonvisibility)
|
- [`DockAreaHideDisabledButtons`](#dockareahidedisabledbuttons)
|
||||||
- [`FloatingContainerHasWidgetTitle`](#floatingcontainerhaswidgettitle)
|
- [`DockAreaDynamicTabsMenuButtonVisibility`](#dockareadynamictabsmenubuttonvisibility)
|
||||||
- [`FloatingContainerHasWidgetIcon`](#floatingcontainerhaswidgeticon)
|
- [`FloatingContainerHasWidgetTitle`](#floatingcontainerhaswidgettitle)
|
||||||
- [`HideSingleCentralWidgetTitleBar`](#hidesinglecentralwidgettitlebar)
|
- [`FloatingContainerHasWidgetIcon`](#floatingcontainerhaswidgeticon)
|
||||||
- [`FocusHighlighting`](#focushighlighting)
|
- [`HideSingleCentralWidgetTitleBar`](#hidesinglecentralwidgettitlebar)
|
||||||
- [`EqualSplitOnInsertion`](#equalsplitoninsertion)
|
- [`FocusHighlighting`](#focushighlighting)
|
||||||
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
|
- [`EqualSplitOnInsertion`](#equalsplitoninsertion)
|
||||||
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
|
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
|
||||||
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
|
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
|
||||||
- [`DisableTabTextEliding`](#disabletabtexteliding)
|
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
|
||||||
- [`ShowTabTextOnlyForActiveTab`](#showtabtextonlyforactivetab)
|
- [`DisableTabTextEliding`](#disabletabtexteliding)
|
||||||
- [`DoubleClickUndocksWidget`](#doubleclickundockswidget)
|
- [`ShowTabTextOnlyForActiveTab`](#showtabtextonlyforactivetab)
|
||||||
- [Auto Hide Dock Widgets](#auto-hide-dock-widgets)
|
- [`DoubleClickUndocksWidget`](#doubleclickundockswidget)
|
||||||
- [Pinning Auto-Hide Widgets to a certain border](#pinning-auto-hide-widgets-to-a-certain-border)
|
- [`TabsAtBottom`](#tabsatbottom)
|
||||||
- [Show / Hide Auto-Hide Widgets via Mouse Over](#show--hide-auto-hide-widgets-via-mouse-over)
|
- [Auto Hide Dock Widgets](#auto-hide-dock-widgets)
|
||||||
- [Drag \& Drop to Auto-Hide](#drag--drop-to-auto-hide)
|
- [Pinning Auto-Hide Widgets to a certain border](#pinning-auto-hide-widgets-to-a-certain-border)
|
||||||
- [Auto-Hide Tab Insertion Order](#auto-hide-tab-insertion-order)
|
- [Show / Hide Auto-Hide Widgets via Mouse Over](#show--hide-auto-hide-widgets-via-mouse-over)
|
||||||
- [Auto-Hide Tab Sorting](#auto-hide-tab-sorting)
|
- [Drag \& Drop to Auto-Hide](#drag--drop-to-auto-hide)
|
||||||
- [Auto-Hide Drag to Float / Dock](#auto-hide-drag-to-float--dock)
|
- [Auto-Hide Tab Insertion Order](#auto-hide-tab-insertion-order)
|
||||||
- [Auto-Hide Context Menu](#auto-hide-context-menu)
|
- [Auto-Hide Tab Sorting](#auto-hide-tab-sorting)
|
||||||
- [Adding Auto Hide Widgets](#adding-auto-hide-widgets)
|
- [Auto-Hide Drag to Float / Dock](#auto-hide-drag-to-float--dock)
|
||||||
- [Auto-Hide Configuration Flags](#auto-hide-configuration-flags)
|
- [Auto-Hide Context Menu](#auto-hide-context-menu)
|
||||||
- [Setting Auto-Hide Flags](#setting-auto-hide-flags)
|
- [Adding Auto Hide Widgets](#adding-auto-hide-widgets)
|
||||||
- [`AutoHideFeatureEnabled`](#autohidefeatureenabled)
|
- [Auto-Hide Configuration Flags](#auto-hide-configuration-flags)
|
||||||
- [`DockAreaHasAutoHideButton`](#dockareahasautohidebutton)
|
- [Setting Auto-Hide Flags](#setting-auto-hide-flags)
|
||||||
- [`AutoHideButtonTogglesArea`](#autohidebuttontogglesarea)
|
- [`AutoHideFeatureEnabled`](#autohidefeatureenabled)
|
||||||
- [`AutoHideButtonCheckable`](#autohidebuttoncheckable)
|
- [`DockAreaHasAutoHideButton`](#dockareahasautohidebutton)
|
||||||
- [`AutoHideSideBarsIconOnly`](#autohidesidebarsicononly)
|
- [`AutoHideButtonTogglesArea`](#autohidebuttontogglesarea)
|
||||||
- [`AutoHideShowOnMouseOver`](#autohideshowonmouseover)
|
- [`AutoHideButtonCheckable`](#autohidebuttoncheckable)
|
||||||
- [`AutoHideCloseButtonCollapsesDock`](#autohideclosebuttoncollapsesdock)
|
- [`AutoHideSideBarsIconOnly`](#autohidesidebarsicononly)
|
||||||
- [`AutoHideHasCloseButton`](#autohidehasclosebutton)
|
- [`AutoHideShowOnMouseOver`](#autohideshowonmouseover)
|
||||||
- [`AutoHideHasMinimizeButton`](#autohidehasminimizebutton)
|
- [`AutoHideCloseButtonCollapsesDock`](#autohideclosebuttoncollapsesdock)
|
||||||
- [`AutoHideOpenOnDragHover`](#autohideopenondraghover)
|
- [`AutoHideHasCloseButton`](#autohidehasclosebutton)
|
||||||
- [`AutoHideCloseOnOutsideMouseClick`](#autohidecloseonoutsidemouseclick)
|
- [`AutoHideHasMinimizeButton`](#autohidehasminimizebutton)
|
||||||
- [DockWidget Feature Flags](#dockwidget-feature-flags)
|
- [`AutoHideOpenOnDragHover`](#autohideopenondraghover)
|
||||||
- [`DockWidgetClosable`](#dockwidgetclosable)
|
- [`AutoHideCloseOnOutsideMouseClick`](#autohidecloseonoutsidemouseclick)
|
||||||
- [`DockWidgetMovable`](#dockwidgetmovable)
|
- [DockWidget Feature Flags](#dockwidget-feature-flags)
|
||||||
- [`DockWidgetFloatable`](#dockwidgetfloatable)
|
- [`DockWidgetClosable`](#dockwidgetclosable)
|
||||||
- [`DockWidgetDeleteOnClose`](#dockwidgetdeleteonclose)
|
- [`DockWidgetMovable`](#dockwidgetmovable)
|
||||||
- [`CustomCloseHandling`](#customclosehandling)
|
- [`DockWidgetFloatable`](#dockwidgetfloatable)
|
||||||
- [`DockWidgetFocusable`](#dockwidgetfocusable)
|
- [`DockWidgetDeleteOnClose`](#dockwidgetdeleteonclose)
|
||||||
- [`DockWidgetForceCloseWithArea`](#dockwidgetforceclosewitharea)
|
- [`CustomCloseHandling`](#customclosehandling)
|
||||||
- [`NoTab`](#notab)
|
- [`DockWidgetFocusable`](#dockwidgetfocusable)
|
||||||
- [`DeleteContentOnClose`](#deletecontentonclose)
|
- [`DockWidgetForceCloseWithArea`](#dockwidgetforceclosewitharea)
|
||||||
- [Central Widget](#central-widget)
|
- [`NoTab`](#notab)
|
||||||
- [Empty Dock Area](#empty-dock-area)
|
- [`DeleteContentOnClose`](#deletecontentonclose)
|
||||||
- [Custom Close Handling](#custom-close-handling)
|
- [Central Widget](#central-widget)
|
||||||
- [Globally Lock Docking Features](#globally-lock-docking-features)
|
- [Empty Dock Area](#empty-dock-area)
|
||||||
- [Dock Widget Size / Minimum Size Handling](#dock-widget-size--minimum-size-handling)
|
- [Custom Close Handling](#custom-close-handling)
|
||||||
- [Styling](#styling)
|
- [Globally Lock Docking Features](#globally-lock-docking-features)
|
||||||
- [Disabling the Internal Style Sheet](#disabling-the-internal-style-sheet)
|
- [Dock Widget Size / Minimum Size Handling](#dock-widget-size--minimum-size-handling)
|
||||||
- [Using ADS on Linux](#using-ads-on-linux)
|
- [Styling](#styling)
|
||||||
- [Supported Distributions](#supported-distributions)
|
- [Disabling the Internal Style Sheet](#disabling-the-internal-style-sheet)
|
||||||
- [Requirements](#requirements)
|
- [Using ADS on Linux](#using-ads-on-linux)
|
||||||
- [Manjaro xfce 25.0.1 and Xubuntu 24.04.2 issues](#manjaro-xfce-2501-and-xubuntu-24042-issues)
|
- [Supported Distributions](#supported-distributions)
|
||||||
- [OpenGl + ADS](#opengl--ads)
|
- [Requirements](#requirements)
|
||||||
|
- [Manjaro xfce 25.0.1 and Xubuntu 24.04.2 issues](#manjaro-xfce-2501-and-xubuntu-24042-issues)
|
||||||
|
- [OpenGl + ADS](#opengl--ads)
|
||||||
|
|
||||||
## Configuration Flags
|
## Configuration Flags
|
||||||
|
|
||||||
@@ -510,6 +512,12 @@ for active tabs. Inactive tabs only show their icon:
|
|||||||
If the flag is set (default), a double click on a tab undocks the dock widget.
|
If the flag is set (default), a double click on a tab undocks the dock widget.
|
||||||
If you would like to disable undocking, just clear this flag.
|
If you would like to disable undocking, just clear this flag.
|
||||||
|
|
||||||
|
### `TabsAtBottom`
|
||||||
|
|
||||||
|
If the flag is set, tabs will be shown at the bottom instead of in the title bar.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Auto Hide Dock Widgets
|
## Auto Hide Dock Widgets
|
||||||
|
|
||||||
The Advanced Docking System supports "Auto-Hide" functionality for **all**
|
The Advanced Docking System supports "Auto-Hide" functionality for **all**
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ add_subdirectory(autohide)
|
|||||||
add_subdirectory(autohidedragndrop)
|
add_subdirectory(autohidedragndrop)
|
||||||
add_subdirectory(emptydockarea)
|
add_subdirectory(emptydockarea)
|
||||||
add_subdirectory(dockindock)
|
add_subdirectory(dockindock)
|
||||||
|
add_subdirectory(configflags)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ CMainWindow::CMainWindow(QWidget *parent)
|
|||||||
CDockManager::setConfigFlag(CDockManager::OpaqueSplitterResize, true);
|
CDockManager::setConfigFlag(CDockManager::OpaqueSplitterResize, true);
|
||||||
CDockManager::setConfigFlag(CDockManager::XmlCompressionEnabled, false);
|
CDockManager::setConfigFlag(CDockManager::XmlCompressionEnabled, false);
|
||||||
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
|
CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
|
||||||
|
CDockManager::setConfigFlag(CDockManager::TabsAtBottom, true);
|
||||||
CDockManager::setAutoHideConfigFlags(CDockManager::DefaultAutoHideConfig);
|
CDockManager::setAutoHideConfigFlags(CDockManager::DefaultAutoHideConfig);
|
||||||
CDockManager::setAutoHideConfigFlag(CDockManager::AutoHideOpenOnDragHover, true);
|
CDockManager::setAutoHideConfigFlag(CDockManager::AutoHideOpenOnDragHover, true);
|
||||||
CDockManager::setConfigParam(CDockManager::AutoHideOpenOnDragHoverDelay_ms, 500);
|
CDockManager::setConfigParam(CDockManager::AutoHideOpenOnDragHoverDelay_ms, 500);
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
project(ads_example_centralwidget VERSION ${VERSION_SHORT})
|
project(ads_example_configflags VERSION ${VERSION_SHORT})
|
||||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
add_executable(configFlagsExample WIN32
|
add_executable(ConfigFlagsExample WIN32
|
||||||
main.cpp
|
main.cpp
|
||||||
mainwindow.cpp
|
mainwindow.cpp
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
)
|
)
|
||||||
target_include_directories(CentralWidgetExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
|
target_include_directories(ConfigFlagsExample PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
|
||||||
target_link_libraries(CentralWidgetExample PRIVATE qtadvanceddocking-qt${QT_VERSION_MAJOR})
|
target_link_libraries(ConfigFlagsExample PRIVATE qtadvanceddocking-qt${QT_VERSION_MAJOR})
|
||||||
target_link_libraries(CentralWidgetExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
target_link_libraries(ConfigFlagsExample PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
||||||
Qt${QT_VERSION_MAJOR}::Gui
|
Qt${QT_VERSION_MAJOR}::Gui
|
||||||
Qt${QT_VERSION_MAJOR}::Widgets)
|
Qt${QT_VERSION_MAJOR}::Widgets)
|
||||||
set_target_properties(CentralWidgetExample PROPERTIES
|
set_target_properties(ConfigFlagsExample PROPERTIES
|
||||||
AUTOMOC ON
|
AUTOMOC ON
|
||||||
AUTORCC ON
|
AUTORCC ON
|
||||||
AUTOUIC ON
|
AUTOUIC ON
|
||||||
@@ -21,7 +21,7 @@ set_target_properties(CentralWidgetExample PROPERTIES
|
|||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
VERSION ${VERSION_SHORT}
|
VERSION ${VERSION_SHORT}
|
||||||
EXPORT_NAME "Qt Advanced Docking System Central Widget Example"
|
EXPORT_NAME "Qt Advanced Docking System Config Flags"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin"
|
||||||
|
|||||||
@@ -415,7 +415,31 @@ void CAutoHideDockContainer::moveContentsToParent()
|
|||||||
// to the user and he does not have to search where the widget was inserted.
|
// to the user and he does not have to search where the widget was inserted.
|
||||||
d->DockWidget->setDockArea(nullptr);
|
d->DockWidget->setDockArea(nullptr);
|
||||||
auto DockContainer = dockContainer();
|
auto DockContainer = dockContainer();
|
||||||
DockContainer->addDockWidget(d->getDockWidgetArea(d->SideTabBarArea), d->DockWidget);
|
auto targetArea = d->getDockWidgetArea(d->SideTabBarArea);
|
||||||
|
|
||||||
|
// If the widget has a preferred auto-hide location, try to find an existing
|
||||||
|
// opened dock area that contains a widget with the same preferred location
|
||||||
|
// and merge as a tab instead of creating a new split.
|
||||||
|
auto preferred = d->DockWidget->preferredAutoHideSideBarLocation();
|
||||||
|
if (preferred != SideBarNone)
|
||||||
|
{
|
||||||
|
for (auto area : DockContainer->openedDockAreas())
|
||||||
|
{
|
||||||
|
if (!area || area->isAutoHide()) continue;
|
||||||
|
// Check if any widget in this area has the same preferred location
|
||||||
|
for (auto dw : area->dockWidgets())
|
||||||
|
{
|
||||||
|
if (dw && dw->preferredAutoHideSideBarLocation() == preferred)
|
||||||
|
{
|
||||||
|
DockContainer->addDockWidget(CenterDockWidgetArea,
|
||||||
|
d->DockWidget, area);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DockContainer->addDockWidget(targetArea, d->DockWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -482,6 +506,17 @@ void CAutoHideDockContainer::collapseView(bool Enable)
|
|||||||
{
|
{
|
||||||
updateSize();
|
updateSize();
|
||||||
d->updateResizeHandleSizeLimitMax();
|
d->updateResizeHandleSizeLimitMax();
|
||||||
|
// If the parent dock container has native child windows (e.g. because
|
||||||
|
// an OpenGL or VTK content widget called winId()), this panel is an
|
||||||
|
// alien (non-native) widget and will always be obscured by those native
|
||||||
|
// sibling windows regardless of Qt's paint order. Native OS windows are
|
||||||
|
// rendered above the parent's painted (alien) content by the windowing
|
||||||
|
// system. To allow raise() to use OS-level Z-order and appear on top,
|
||||||
|
// this panel must first be promoted to a native window itself.
|
||||||
|
if (parentWidget() && parentWidget()->internalWinId() && !internalWinId())
|
||||||
|
{
|
||||||
|
winId();
|
||||||
|
}
|
||||||
raise();
|
raise();
|
||||||
show();
|
show();
|
||||||
d->DockWidget->dockManager()->setDockWidgetFocused(d->DockWidget);
|
d->DockWidget->dockManager()->setDockWidgetFocused(d->DockWidget);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ struct AutoHideTabPrivate
|
|||||||
IFloatingWidget* createFloatingWidget(T* Widget)
|
IFloatingWidget* createFloatingWidget(T* Widget)
|
||||||
{
|
{
|
||||||
auto w = new CFloatingDragPreview(Widget);
|
auto w = new CFloatingDragPreview(Widget);
|
||||||
_this->connect(w, &CFloatingDragPreview::draggingCanceled, [=]()
|
_this->connect(w, &CFloatingDragPreview::draggingCanceled, [this]()
|
||||||
{
|
{
|
||||||
DragState = DraggingInactive;
|
DragState = DraggingInactive;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CAutoHideTab();
|
~CAutoHideTab() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update stylesheet style if a property changes
|
* Update stylesheet style if a property changes
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT})
|
project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT})
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
include(Versioning)
|
||||||
if (${QT_VERSION_MAJOR})
|
if (${QT_VERSION_MAJOR})
|
||||||
message(STATUS "Forced to use Qt version ${QT_VERSION_MAJOR}")
|
message(STATUS "Forced to use Qt version ${QT_VERSION_MAJOR}")
|
||||||
find_package(QT NAMES Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
find_package(QT NAMES Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||||
@@ -13,8 +14,8 @@ if (UNIX AND NOT APPLE AND QT_VERSION_MAJOR STREQUAL "6" AND QT_VERSION_MINOR GR
|
|||||||
set(ads_DEP_LIBS Core Gui GuiPrivate Widgets)
|
set(ads_DEP_LIBS Core Gui GuiPrivate Widgets)
|
||||||
endif()
|
endif()
|
||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${ads_DEP_LIBS} REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${ads_DEP_LIBS} REQUIRED)
|
||||||
if (UNIX AND NOT APPLE AND QT_VERSION_MAJOR STREQUAL "6" AND QT_VERSION_MINOR GREATER 8)
|
if (UNIX AND NOT APPLE AND ((QT_VERSION_MAJOR STREQUAL "6" AND QT_VERSION_MINOR GREATER 8) OR QT_VERSION_MAJOR STREQUAL "5"))
|
||||||
include_directories(${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
include_directories(${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
@@ -83,6 +84,9 @@ if(BUILD_STATIC)
|
|||||||
target_compile_definitions( ${library_name} PUBLIC ADS_STATIC)
|
target_compile_definitions( ${library_name} PUBLIC ADS_STATIC)
|
||||||
else()
|
else()
|
||||||
add_library( ${library_name} SHARED ${ads_SRCS} ${ads_HEADERS})
|
add_library( ${library_name} SHARED ${ads_SRCS} ${ads_HEADERS})
|
||||||
|
if(WIN32)
|
||||||
|
add_windows_version_resources(${library_name})
|
||||||
|
endif()
|
||||||
target_compile_definitions( ${library_name} PRIVATE ADS_SHARED_EXPORT)
|
target_compile_definitions( ${library_name} PRIVATE ADS_SHARED_EXPORT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -92,7 +96,7 @@ target_link_libraries(${library_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core
|
|||||||
Qt${QT_VERSION_MAJOR}::Gui
|
Qt${QT_VERSION_MAJOR}::Gui
|
||||||
Qt${QT_VERSION_MAJOR}::Widgets)
|
Qt${QT_VERSION_MAJOR}::Widgets)
|
||||||
|
|
||||||
if(QT_VERSION_MAJOR STREQUAL "6")
|
if(UNIX AND NOT APPLE AND QT_VERSION_MAJOR STREQUAL "6")
|
||||||
target_link_libraries(${library_name} PRIVATE Qt6::GuiPrivate) #needed for <qpa/qplatformnativeinterface.h>
|
target_link_libraries(${library_name} PRIVATE Qt6::GuiPrivate) #needed for <qpa/qplatformnativeinterface.h>
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -109,6 +113,7 @@ set_target_properties(${library_name} PROPERTIES
|
|||||||
AUTORCC ON
|
AUTORCC ON
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
VERSION ${VERSION_SHORT}
|
VERSION ${VERSION_SHORT}
|
||||||
|
SOVERSION ${VERSION_SONAME}
|
||||||
EXPORT_NAME ${library_name}
|
EXPORT_NAME ${library_name}
|
||||||
DEBUG_POSTFIX "d"
|
DEBUG_POSTFIX "d"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
|
||||||
|
|||||||
@@ -260,10 +260,10 @@ void DockAreaTitleBarPrivate::createAutoHideTitleLabel()
|
|||||||
{
|
{
|
||||||
AutoHideTitleLabel = new CElidingLabel("");
|
AutoHideTitleLabel = new CElidingLabel("");
|
||||||
AutoHideTitleLabel->setObjectName("autoHideTitleLabel");
|
AutoHideTitleLabel->setObjectName("autoHideTitleLabel");
|
||||||
// At position 0 is the tab bar - insert behind tab bar
|
// When the tabs are at the top, they will be at position 0, insert the label behind them, and hide it.
|
||||||
Layout->insertWidget(1, AutoHideTitleLabel);
|
Layout->addWidget(AutoHideTitleLabel);
|
||||||
AutoHideTitleLabel->setVisible(false); // Default hidden
|
AutoHideTitleLabel->setVisible(CDockManager::testConfigFlag(CDockManager::TabsAtBottom));
|
||||||
Layout->insertWidget(2 ,new CSpacerWidget(_this));
|
Layout->addWidget(new CSpacerWidget(_this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -272,7 +272,9 @@ void DockAreaTitleBarPrivate::createTabBar()
|
|||||||
{
|
{
|
||||||
TabBar = componentsFactory()->createDockAreaTabBar(DockArea);
|
TabBar = componentsFactory()->createDockAreaTabBar(DockArea);
|
||||||
TabBar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
|
TabBar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
|
||||||
Layout->addWidget(TabBar);
|
if (!CDockManager::testConfigFlag(CDockManager::TabsAtBottom))
|
||||||
|
Layout->addWidget(TabBar);
|
||||||
|
|
||||||
_this->connect(TabBar, SIGNAL(tabClosed(int)), SLOT(markTabsMenuOutdated()));
|
_this->connect(TabBar, SIGNAL(tabClosed(int)), SLOT(markTabsMenuOutdated()));
|
||||||
_this->connect(TabBar, SIGNAL(tabOpened(int)), SLOT(markTabsMenuOutdated()));
|
_this->connect(TabBar, SIGNAL(tabOpened(int)), SLOT(markTabsMenuOutdated()));
|
||||||
_this->connect(TabBar, SIGNAL(tabInserted(int)), SLOT(markTabsMenuOutdated()));
|
_this->connect(TabBar, SIGNAL(tabInserted(int)), SLOT(markTabsMenuOutdated()));
|
||||||
@@ -303,7 +305,7 @@ IFloatingWidget* DockAreaTitleBarPrivate::makeAreaFloating(const QPoint& Offset,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto w = new CFloatingDragPreview(DockArea);
|
auto w = new CFloatingDragPreview(DockArea);
|
||||||
QObject::connect(w, &CFloatingDragPreview::draggingCanceled, [=]()
|
QObject::connect(w, &CFloatingDragPreview::draggingCanceled, [this]()
|
||||||
{
|
{
|
||||||
this->DragState = DraggingInactive;
|
this->DragState = DraggingInactive;
|
||||||
});
|
});
|
||||||
@@ -351,8 +353,8 @@ CDockAreaTitleBar::CDockAreaTitleBar(CDockAreaWidget* parent) :
|
|||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
|
|
||||||
d->createTabBar();
|
d->createTabBar();
|
||||||
d->createButtons();
|
|
||||||
d->createAutoHideTitleLabel();
|
d->createAutoHideTitleLabel();
|
||||||
|
d->createButtons();
|
||||||
|
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
}
|
}
|
||||||
@@ -900,9 +902,12 @@ QString CDockAreaTitleBar::titleBarButtonToolTip(TitleBarButton Button) const
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockAreaTitleBar::showAutoHideControls(bool Show)
|
void CDockAreaTitleBar::showAutoHideControls(bool Show)
|
||||||
{
|
{
|
||||||
d->TabBar->setVisible(!Show); // Auto hide toolbar never has tabs
|
if (Show)
|
||||||
|
d->TabBar->setVisible(false); // Auto hide toolbar never has tabs
|
||||||
|
|
||||||
d->MinimizeButton->setVisible(Show);
|
d->MinimizeButton->setVisible(Show);
|
||||||
d->AutoHideTitleLabel->setVisible(Show);
|
if (!CDockManager::testConfigFlag(CDockManager::TabsAtBottom))
|
||||||
|
d->AutoHideTitleLabel->setVisible(Show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CDockAreaTitleBar();
|
~CDockAreaTitleBar() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the pointer to the tabBar()
|
* Returns the pointer to the tabBar()
|
||||||
|
|||||||
@@ -179,14 +179,17 @@ public:
|
|||||||
parent->setUpdatesEnabled(false);
|
parent->setUpdatesEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto LayoutItem = m_ParentLayout->takeAt(1);
|
if (m_CurrentWidget)
|
||||||
if (LayoutItem)
|
|
||||||
{
|
{
|
||||||
LayoutItem->widget()->setParent(nullptr);
|
auto LayoutItem = m_ParentLayout->takeAt(1);
|
||||||
|
if (LayoutItem)
|
||||||
|
{
|
||||||
|
LayoutItem->widget()->setParent(nullptr);
|
||||||
|
}
|
||||||
|
delete LayoutItem;
|
||||||
}
|
}
|
||||||
delete LayoutItem;
|
|
||||||
|
|
||||||
m_ParentLayout->addWidget(next);
|
m_ParentLayout->insertWidget(1, next);
|
||||||
if (prev)
|
if (prev)
|
||||||
{
|
{
|
||||||
prev->hide();
|
prev->hide();
|
||||||
@@ -362,6 +365,14 @@ void DockAreaWidgetPrivate::createTitleBar()
|
|||||||
{
|
{
|
||||||
TitleBar = componentsFactory()->createDockAreaTitleBar(_this);
|
TitleBar = componentsFactory()->createDockAreaTitleBar(_this);
|
||||||
Layout->addWidget(TitleBar);
|
Layout->addWidget(TitleBar);
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::TabsAtBottom))
|
||||||
|
{
|
||||||
|
// Title bar will be index 0, container widgets will be index 1,
|
||||||
|
// so tabs will always be at the end of the layout.
|
||||||
|
Layout->addWidget(tabBar());
|
||||||
|
tabBar()->setVisible(CDockManager::testConfigFlag(CDockManager::AlwaysShowTabs));
|
||||||
|
}
|
||||||
|
|
||||||
QObject::connect(tabBar(), &CDockAreaTabBar::tabCloseRequested, _this, &CDockAreaWidget::onTabCloseRequested);
|
QObject::connect(tabBar(), &CDockAreaTabBar::tabCloseRequested, _this, &CDockAreaWidget::onTabCloseRequested);
|
||||||
QObject::connect(TitleBar, &CDockAreaTitleBar::tabBarClicked, _this, &CDockAreaWidget::setCurrentIndex);
|
QObject::connect(TitleBar, &CDockAreaTitleBar::tabBarClicked, _this, &CDockAreaWidget::setCurrentIndex);
|
||||||
QObject::connect(tabBar(), &CDockAreaTabBar::tabMoved, _this, &CDockAreaWidget::reorderDockWidget);
|
QObject::connect(tabBar(), &CDockAreaTabBar::tabMoved, _this, &CDockAreaWidget::reorderDockWidget);
|
||||||
@@ -449,6 +460,12 @@ CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget
|
|||||||
|
|
||||||
d->createTitleBar();
|
d->createTitleBar();
|
||||||
d->ContentsLayout = new DockAreaLayout(d->Layout);
|
d->ContentsLayout = new DockAreaLayout(d->Layout);
|
||||||
|
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::UseNativeWindows))
|
||||||
|
{
|
||||||
|
winId();
|
||||||
|
}
|
||||||
|
|
||||||
if (d->DockManager)
|
if (d->DockManager)
|
||||||
{
|
{
|
||||||
Q_EMIT d->DockManager->dockAreaCreated(this);
|
Q_EMIT d->DockManager->dockAreaCreated(this);
|
||||||
@@ -592,8 +609,7 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
|
|||||||
{
|
{
|
||||||
if(CFloatingDockContainer* FloatingDockContainer = DockContainer->floatingWidget())
|
if(CFloatingDockContainer* FloatingDockContainer = DockContainer->floatingWidget())
|
||||||
{
|
{
|
||||||
FloatingDockContainer->hide();
|
FloatingDockContainer->finishDropOperation();
|
||||||
FloatingDockContainer->deleteLater();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -726,6 +742,7 @@ void CDockAreaWidget::setCurrentIndex(int index)
|
|||||||
TabBar->setCurrentIndex(index);
|
TabBar->setCurrentIndex(index);
|
||||||
d->ContentsLayout->setCurrentIndex(index);
|
d->ContentsLayout->setCurrentIndex(index);
|
||||||
d->ContentsLayout->currentWidget()->show();
|
d->ContentsLayout->currentWidget()->show();
|
||||||
|
d->TitleBar->autoHideTitleLabel()->setText(d->ContentsLayout->currentWidget()->windowTitle());
|
||||||
Q_EMIT currentChanged(index);
|
Q_EMIT currentChanged(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -879,7 +896,22 @@ void CDockAreaWidget::updateTitleBarVisibility()
|
|||||||
{
|
{
|
||||||
// Always show title bar if it contains title bar actions
|
// Always show title bar if it contains title bar actions
|
||||||
if (CDockWidget* TopLevelWidget = Container->topLevelDockWidget())
|
if (CDockWidget* TopLevelWidget = Container->topLevelDockWidget())
|
||||||
|
{
|
||||||
Hidden |= TopLevelWidget->titleBarActions().empty();
|
Hidden |= TopLevelWidget->titleBarActions().empty();
|
||||||
|
}
|
||||||
|
else if (CDockManager::testConfigFlag(CDockManager::TabsAtBottom))
|
||||||
|
{
|
||||||
|
Hidden = true;
|
||||||
|
|
||||||
|
for (CDockWidget* DockWidget : Container->openedDockWidgets())
|
||||||
|
{
|
||||||
|
if (!DockWidget->titleBarActions().empty())
|
||||||
|
{
|
||||||
|
Hidden = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!Hidden && d->Flags.testFlag(HideSingleWidgetTitleBar))
|
if (!Hidden && d->Flags.testFlag(HideSingleWidgetTitleBar))
|
||||||
{
|
{
|
||||||
@@ -889,6 +921,8 @@ void CDockAreaWidget::updateTitleBarVisibility()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
d->TitleBar->setVisible(!Hidden);
|
d->TitleBar->setVisible(!Hidden);
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::TabsAtBottom))
|
||||||
|
d->TitleBar->tabBar()->setVisible(openDockWidgetsCount() > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAutoHideFeatureEnabled())
|
if (isAutoHideFeatureEnabled())
|
||||||
@@ -899,6 +933,19 @@ void CDockAreaWidget::updateTitleBarVisibility()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
void CDockAreaWidget::updateWindowTitle()
|
||||||
|
{
|
||||||
|
auto currentWidget = d->ContentsLayout->currentWidget();
|
||||||
|
if (d->TitleBar && currentWidget)
|
||||||
|
{
|
||||||
|
d->TitleBar->autoHideTitleLabel()->setText(currentWidget->windowTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
markTitleBarMenuOutdated();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockAreaWidget::markTitleBarMenuOutdated()
|
void CDockAreaWidget::markTitleBarMenuOutdated()
|
||||||
{
|
{
|
||||||
@@ -1452,14 +1499,18 @@ QSize CDockAreaWidget::minimumSizeHint() const
|
|||||||
return Super::minimumSizeHint();
|
return Super::minimumSizeHint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int extraHeight = 0;
|
||||||
if (d->TitleBar->isVisible())
|
if (d->TitleBar->isVisible())
|
||||||
{
|
{
|
||||||
return d->MinSizeHint + QSize(0, d->TitleBar->minimumSizeHint().height());
|
extraHeight += d->TitleBar->minimumSizeHint().height();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::TabsAtBottom) && d->tabBar()->isVisible())
|
||||||
{
|
{
|
||||||
return d->MinSizeHint;
|
extraHeight += d->tabBar()->minimumSizeHint().height();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return d->MinSizeHint + QSize(0, extraHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,11 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void internalSetCurrentDockWidget(CDockWidget* DockWidget);
|
void internalSetCurrentDockWidget(CDockWidget* DockWidget);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call this function to update the window title
|
||||||
|
*/
|
||||||
|
void updateWindowTitle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks tabs menu to update
|
* Marks tabs menu to update
|
||||||
*/
|
*/
|
||||||
@@ -199,7 +204,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CDockAreaWidget();
|
~CDockAreaWidget() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the dock manager object this dock area belongs to
|
* Returns the dock manager object this dock area belongs to
|
||||||
|
|||||||
@@ -907,6 +907,7 @@ void DockContainerWidgetPrivate::addDockAreasToList(const QList<CDockAreaWidget*
|
|||||||
{
|
{
|
||||||
DockArea->titleBarButton(TitleBarButtonClose)->setVisible(true);
|
DockArea->titleBarButton(TitleBarButtonClose)->setVisible(true);
|
||||||
DockArea->titleBarButton(TitleBarButtonAutoHide)->setVisible(true);
|
DockArea->titleBarButton(TitleBarButtonAutoHide)->setVisible(true);
|
||||||
|
DockArea->titleBarButton(TitleBarButtonUndock)->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to ensure, that the dock area title bar is visible. The title bar
|
// We need to ensure, that the dock area title bar is visible. The title bar
|
||||||
@@ -1572,9 +1573,21 @@ void CDockContainerWidget::removeDockArea(CDockAreaWidget* area)
|
|||||||
d->DockAreas.removeAll(area);
|
d->DockAreas.removeAll(area);
|
||||||
auto Splitter = area->parentSplitter();
|
auto Splitter = area->parentSplitter();
|
||||||
|
|
||||||
// Remove are from parent splitter and recursively hide tree of parent
|
// Remove area from parent splitter and recursively hide tree of parent
|
||||||
// splitters if it has no visible content
|
// splitters if it has no visible content.
|
||||||
area->setParent(nullptr);
|
// Use internalWinId() rather than testAttribute(WA_NativeWindow) because
|
||||||
|
// WA_NativeWindow is only set when a widget is *explicitly* made native
|
||||||
|
// (e.g. winId() called directly on it). Widgets that became native through
|
||||||
|
// propagation from a child calling winId() (e.g. a VTK/OpenGL widget) also
|
||||||
|
// hold a real native window handle but may not have WA_NativeWindow set.
|
||||||
|
// Setting the parent of such a native window to nullptr would make it an
|
||||||
|
// invisible top-level OS window, causing drawing artifacts. Reparent to
|
||||||
|
// the dock manager instead so the window stays off-screen but within the
|
||||||
|
// application's window hierarchy.
|
||||||
|
if (area->internalWinId())
|
||||||
|
area->setParent(d->DockManager);
|
||||||
|
else
|
||||||
|
area->setParent(nullptr);
|
||||||
internal::hideEmptyParentSplitters(Splitter);
|
internal::hideEmptyParentSplitters(Splitter);
|
||||||
|
|
||||||
// Remove this area from cached areas
|
// Remove this area from cached areas
|
||||||
@@ -2204,6 +2217,17 @@ CDockManager* CDockContainerWidget::dockManager() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
void CDockContainerWidget::removeFromDockManager()
|
||||||
|
{
|
||||||
|
if (d->DockManager)
|
||||||
|
{
|
||||||
|
d->DockManager->removeDockContainer(this);
|
||||||
|
d->DockManager.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
void CDockContainerWidget::handleAutoHideWidgetEvent(QEvent* e, QWidget* w)
|
void CDockContainerWidget::handleAutoHideWidgetEvent(QEvent* e, QWidget* w)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ private:
|
|||||||
friend AutoHideDockContainerPrivate;
|
friend AutoHideDockContainerPrivate;
|
||||||
friend CAutoHideSideBar;
|
friend CAutoHideSideBar;
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void removeFromDockManager();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Handles activation events to update zOrderIndex
|
* Handles activation events to update zOrderIndex
|
||||||
@@ -219,7 +222,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CDockContainerWidget();
|
~CDockContainerWidget() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds dockwidget into the given area.
|
* Adds dockwidget into the given area.
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QDialog>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -202,6 +203,10 @@ DockManagerPrivate::DockManagerPrivate(CDockManager* _public) :
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void DockManagerPrivate::loadStylesheet()
|
void DockManagerPrivate::loadStylesheet()
|
||||||
{
|
{
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::DisableStylesheet))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
initResource();
|
initResource();
|
||||||
QString Result;
|
QString Result;
|
||||||
QString FileName = ":ads/stylesheets/";
|
QString FileName = ":ads/stylesheets/";
|
||||||
@@ -530,15 +535,33 @@ CDockManager::CDockManager(QWidget *parent) :
|
|||||||
window()->installEventFilter(this);
|
window()->installEventFilter(this);
|
||||||
|
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||||
connect(qApp, &QApplication::focusWindowChanged, [this](QWindow* focusWindow)
|
connect(qApp, &QApplication::focusWindowChanged, this, [this](QWindow* focusWindow)
|
||||||
{
|
{
|
||||||
if (!focusWindow)
|
if (!focusWindow)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bring the main application window that hosts the dock manager and all floating
|
auto widget = QWidget::find(focusWindow->winId());
|
||||||
// widgets in front of any other application
|
if (!widget)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the user clicks the main window or drags a floating widget or works with a
|
||||||
|
// modal dialog, then raise the main window, all floating widgets and the focus window
|
||||||
|
// itself to bring it into foreground of any other application.
|
||||||
|
bool raise = qobject_cast<QMainWindow*>(widget)
|
||||||
|
|| qobject_cast<ads::CFloatingDockContainer*>(widget);
|
||||||
|
if (auto dialog = qobject_cast<QDialog*>(widget))
|
||||||
|
{
|
||||||
|
raise |= dialog->isModal();
|
||||||
|
}
|
||||||
|
if (!raise)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this->raise();
|
this->raise();
|
||||||
for (auto FloatingWidget : d->FloatingWidgets)
|
for (auto FloatingWidget : d->FloatingWidgets)
|
||||||
{
|
{
|
||||||
@@ -749,7 +772,8 @@ void CDockManager::registerFloatingWidget(CFloatingDockContainer* FloatingWidget
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
void CDockManager::removeFloatingWidget(CFloatingDockContainer* FloatingWidget)
|
void CDockManager::removeFloatingWidget(CFloatingDockContainer* FloatingWidget)
|
||||||
{
|
{
|
||||||
d->FloatingWidgets.removeAll(FloatingWidget);
|
int removed = d->FloatingWidgets.removeAll(FloatingWidget);
|
||||||
|
Q_ASSERT(removed == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
@@ -764,7 +788,8 @@ void CDockManager::removeDockContainer(CDockContainerWidget* DockContainer)
|
|||||||
{
|
{
|
||||||
if (this != DockContainer)
|
if (this != DockContainer)
|
||||||
{
|
{
|
||||||
d->Containers.removeAll(DockContainer);
|
int removed = d->Containers.removeAll(DockContainer);
|
||||||
|
Q_ASSERT(removed == 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,8 +64,13 @@ struct AutoHideTabPrivate;
|
|||||||
* of the docking system. The dock manager uses an internal stylesheet to
|
* of the docking system. The dock manager uses an internal stylesheet to
|
||||||
* style its components like splitters, tabs and buttons. If you want to
|
* style its components like splitters, tabs and buttons. If you want to
|
||||||
* disable this stylesheet because your application uses its own,
|
* disable this stylesheet because your application uses its own,
|
||||||
* just call the function for settings the stylesheet with an empty
|
* you can either set the DisableStylesheet config flag before creating
|
||||||
* string.
|
* the dock manager:
|
||||||
|
* \code
|
||||||
|
* CDockManager::setConfigFlag(CDockManager::DisableStylesheet, true);
|
||||||
|
* \endcode
|
||||||
|
* Or call the function for settings the stylesheet with an empty string
|
||||||
|
* after creating the dock manager:
|
||||||
* \code
|
* \code
|
||||||
* DockManager->setStyleSheet("");
|
* DockManager->setStyleSheet("");
|
||||||
* \endcode
|
* \endcode
|
||||||
@@ -216,6 +221,9 @@ public:
|
|||||||
DisableTabTextEliding = 0x4000000, //! Set this flag to disable eliding of tab texts in dock area tabs
|
DisableTabTextEliding = 0x4000000, //! Set this flag to disable eliding of tab texts in dock area tabs
|
||||||
ShowTabTextOnlyForActiveTab =0x8000000, //! Set this flag to show label texts in dock area tabs only for active tabs
|
ShowTabTextOnlyForActiveTab =0x8000000, //! Set this flag to show label texts in dock area tabs only for active tabs
|
||||||
DoubleClickUndocksWidget = 0x10000000, //!< If the flag is set, a double click on a tab undocks the widget
|
DoubleClickUndocksWidget = 0x10000000, //!< If the flag is set, a double click on a tab undocks the widget
|
||||||
|
TabsAtBottom = 0x20000000, //!< If the flag is set, tabs will be shown at the bottom instead of in the title bar.
|
||||||
|
UseNativeWindows = 0x40000000, //!< If the flag is set, windows for the dock and area widgets will be native.
|
||||||
|
DisableStylesheet = 0x80000000, //!< If the flag is set, the dock manager will not apply the default stylesheet
|
||||||
|
|
||||||
|
|
||||||
DefaultDockAreaButtons = DockAreaHasCloseButton
|
DefaultDockAreaButtons = DockAreaHasCloseButton
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ struct DockWidgetPrivate
|
|||||||
WidgetFactory* Factory = nullptr;
|
WidgetFactory* Factory = nullptr;
|
||||||
QPointer<CAutoHideTab> SideTabWidget;
|
QPointer<CAutoHideTab> SideTabWidget;
|
||||||
CDockWidget::eToolBarStyleSource ToolBarStyleSource = CDockWidget::ToolBarStyleFromDockManager;
|
CDockWidget::eToolBarStyleSource ToolBarStyleSource = CDockWidget::ToolBarStyleFromDockManager;
|
||||||
|
SideBarLocation PreferredAutoHideSideBarLocation = SideBarNone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private data constructor
|
* Private data constructor
|
||||||
*/
|
*/
|
||||||
@@ -396,6 +397,11 @@ CDockWidget::CDockWidget(CDockManager *manager, const QString &title, QWidget* p
|
|||||||
{
|
{
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::UseNativeWindows))
|
||||||
|
{
|
||||||
|
winId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -649,6 +655,20 @@ SideBarLocation CDockWidget::autoHideLocation() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
void CDockWidget::setPreferredAutoHideSideBarLocation(SideBarLocation Location)
|
||||||
|
{
|
||||||
|
d->PreferredAutoHideSideBarLocation = Location;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
SideBarLocation CDockWidget::preferredAutoHideSideBarLocation() const
|
||||||
|
{
|
||||||
|
return d->PreferredAutoHideSideBarLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
bool CDockWidget::isFloating() const
|
bool CDockWidget::isFloating() const
|
||||||
{
|
{
|
||||||
@@ -878,7 +898,7 @@ bool CDockWidget::event(QEvent *e)
|
|||||||
}
|
}
|
||||||
if (d->DockArea)
|
if (d->DockArea)
|
||||||
{
|
{
|
||||||
d->DockArea->markTitleBarMenuOutdated();//update tabs menu
|
d->DockArea->updateWindowTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto FloatingWidget = floatingDockContainer();
|
auto FloatingWidget = floatingDockContainer();
|
||||||
@@ -1332,7 +1352,15 @@ void CDockWidget::setAutoHide(bool Enable, SideBarLocation Location, int TabInde
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto area = (SideBarNone == Location) ? DockArea->calculateSideTabBarArea() : Location;
|
auto area = Location;
|
||||||
|
if (SideBarNone == area && d->PreferredAutoHideSideBarLocation != SideBarNone)
|
||||||
|
{
|
||||||
|
area = d->PreferredAutoHideSideBarLocation;
|
||||||
|
}
|
||||||
|
else if (SideBarNone == area)
|
||||||
|
{
|
||||||
|
area = DockArea->calculateSideTabBarArea();
|
||||||
|
}
|
||||||
dockContainer()->createAndSetupAutoHideContainer(area, this, TabIndex);
|
dockContainer()->createAndSetupAutoHideContainer(area, this, TabIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CDockWidget();
|
~CDockWidget() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We return a fixed minimum size hint or the size hint of the content
|
* We return a fixed minimum size hint or the size hint of the content
|
||||||
@@ -422,6 +422,22 @@ public:
|
|||||||
*/
|
*/
|
||||||
SideBarLocation autoHideLocation() const;
|
SideBarLocation autoHideLocation() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the preferred auto-hide sidebar location for this dock widget.
|
||||||
|
* When set to a value other than SideBarNone, the pin button will place
|
||||||
|
* this widget in the specified sidebar instead of using geometry-based
|
||||||
|
* detection. When unpinning, widgets with the same preferred location
|
||||||
|
* will be merged as tabs in the same dock area.
|
||||||
|
* Set to SideBarNone (default) to use the original geometry-based behavior.
|
||||||
|
*/
|
||||||
|
void setPreferredAutoHideSideBarLocation(SideBarLocation Location);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the preferred auto-hide sidebar location, or SideBarNone
|
||||||
|
* if no preference is set (geometry-based detection will be used).
|
||||||
|
*/
|
||||||
|
SideBarLocation preferredAutoHideSideBarLocation() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This property holds whether the dock widget is floating.
|
* This property holds whether the dock widget is floating.
|
||||||
* A dock widget is only floating, if it is the one and only widget inside
|
* A dock widget is only floating, if it is the one and only widget inside
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ struct DockWidgetTabPrivate
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto w = new CFloatingDragPreview(Widget);
|
auto w = new CFloatingDragPreview(Widget);
|
||||||
_this->connect(w, &CFloatingDragPreview::draggingCanceled, [=]()
|
_this->connect(w, &CFloatingDragPreview::draggingCanceled, [this]()
|
||||||
{
|
{
|
||||||
DragState = DraggingInactive;
|
DragState = DraggingInactive;
|
||||||
});
|
});
|
||||||
@@ -539,7 +539,7 @@ QMenu* CDockWidgetTab::buildContextMenu(QMenu *Menu)
|
|||||||
Menu = new QMenu(this);
|
Menu = new QMenu(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "CDockWidgetTab::buildContextMenu";
|
ADS_PRINT("CDockWidgetTab::buildContextMenu");
|
||||||
const bool isFloatable = d->DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable);
|
const bool isFloatable = d->DockWidget->features().testFlag(CDockWidget::DockWidgetFloatable);
|
||||||
const bool isTopLevelArea = d->DockArea->isTopLevelArea();
|
const bool isTopLevelArea = d->DockArea->isTopLevelArea();
|
||||||
const bool isFloating = d->DockWidget->isFloating();
|
const bool isFloating = d->DockWidget->isFloating();
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CDockWidgetTab();
|
~CDockWidgetTab() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true, if this is the active tab
|
* Returns true, if this is the active tab
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ struct FloatingDockContainerPrivate
|
|||||||
QPoint DragStartPos;
|
QPoint DragStartPos;
|
||||||
bool Hiding = false;
|
bool Hiding = false;
|
||||||
bool AutoHideChildren = true;
|
bool AutoHideChildren = true;
|
||||||
|
bool HideContentOnNextHide = false;
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||||
QWidget* MouseEventHandler = nullptr;
|
QWidget* MouseEventHandler = nullptr;
|
||||||
CFloatingWidgetTitleBar* TitleBar = nullptr;
|
CFloatingWidgetTitleBar* TitleBar = nullptr;
|
||||||
@@ -459,7 +460,7 @@ struct FloatingDockContainerPrivate
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_this->setWindowIcon(QApplication::windowIcon());
|
_this->setWindowIcon(CurrentWidget->windowIcon());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,6 +500,9 @@ void FloatingDockContainerPrivate::titleMouseReleaseEvent()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DockManager will be unlinked from this within DropContainer->dropFloatingWidget
|
||||||
|
const auto OriginalDockManager = this->DockManager.data();
|
||||||
|
|
||||||
if (DockManager->dockAreaOverlay()->dropAreaUnderCursor() != InvalidDockWidgetArea
|
if (DockManager->dockAreaOverlay()->dropAreaUnderCursor() != InvalidDockWidgetArea
|
||||||
|| DockManager->containerOverlay()->dropAreaUnderCursor() != InvalidDockWidgetArea)
|
|| DockManager->containerOverlay()->dropAreaUnderCursor() != InvalidDockWidgetArea)
|
||||||
{
|
{
|
||||||
@@ -532,8 +536,8 @@ void FloatingDockContainerPrivate::titleMouseReleaseEvent()
|
|||||||
DropContainer->dropFloatingWidget(_this, QCursor::pos());
|
DropContainer->dropFloatingWidget(_this, QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
DockManager->containerOverlay()->hideOverlay();
|
OriginalDockManager->containerOverlay()->hideOverlay();
|
||||||
DockManager->dockAreaOverlay()->hideOverlay();
|
OriginalDockManager->dockAreaOverlay()->hideOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -728,6 +732,11 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
|
|||||||
l->addWidget(d->DockContainer);
|
l->addWidget(d->DockContainer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (CDockManager::testConfigFlag(CDockManager::UseNativeWindows))
|
||||||
|
{
|
||||||
|
winId();
|
||||||
|
}
|
||||||
|
|
||||||
DockManager->registerFloatingWidget(this);
|
DockManager->registerFloatingWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,6 +854,12 @@ void CFloatingDockContainer::changeEvent(QEvent *event)
|
|||||||
this->showMaximized();
|
this->showMaximized();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||||
|
if (d->TitleBar)
|
||||||
|
{
|
||||||
|
d->TitleBar->setVisible(!(isFloating() && isFullScreen()));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -948,6 +963,15 @@ void CFloatingDockContainer::closeEvent(QCloseEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New bug (QWebEngineView reload side effect):
|
||||||
|
// when a WebEngine-based dock is tabified into a floating container, the
|
||||||
|
// embedded native/web process can trigger delayed hide/show cycles on the
|
||||||
|
// floating window. If every non-spontaneous hide propagates to
|
||||||
|
// DockWidget->toggleView(false), unrelated tabs are marked closed and seem
|
||||||
|
// to "disappear". We therefore arm HideContentOnNextHide only for the
|
||||||
|
// explicit close path.
|
||||||
|
d->HideContentOnNextHide = true;
|
||||||
|
|
||||||
// In Qt version after 5.9.2 there seems to be a bug that causes the
|
// In Qt version after 5.9.2 there seems to be a bug that causes the
|
||||||
// QWidget::event() function to not receive any NonClientArea mouse
|
// QWidget::event() function to not receive any NonClientArea mouse
|
||||||
// events anymore after a close/show cycle. The bug is reported here:
|
// events anymore after a close/show cycle. The bug is reported here:
|
||||||
@@ -975,6 +999,15 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only a close operation should propagate hide->toggleView(false) to
|
||||||
|
// child dock widgets. Generic hide/show cycles (e.g. from platform or
|
||||||
|
// embedded native content) must not change dock open/closed state.
|
||||||
|
if (!d->HideContentOnNextHide)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
d->HideContentOnNextHide = false;
|
||||||
|
|
||||||
if ( d->AutoHideChildren )
|
if ( d->AutoHideChildren )
|
||||||
{
|
{
|
||||||
d->Hiding = true;
|
d->Hiding = true;
|
||||||
@@ -1190,8 +1223,9 @@ void CFloatingDockContainer::finishDropOperation()
|
|||||||
if (d->DockManager)
|
if (d->DockManager)
|
||||||
{
|
{
|
||||||
d->DockManager->removeFloatingWidget(this);
|
d->DockManager->removeFloatingWidget(this);
|
||||||
d->DockManager->removeDockContainer(this->dockContainer());
|
d->DockManager.clear();
|
||||||
}
|
}
|
||||||
|
this->dockContainer()->removeFromDockManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Virtual Destructor
|
* Virtual Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~CFloatingDockContainer();
|
~CFloatingDockContainer() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access function for the internal dock container
|
* Access function for the internal dock container
|
||||||
|
|||||||
@@ -238,6 +238,20 @@ void CFloatingWidgetTitleBar::mouseDoubleClickEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
QSize CFloatingWidgetTitleBar::sizeHint() const
|
||||||
|
{
|
||||||
|
if (isVisible())
|
||||||
|
{
|
||||||
|
return QFrame::sizeHint();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Allow titlebar to collapse when set invisible.
|
||||||
|
return QSize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
void CFloatingWidgetTitleBar::setMaximizedIcon(bool maximized)
|
void CFloatingWidgetTitleBar::setMaximizedIcon(bool maximized)
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ protected:
|
|||||||
virtual void mouseReleaseEvent(QMouseEvent *ev) override;
|
virtual void mouseReleaseEvent(QMouseEvent *ev) override;
|
||||||
virtual void mouseMoveEvent(QMouseEvent *ev) override;
|
virtual void mouseMoveEvent(QMouseEvent *ev) override;
|
||||||
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
|
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||||
|
virtual QSize sizeHint() const override;
|
||||||
|
|
||||||
void setMaximizeIcon(const QIcon& Icon);
|
void setMaximizeIcon(const QIcon& Icon);
|
||||||
QIcon maximizeIcon() const;
|
QIcon maximizeIcon() const;
|
||||||
|
|||||||
@@ -75,13 +75,17 @@ ads--CDockWidgetTab[activeTab="true"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab QLabel {
|
ads--CDockWidgetTab QLabel {
|
||||||
color: palette(dark);
|
color: palette(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||||
color: palette(foreground);
|
color: palette(foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#autoHideTitleLabel {
|
||||||
|
padding-left: 4px;
|
||||||
|
color: palette(foreground);
|
||||||
|
}
|
||||||
|
|
||||||
#tabCloseButton {
|
#tabCloseButton {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
@@ -278,7 +282,7 @@ ads--CAutoHideDockContainer ads--CDockAreaWidget[focused="true"] ads--CDockAreaT
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#autoHideTitleLabel {
|
ads--CAutoHideDockContainer #autoHideTitleLabel {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
color: palette(light);
|
color: palette(light);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,12 @@ ads--CTitleBarButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#autoHideTitleLabel {
|
||||||
|
padding-left: 4px;
|
||||||
|
color: palette(foreground);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#tabsMenuButton {
|
#tabsMenuButton {
|
||||||
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
||||||
qproperty-iconSize: 16px;
|
qproperty-iconSize: 16px;
|
||||||
@@ -79,7 +85,7 @@ ads--CDockWidgetTab[activeTab="true"] {
|
|||||||
|
|
||||||
|
|
||||||
ads--CDockWidgetTab QLabel {
|
ads--CDockWidgetTab QLabel {
|
||||||
color: palette(dark);
|
color: palette(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -88,6 +94,12 @@ ads--CDockWidgetTab[activeTab="true"] QLabel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#autoHideTitleLabel {
|
||||||
|
padding-left: 4px;
|
||||||
|
color: palette(foreground);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#tabCloseButton {
|
#tabCloseButton {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
background: none;
|
background: none;
|
||||||
@@ -314,7 +326,7 @@ ads--CAutoHideDockContainer ads--CDockAreaWidget[focused="true"] ads--CDockAreaT
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#autoHideTitleLabel {
|
ads--CAutoHideDockContainer #autoHideTitleLabel {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
color: palette(light);
|
color: palette(light);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,13 +88,17 @@ ads--CDockWidgetTab[activeTab="true"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab QLabel {
|
ads--CDockWidgetTab QLabel {
|
||||||
color: palette(dark);
|
color: palette(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||||
color: palette(foreground);
|
color: palette(foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#autoHideTitleLabel {
|
||||||
|
padding-left: 4px;
|
||||||
|
color: palette(foreground);
|
||||||
|
}
|
||||||
|
|
||||||
#tabCloseButton {
|
#tabCloseButton {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
@@ -134,7 +138,7 @@ ads--CDockWidgetTab[focused="true"] > #tabCloseButton:pressed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[focused="true"] QLabel {
|
ads--CDockWidgetTab[focused="true"] QLabel {
|
||||||
color: palette(light);
|
color: palette(highlighted-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -316,7 +320,7 @@ ads--CAutoHideDockContainer ads--CDockAreaWidget[focused="true"] ads--CDockAreaT
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#autoHideTitleLabel {
|
ads--CAutoHideDockContainer #autoHideTitleLabel {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
color: palette(light);
|
color: palette(light);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ ads--CTitleBarButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#autoHideTitleLabel {
|
||||||
|
padding-left: 4px;
|
||||||
|
color: palette(foreground);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#tabsMenuButton {
|
#tabsMenuButton {
|
||||||
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
qproperty-icon: url(:/ads/images/tabs-menu-button.svg);
|
||||||
qproperty-iconSize: 16px;
|
qproperty-iconSize: 16px;
|
||||||
@@ -95,7 +101,7 @@ ads--CDockWidgetTab[activeTab="true"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab QLabel {
|
ads--CDockWidgetTab QLabel {
|
||||||
color: palette(dark);
|
color: palette(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
ads--CDockWidgetTab[activeTab="true"] QLabel {
|
||||||
@@ -142,7 +148,7 @@ ads--CDockWidgetTab[focused="true"] > #tabCloseButton:pressed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ads--CDockWidgetTab[focused="true"] QLabel {
|
ads--CDockWidgetTab[focused="true"] QLabel {
|
||||||
color: palette(light);
|
color: palette(highlighted-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -391,7 +397,7 @@ ads--CAutoHideDockContainer ads--CDockAreaWidget[focused="true"] ads--CDockAreaT
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#autoHideTitleLabel {
|
ads--CAutoHideDockContainer #autoHideTitleLabel {
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
color: palette(light);
|
color: palette(light);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user