Skip to content

Commit 4b27af9

Browse files
authored
Merge branch 'githubuser0xFFFF:master' into master
2 parents d0c1009 + 0df1a41 commit 4b27af9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1589
-324
lines changed

.github/workflows/linux-builds.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
os: [ubuntu-latest, ubuntu-18.04, ubuntu-16.04]
9+
os: [ubuntu-latest, ubuntu-20.04, ubuntu-18.04]
1010

1111
runs-on: ${{ matrix.os }}
1212

@@ -16,7 +16,7 @@ jobs:
1616
run: |
1717
sudo apt-get update --fix-missing
1818
sudo apt-get install qt5-default
19-
sudo apt-get install libqt5x11extras5-dev
19+
sudo apt-get install qtbase5-private-dev
2020
- name: qmake
2121
run: qmake
2222
- name: make

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,4 @@ FodyWeavers.xsd
383383
/ build
384384
/Settings.ini
385385
.vscode/settings.json
386+
/.settings

.settings/language.settings.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ matrix:
99
os: linux
1010
dist: trusty
1111
group: stable
12-
before_install:
13-
- sudo apt-get -y install libqt5x11extras5-dev
1412
addons:
1513
apt:
1614
sources:
@@ -20,8 +18,6 @@ matrix:
2018
packages:
2119
- qt55base
2220
- qt55tools
23-
- qt55x11extras
24-
- libqt5x11extras5-dev
2521
- gcc-9
2622
- g++-9
2723
script:
@@ -39,8 +35,6 @@ matrix:
3935
services:
4036
- xvfb
4137
compiler: gcc
42-
before_install:
43-
- sudo apt-get -y install libqt5x11extras5-dev
4438
addons:
4539
apt:
4640
sources:
@@ -50,8 +44,6 @@ matrix:
5044
packages:
5145
- qt514base
5246
- qt514tools
53-
- qt514x11extras
54-
- libqt5x11extras5-dev
5547
- gcc-9
5648
- g++-9
5749
- libc6-i386
@@ -73,8 +65,6 @@ matrix:
7365
services:
7466
- xvfb
7567
compiler: gcc
76-
before_install:
77-
- sudo apt-get -y install libqt5x11extras5-dev
7868
addons:
7969
apt:
8070
sources:
@@ -84,8 +74,6 @@ matrix:
8474
packages:
8575
- qt514base
8676
- qt514tools
87-
- qt514x11extras
88-
- libqt5x11extras5-dev
8977
- gcc-9
9078
- g++-9
9179
- libc6-i386
@@ -107,8 +95,6 @@ matrix:
10795
services:
10896
- xvfb
10997
compiler: gcc
110-
before_install:
111-
- sudo apt-get -y install libqt5x11extras5-dev
11298
addons:
11399
apt:
114100
sources:
@@ -118,8 +104,6 @@ matrix:
118104
packages:
119105
- qt514base
120106
- qt514tools
121-
- qt514x11extras
122-
- libqt5x11extras5-dev
123107
- gcc-9
124108
- g++-9
125109
- libc6-i386
@@ -147,8 +131,6 @@ matrix:
147131
services:
148132
- xvfb
149133
compiler: gcc
150-
before_install:
151-
- sudo apt-get -y install libqt5x11extras5-dev
152134
addons:
153135
apt:
154136
sources:
@@ -158,8 +140,6 @@ matrix:
158140
packages:
159141
- qt514base
160142
- qt514tools
161-
- qt514x11extras
162-
- libqt5x11extras5-dev
163143
- gcc-9
164144
- g++-9
165145
- libc6-i386

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ integrated development environments (IDEs) such as Visual Studio.
1515

1616
## New and Noteworthy
1717

18+
The [release 3.8](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.8.0)
19+
adds the following features:
20+
21+
- option to close tabs with the middle mouse button
22+
- `DeleteContentOnClose` flag for dynamic deletion and creation of dock widget
23+
content
24+
1825
The [release 3.7](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.7.0)
1926
adds the following features:
2027

