-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
222 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,12 @@ Upstream-Contact: <[email protected]> | |
Source: https://www.github.com/KDAB/KDDockWidgets | ||
|
||
#misc source code | ||
Files: *.qrc *.json *.xml src/fwd_headers/* | ||
Files: *.qrc *.json *.xml | ||
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
License: GPL-2.0-only OR GPL-3.0-only | ||
|
||
#misc documentation | ||
Files: CONTRIBUTORS.txt Changelog README.md README-porting.md README-QtQuick.md README-Flutter.md README-WASM.md README-Wayland.md README-bindings.md README-troubleshooting conan/README.txt python/examples/README.txt python/examples-qt6/README.txt docs_devel/*.md docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html src/3rdparty/qcoro/README examples/qtquick/customseparator/README.md docs/book/** book.toml | ||
Files: CONTRIBUTORS.txt Changelog README.md README-porting.md README-QtQuick.md README-Flutter.md README-WASM.md README-Wayland.md README-troubleshooting conan/README.txt python/examples/README.txt python/examples-qt6/README.txt docs_devel/*.md docs/KDDockWidgets-CopyrightAssignmentForm.pdf *.html src/3rdparty/qcoro/README examples/qtquick/customseparator/README.md docs/book/** book.toml | ||
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
License: GPL-2.0-only OR GPL-3.0-only | ||
|
||
|
@@ -23,8 +23,8 @@ Files: screencap.gif images/* src/img/* docs/api/*.png examples/dockwidgets/asse | |
Copyright: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
License: GPL-2.0-only OR GPL-3.0-only | ||
|
||
#3rdparty | ||
Files: cmake/ECM/modules/* | ||
#3rdparty ECM (a few are missing reuse headers) | ||
Files: cmake/ECM/modules/ECMVersionHeader.h.in cmake/ECM/modules/ecm_uninstall.cmake.in cmake/ECM/modules/BSD-3-Clause.txt | ||
Copyright: The KDE Project | ||
License: BSD-3-Clause | ||
|
||
|
@@ -33,11 +33,7 @@ Files: src/3rdparty/kdbindings/genindex_array.h | |
Copyright: 2021 Jeremy Burns | ||
License: MIT | ||
|
||
Files: tests/flutter_tests_embedder/tests_embedder.cpp tests/flutter_tests_embedder/tests_embedder.h examples/flutter/windows/runner/runner.exe.manifest examples/flutter/windows/runner/resources/app_icon.ico | ||
Copyright: Copyright 2013 The Flutter Authors | ||
License: LicenseRef-FlutterBSD | ||
|
||
# Flutter macOS autogenerated files | ||
Files: examples/flutter/macos/** examples/flutter/.metadata | ||
Copyright: Copyright 2013 The Flutter Authors | ||
# Flutter | ||
Files: tests/flutter_tests_embedder/tests_embedder.* examples/flutter/assets/* examples/flutter/macos/Runner/Configs/AppInfo.xcconfig examples/flutter/.metadata examples/flutter/macos/Runner/Assets.xcassets/* examples/flutter/macos/Runner.xcodeproj/* examples/flutter/macos/Flutter/* examples/flutter/macos/Runner.xcworkspace/* examples/flutter/macos/.gitignore examples/flutter/macos/Runner/Configs/*.xcconfig examples/flutter/macos/Runner/Base.lproj/MainMenu.xib examples/flutter/macos/Runner/DebugProfile.entitlements examples/flutter/macos/Runner/Info.plist examples/flutter/macos/Runner/Release.entitlements examples/flutter/windows/runner/resources/app_icon.ico examples/flutter/windows/runner/runner.exe.manifest | ||
Copyright: Copyright 2013-2014 The Flutter Authors | ||
License: LicenseRef-FlutterBSD |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release | |
1.7.0 final | ||
* Wed Sep 14 2022 Allen Winter <[email protected]> 1.6.0 | ||
1.6.0 final | ||
* Mon Nov 24 2021 Allen Winter <[email protected]> 1.5.0 | ||
* Wed Nov 24 2021 Allen Winter <[email protected]> 1.5.0 | ||
1.5.0 final | ||
* Fri Jul 16 2021 Allen Winter <[email protected]> 1.4.0 | ||
1.4.0 final | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE= | |
%dir %{_libdir}/cmake/KDDockWidgets-qt6 | ||
%{_libdir}/cmake/KDDockWidgets-qt6/* | ||
%{_libdir}/libkddockwidgets-qt6.so | ||
#%{_prefix}/mkspecs/modules/* ECMGeneratePriFile isn't ported to Qt6 yet | ||
%{_libdir}/qt6/mkspecs/modules/* | ||
|
||
%changelog | ||
* Tue Nov 21 2023 Allen Winter <[email protected]> 2.0.0 | ||
|
@@ -93,7 +93,7 @@ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_QT6=True -DCMAKE_BUILD_TYPE= | |
1.7.0 final | ||
* Wed Sep 14 2022 Allen Winter <[email protected]> 1.6.0 | ||
1.6.0 final | ||
* Mon Nov 24 2021 Allen Winter <[email protected]> 1.5.0 | ||
* Wed Nov 24 2021 Allen Winter <[email protected]> 1.5.0 | ||
1.5.0 final | ||
* Fri Jul 16 2021 Allen Winter <[email protected]> 1.4.0 | ||
1.4.0 final | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Architecture and Concepts | ||
|
||
`KDDockWidgets` is divided into `Core` and one `frontend` for each supported `GUI toolkit`.<br> | ||
The `Core` is pure `C++` with no dependency on `Qt`. Business logic and state often lives here, and classes are | ||
namespaced with `KDDockWidgets::Core::`.<br> | ||
We have two complete frontends, `qtwidgets` and `qtquick` and a third one called `flutter`, which is lacking some futures still. Their code is namespaced with `KDDockWidgets::QtWidgets`, `KDDockWidgets::QtQuick` and `KDDockWidgets::Flutter` respectively. | ||
|
||
## Views and Controllers | ||
|
||
`View` is a fancy word that meant `QWidget`. Since we introduced support for non-QtWidget toolkits we needed to drop the QWidget nomenculature. For QtQuick, views are `QQuickItem`s, and for Flutter, they are `StatefullWidget`. | ||
|
||
While views are something graphical, which depends on the rendering technology you're using, `Controllers` on the other hand are gui-agnostic, they live in `Core`, and are reused by all frontends. | ||
|
||
Here's a list of controllers and views: | ||
- TitleBar | ||
- TabBar | ||
- Stack | ||
- Group | ||
- DockWidget | ||
- MainWindow | ||
- FloatingWindow | ||
- DropArea | ||
|
||
For each of the above there's a View and a Controller. For example, for TitleBar, there's `Core::TitleBar`, implemented in `src/core/TitleBar.cpp`, which is rendered by `QtWidgets::TitleBar` (or `QtQuick::TitleBar` or `Flutter::TitleBar`), implemented in `/src/qtwidgets/views/TitleBar.cpp` and so on. | ||
|
||
Porting to another GUI toolkit involves reimplementing all views. | ||
|
||
## Platform, Screen, Window, ViewFactory | ||
Not everything is a View/Controller. There's a bunch of other abstractions that need to be implemented when creating a new frontend. | ||
|
||
While Qt has `QGuiApplication`, `QScreen`, `QWindow` we have similar abstractions but in a more toolkit agnostic way. See all the pure virtual methods in Core::Platform, Core::Screen, Core::Window and View::Factory and implement them. | ||
|
||
## Layouting engine | ||
|
||
This is like the core of the core, it lives in src/core/layouting. The code there doesn't know anything about docking | ||
or dnd. It implements our layouting, which is a recursively nested layout. Imagine a layout composed nested QVBoxLayout and QHBoxLayout supporting any depth. min/max/preferred sizes are supported and recursively propagated up. | ||
See `src/core/layouting/examples` for how to use just this layouting engine without any docking. This is pure C++ and doesn't depend on Qt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_DROPAREA_QTQUICK_H | ||
#define KD_DROPAREA_QTQUICK_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -33,4 +36,7 @@ class DOCKS_EXPORT DropArea : public QtQuick::View | |
}; | ||
|
||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_MDILAYOUT_QTQUICK_H | ||
#define KD_MDILAYOUT_QTQUICK_H | ||
|
||
#pragma once | ||
|
||
#include "kddockwidgets/docks_export.h" | ||
|
@@ -35,4 +38,7 @@ class DOCKS_EXPORT MDILayout : public QtQuick::View | |
}; | ||
|
||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_SIDEBAR_QTQUICK_H | ||
#define KD_SIDEBAR_QTQUICK_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_VIEW_QTQUICK_H | ||
#define KD_VIEW_QTQUICK_H | ||
|
||
#pragma once | ||
|
||
#include "kddockwidgets/core/Controller.h" | ||
|
@@ -218,3 +221,5 @@ inline qreal logicalDpiFactor(const QQuickItem *item) | |
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_VIEWWRAPPER_QTQUICK_H | ||
#define KD_VIEWWRAPPER_QTQUICK_H | ||
|
||
#pragma once | ||
|
||
#include "../../qtcommon/ViewWrapper_p.h" | ||
|
@@ -74,3 +77,5 @@ class DOCKS_EXPORT ViewWrapper : public QtCommon::ViewWrapper | |
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
* @author Sérgio Martins \<[email protected]\> | ||
*/ | ||
|
||
#ifndef KD_DROPAREA_QTWIDGETS_H | ||
#define KD_DROPAREA_QTWIDGETS_H | ||
#pragma once | ||
|
||
#include "kddockwidgets/docks_export.h" | ||
|
@@ -43,4 +45,7 @@ class DOCKS_EXPORT DropArea : public QtWidgets::View<QWidget> | |
}; | ||
|
||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_FLOATINGWINDOW_QTWIDGETS_H | ||
#define KD_FLOATINGWINDOW_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -58,4 +61,7 @@ class DOCKS_EXPORT FloatingWindow : public View<QWidget> | |
void updateMargins(); | ||
Q_DISABLE_COPY(FloatingWindow) | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_GROUP_QTWIDGETS_H | ||
#define KD_GROUP_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -41,3 +44,5 @@ class DOCKS_EXPORT Group : public View<QWidget>, public Core::GroupViewInterface | |
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_MDILAYOUT_QTWIDGETS_H | ||
#define KD_MDILAYOUT_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "kddockwidgets/docks_export.h" | ||
|
@@ -35,4 +38,7 @@ class DOCKS_EXPORT MDILayout : public QtWidgets::View<QWidget> | |
}; | ||
|
||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_RUBBERBAND_QTWIDGETS_H | ||
#define KD_RUBBERBAND_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -30,3 +33,5 @@ class DOCKS_EXPORT RubberBand : public View<QRubberBand> | |
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_SEGMENTEDDROPINDICATOROVERLAY_QTWIDGETS_H | ||
#define KD_SEGMENTEDDROPINDICATOROVERLAY_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -45,3 +48,5 @@ class DOCKS_EXPORT SegmentedDropIndicatorOverlay : public View<QWidget> | |
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_SEPARATOR_QTWIDGETS_H | ||
#define KD_SEPARATOR_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
#include "View.h" | ||
|
@@ -41,3 +44,5 @@ class DOCKS_EXPORT Separator : public View<QWidget> | |
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ | |
Contact KDAB at <[email protected]> for commercial licensing options. | ||
*/ | ||
|
||
#ifndef KD_STACK_QTWIDGETS_H | ||
#define KD_STACK_QTWIDGETS_H | ||
|
||
#pragma once | ||
|
||
|
@@ -57,3 +59,5 @@ class DOCKS_EXPORT Stack : public View<QTabWidget>, public Core::StackViewInterf | |
|
||
} | ||
} | ||
|
||
#endif |
Oops, something went wrong.