KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
core/ViewFactory.h
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#ifndef KDDOCKWIDGETS_ViewFactory_H
13#define KDDOCKWIDGETS_ViewFactory_H
14
15#include "View.h"
16#include "kddockwidgets/docks_export.h"
17#include "kddockwidgets/KDDockWidgets.h"
18
19
20QT_BEGIN_NAMESPACE
21class QAbstractButton;
22QT_END_NAMESPACE
23
24namespace KDDockWidgets {
25
26namespace Core {
27
28class Action;
29class ClassicIndicatorWindowViewInterface;
30class DropIndicatorOverlay;
31class DropArea;
32class Separator;
33class TabBar;
34class SideBar;
35class FloatingWindow;
36class MainWindow;
37class ClassicDropIndicatorOverlay;
38class SegmentedDropIndicatorOverlay;
39class TitleBar;
40
56class DOCKS_EXPORT ViewFactory : public Core::Object
57{
58 Q_OBJECT
59public:
60 ViewFactory() = default;
61
64 virtual ~ViewFactory();
65
68 virtual View *createDockWidget(const QString &uniqueName, DockWidgetOptions options = {},
69 LayoutSaverOptions layoutSaverOptions = {},
70 Qt::WindowFlags windowFlags = {}) const = 0;
71
72
78 virtual View *createGroup(Core::Group *, View *parent = nullptr) const = 0;
79
83 virtual View *createTitleBar(Core::TitleBar *controller, View *parent) const = 0;
84
88 virtual View *createStack(Core::Stack *stack, View *parent) const = 0;
89
93 virtual View *createTabBar(Core::TabBar *tabBar, View *parent = nullptr) const = 0;
94
99 virtual View *createSeparator(Core::Separator *, View *parent = nullptr) const = 0;
100
105 Core::MainWindow *parent = nullptr,
106 Qt::WindowFlags windowFlags = {}) const = 0;
107
108
113
115 virtual View *
117 View *parent) const = 0;
118
120 virtual View *createDropArea(Core::DropArea *, View *parent) const = 0;
121
123 virtual View *createMDILayout(Core::MDILayout *, View *parent) const = 0;
124
126 virtual View *createRubberBand(View *parent) const = 0;
127
132 virtual View *createSideBar(Core::SideBar *, View *parent) const = 0;
133
136 virtual KDDockWidgets::Core::Action *createAction(Core::DockWidget *, const char *debugName) const = 0;
137
140 virtual Icon iconForButtonType(TitleBarButtonType type, double dpr) const = 0;
141
144
145private:
147};
148
149}
150
151}
152
153#endif
#define KDDW_DELETE_COPY_CTOR(NAME)
The window that will hold the classic indicators This is a window so it can be over the window that i...
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
The MDILayout class implements a layout suitable for MDI style docking. Where dock widgets are free t...
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
A factory class for allowing the user to customize some internal views. This is optional,...
virtual KDDockWidgets::Core::Action * createAction(Core::DockWidget *, const char *debugName) const =0
Creates a QAction if QtWidgets, or an equivalent fallback if QtQuick/Flutter Not needed to be overrid...
virtual View * createRubberBand(View *parent) const =0
Called by the framework to create a RubberBand view to show as drop zone.
virtual View * createSeparator(Core::Separator *, View *parent=nullptr) const =0
Called by the framework to create a Separator view Override to provide your own Separator sub-class....
virtual View * createDockWidget(const QString &uniqueName, DockWidgetOptions options={}, LayoutSaverOptions layoutSaverOptions={}, Qt::WindowFlags windowFlags={}) const =0
Creates a dock widget. This is only used by MainWindow's persistent widget feature....
virtual View * createStack(Core::Stack *stack, View *parent) const =0
Called by the framework to create a Stack view Override to provide your own Stack sub-class.
virtual View * createSideBar(Core::SideBar *, View *parent) const =0
Called by the framework to create a SideBar view.
virtual Core::ClassicIndicatorWindowViewInterface * createClassicIndicatorWindow(Core::ClassicDropIndicatorOverlay *, Core::View *parent=nullptr) const =0
Creates the window that will show the actual drop indicators. They need a higher z-order,...
virtual View * createMDILayout(Core::MDILayout *, View *parent) const =0
Called by the framework to create a MDI Layout view.
virtual View * createTabBar(Core::TabBar *tabBar, View *parent=nullptr) const =0
Called by the framework to create a TabBar view Override to provide your own TabBar sub-class.
virtual View * createDropArea(Core::DropArea *, View *parent) const =0
Called by the framework to create a DropArea view.
virtual View * createSegmentedDropIndicatorOverlayView(Core::SegmentedDropIndicatorOverlay *controller, View *parent) const =0
Creates the view that will parent the segmented drop indicators.
virtual View * createFloatingWindow(Core::FloatingWindow *controller, Core::MainWindow *parent=nullptr, Qt::WindowFlags windowFlags={}) const =0
Called by the framework to create a FloatingWindow view Override to provide your own FloatingWindow s...
virtual View * createTitleBar(Core::TitleBar *controller, View *parent) const =0
Called by the framework to create a TitleBar view Override to provide your own TitleBar sub-class....
static DropIndicatorType s_dropIndicatorType
@ The drop indicator type
virtual Icon iconForButtonType(TitleBarButtonType type, double dpr) const =0
Returns the icon to be used with the specified type.
virtual View * createGroup(Core::Group *, View *parent=nullptr) const =0
Called by the framework to create a Frame view Override to provide your own Frame sub-class....
Class to abstract QAction, so code still works with QtQuick and Flutter.
TitleBarButtonType
describes a type of button you can have in the title bar
typedef WindowFlags

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8