@@ -81,6 +88,8 @@ know it from Visual Studio.
8188
- [ezEditor](#ezeditor)
8289
- [D-Tect X](#d-tect-x)
8390
- [HiveWE](#hivewe)
91+
- [Ramses Composer](#ramses-composer)
92+
- [Plot Juggler](#plot-juggler)
8493

8594
### Docking everywhere - no central widget
8695

@@ -219,7 +228,13 @@ Screenshot Ubuntu:
219228

220229
## Build
221230

222-
Open the `ads.pro` with QtCreator and start the build, that's it.
231+
The Linux build requires private header files. Make sure that they are installed:
232+
233+
```bash
234+
sudo apt install qtbase5-private-dev
235+
```
236+
237+
Open the `ads.pro` file with QtCreator and start the build, that's it.
223238
You can run the demo project and test it yourself.
224239

225240
## Getting started / Example
@@ -391,3 +406,38 @@ of the open editor windows.
391406
[learn more...](https://github.com/stijnherfst/HiveWE)
392407
393408
![HiveWE](doc/showcase_hivewe.png)
409+
410+
### [Ramses Composer](https://github.com/GENIVI/ramses-composer)
411+
412+
Ramses Composer is the authoring tool for the open source [RAMSES](https://github.com/GENIVI/ramses)
413+
rendering ecosystem.
414+
415+
Ramses is a low-level rendering engine which is optimized for embedded hardware
416+
mobile devices, automotive ECUs, IoT electronics. Ramses was initially developed
417+
at the BMW Group and open-sourced in 2018 as part of a collaboration initiative
418+
with the Genivi Alliance. It is an important part of the BMW infotainment cluster
419+
and digital portfolio.
420+
421+
[learn more...](https://github.com/GENIVI/ramses-composer)
422+
423+
![RamsesComposer](doc/showcase_ramses_composer.png)
424+
425+
### [Plot Juggler](https://github.com/facontidavide/PlotJuggler)
426+
427+
PlotJuggler is a fast, powerful and intuitive tool to visualize time series.
428+
It makes it easy to visualize data but also to analyze it. You can manipulate
429+
your time series using a simple and extendable Transform Editor. Some of the
430+
highlights are:
431+
432+
- Simple Drag & Drop user interface.
433+
- Load data from file.
434+
- Connect to live streaming of data.
435+
- Save the visualization layout and configurations to re-use them later.
436+
- Fast OpenGL visualization.
437+
- Can handle thousands of timeseries and millions of data points.
438+
- Transform your data using a simple editor: derivative, moving average, integral, etc…
439+
- PlotJuggler can be easily extended using plugins.
440+
441+
[read more...](https://github.com/facontidavide/PlotJuggler)
442+
443+
[![Plot Juggler](doc/showcase_plot_juggler.png)](https://vimeo.com/480588113#t=46s)

ads.pri

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11

2-
lessThan(QT_MAJOR_VERSION, 6) {
3-
CONFIG(debug, debug|release){
4-
win32 {
5-
LIBS += -lqtadvanceddockingd
6-
}
7-
else:mac {
8-
LIBS += -lqtadvanceddocking_debug
9-
}
10-
else {
11-
LIBS += -lqtadvanceddocking
12-
}
2+
CONFIG(debug, debug|release){
3+
win32 {
4+
versionAtLeast(QT_VERSION, 5.15.0) {
5+
LIBS += -lqtadvanceddocking
6+
}
7+
else {
8+
LIBS += -lqtadvanceddockingd
9+
}
1310
}
14-
else{
11+
else:mac {
12+
LIBS += -lqtadvanceddocking_debug
13+
}
14+
else {
1515
LIBS += -lqtadvanceddocking
1616
}
1717
}
18-
else {
19-
# qt$$qtLibraryTarget(qtadvanceddocking) does not produce an advanceddockingd.dll file on Windows
20-
# for Qt6 - I don't know if this is a bug and I have to investigate
18+
else{
2119
LIBS += -lqtadvanceddocking
2220
}
2321

2422

2523
unix:!macx {
2624
LIBS += -lxcb
27-
QT += x11extras
2825
}

adsConfig.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ include(CMakeFindDependencyMacro)
22
find_dependency(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
33
find_dependency(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
44
find_dependency(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
5-
if(UNIX AND NOT APPLE)
6-
find_dependency(Qt5X11Extras ${REQUIRED_QT_VERSION} REQUIRED)
7-
endif()
85
include("${CMAKE_CURRENT_LIST_DIR}/adsTargets.cmake")

demo/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
cmake_minimum_required(VERSION 3.5)
22
project(ads_demo VERSION ${VERSION_SHORT})
33

4-
find_package(Qt5 5.5 COMPONENTS Core Gui Widgets REQUIRED)
5-
if(WIN32)
6-
find_package(Qt5 5.5 COMPONENTS AxContainer REQUIRED)
4+
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
5+
find_package(Qt${QT_VERSION_MAJOR} 5.5 COMPONENTS Core Gui Widgets REQUIRED)
6+
if(WIN32 AND QT_VERSION_MAJOR LESS 6)
7+
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS AxContainer REQUIRED)
78
endif()
89
set(CMAKE_INCLUDE_CURRENT_DIR ON)
910
set(ads_demo_SRCS
@@ -16,9 +17,11 @@ set(ads_demo_SRCS
1617
)
1718
add_executable(AdvancedDockingSystemDemo WIN32 ${ads_demo_SRCS})
1819
target_include_directories(AdvancedDockingSystemDemo PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../src")
19-
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets)
20-
if(WIN32)
21-
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt5::AxContainer)
20+
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt${QT_VERSION_MAJOR}::Core
21+
Qt${QT_VERSION_MAJOR}::Gui
22+
Qt${QT_VERSION_MAJOR}::Widgets)
23+
if(WIN32 AND QT_VERSION_MAJOR LESS 6)
24+
target_link_libraries(AdvancedDockingSystemDemo PUBLIC Qt${QT_VERSION_MAJOR}::AxContainer)
2225
endif()
2326
target_link_libraries(AdvancedDockingSystemDemo PRIVATE qtadvanceddocking)
2427
set_target_properties(AdvancedDockingSystemDemo PROPERTIES

demo/MainWindow.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#include "FloatingDockContainer.h"
8080
#include "DockComponentsFactory.h"
8181
#include "StatusDialog.h"
82-
82+
#include "DockSplitter.h"
8383

8484

8585
/**
@@ -417,6 +417,22 @@ void MainWindowPrivate::createContent()
417417
DockWidget = createCalendarDockWidget();
418418
DockWidget->setTabToolTip(QString("Tab ToolTip\nHodie est dies magna"));
419419
auto DockArea = DockManager->addDockWidget(ads::CenterDockWidgetArea, DockWidget, TopDockArea);
420+
// Now we create a action to test resizing of DockArea widget
421+
auto Action = ui.menuTests->addAction(QString("Resize %1").arg(DockWidget->windowTitle()));
422+
QObject::connect(Action, &QAction::triggered, [DockArea]()
423+
{
424+
// Resizing only works, if the Splitter is visible and has a valid
425+
// sizes
426+
auto Splitter = ads::internal::findParent<ads::CDockSplitter*>(DockArea);
427+
if (!Splitter)
428+
{
429+
return;
430+
}
431+
// We change the sizes of the splitter that contains the Calendar 1 widget
432+
// to resize the dock widget
433+
int Width = Splitter->width();
434+
Splitter->setSizes({Width * 2/3, Width * 1/3});
435+
});
420436

421437
// Now we add a custom button to the dock area title bar that will create
422438
// new editor widgets when clicked
@@ -443,13 +459,14 @@ void MainWindowPrivate::createContent()
443459
DockManager->addDockWidget(ads::CenterDockWidgetArea, createLongTextLabelDockWidget(), RighDockArea);
444460
DockManager->addDockWidget(ads::CenterDockWidgetArea, createLongTextLabelDockWidget(), BottomDockArea);
445461

446-
auto Action = ui.menuTests->addAction(QString("Set %1 Floating").arg(DockWidget->windowTitle()));
462+
Action = ui.menuTests->addAction(QString("Set %1 Floating").arg(DockWidget->windowTitle()));
447463
DockWidget->connect(Action, SIGNAL(triggered()), SLOT(setFloating()));
448464
Action = ui.menuTests->addAction(QString("Set %1 As Current Tab").arg(DockWidget->windowTitle()));
449465
DockWidget->connect(Action, SIGNAL(triggered()), SLOT(setAsCurrentTab()));
450466
Action = ui.menuTests->addAction(QString("Raise %1").arg(DockWidget->windowTitle()));
451467
DockWidget->connect(Action, SIGNAL(triggered()), SLOT(raise()));
452468

469+
453470
#ifdef Q_OS_WIN
454471
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
455472
if (!ads::CDockManager::testConfigFlag(ads::CDockManager::OpaqueUndocking))
@@ -613,6 +630,9 @@ CMainWindow::CMainWindow(QWidget *parent) :
613630
// uncomment if you would like to enable an equal distribution of the
614631
// available size of a splitter to all contained dock widgets
615632
// CDockManager::setConfigFlag(CDockManager::EqualSplitOnInsertion, true);
633+
634+
// uncomment if you would like to close tabs with the middle mouse button, web browser style
635+
// CDockManager::setConfigFlag(CDockManager::MiddleMouseButtonClosesTab, true);
616636

617637
// Now create the dock manager and its content
618638
d->DockManager = new CDockManager(this);

demo/demo.py renamed to demo/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ def create_content(self):
215215
dock_widget = self.create_calendar_dock_widget()
216216
dock_widget.setTabToolTip("Tab ToolTip\nHodie est dies magna")
217217
dock_area = self.dock_manager.addDockWidget(QtAds.CenterDockWidgetArea, dock_widget, top_dock_area)
218+
# Now we create a action to test resizing of DockArea widget
219+
action = self.menuTests.addAction("Resize {}".format(dock_widget.windowTitle()))
220+
def action_triggered():
221+
splitter = QtAds.internal.findParent(QtAds.CDockSplitter, dock_area)
222+
if not splitter:
223+
return
224+
# We change the sizes of the splitter that contains the Calendar 1 widget
225+
# to resize the dock widget
226+
width = splitter.width()
227+
splitter.setSizes([width * 2/3, width * 1/3])
228+
action.triggered.connect(action_triggered)
218229

219230
# Now we add a custom button to the dock area title bar that will create
220231
# new editor widgets when clicked

0 commit comments

Comments
 (0)