KDDockWidgets API Documentation 2.1
|
A factory class for allowing the user to customize some internal views. This is optional, and if not provided, a default one will be used. More...
#include <ViewFactory.h>
Public Member Functions | |
ViewFactory ()=default | |
virtual | ~ViewFactory () |
Destructor. Don't delete ViewFactory directly, it's owned by the framework. | |
virtual QString | classicIndicatorsPath () const |
The path to a folder containing the classic_indicator png files. | |
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 overridden by users. | |
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, so this is actually a separate window, not parented to the main window. | |
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. In all other cases users will instantiate DockWidget directly. | |
virtual View * | createDropArea (Core::DropArea *, View *parent) const =0 |
Called by the framework to create a DropArea view. | |
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 sub-class. | |
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. A group is the widget that holds the titlebar and tab-widget which holds the DockWidgets. | |
virtual View * | createMDILayout (Core::MDILayout *, View *parent) const =0 |
Called by the framework to create a MDI Layout view. | |
virtual View * | createRubberBand (View *parent) const =0 |
Called by the framework to create a RubberBand view to show as drop zone. | |
virtual View * | createSegmentedDropIndicatorOverlayView (Core::SegmentedDropIndicatorOverlay *controller, View *parent) const =0 |
Creates the view that will parent the segmented drop indicators. | |
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. The Separator allows the user to resize nested dock widgets. | |
virtual View * | createSideBar (Core::SideBar *, View *parent) const =0 |
Called by the framework to create a SideBar view. | |
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 * | 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 * | 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. Just forward the controller and parent arguments to the TitleBar view ctor. | |
virtual Icon | iconForButtonType (TitleBarButtonType type, double dpr) const =0 |
Returns the icon to be used with the specified type . | |
Static Public Attributes | |
static DropIndicatorType | s_dropIndicatorType = DropIndicatorType::Classic |
@ The drop indicator type | |
A factory class for allowing the user to customize some internal views. This is optional, and if not provided, a default one will be used.
You should however not derive directly from ViewFactory, and instead, derive from QtWidgets::ViewFactory or QtQuick::ViewFactory.
Sub-classing ViewFactory allows for fine-grained customization and styling of some non-public widgets, such as titlebars, dock widget group and tab widgets.
To set your own factory see Config::setViewFactory()
Definition at line 56 of file core/ViewFactory.h.
|
default |
|
virtual |
Destructor. Don't delete ViewFactory directly, it's owned by the framework.
Reimplemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, and KDDockWidgets::QtWidgets::ViewFactory.
Definition at line 19 of file core/ViewFactory.cpp.
|
virtual |
The path to a folder containing the classic_indicator png files.
Definition at line 23 of file core/ViewFactory.cpp.
|
pure virtual |
Creates a QAction if QtWidgets, or an equivalent fallback if QtQuick/Flutter Not needed to be overridden by users.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, and KDDockWidgets::QtWidgets::ViewFactory.
|
pure virtual |
Creates the window that will show the actual drop indicators. They need a higher z-order, so this is actually a separate window, not parented to the main window.
Implemented in KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper.
Referenced by createIndicatorWindow().
|
pure virtual |
Creates a dock widget. This is only used by MainWindow's persistent widget feature. In all other cases users will instantiate DockWidget directly.
Implemented in KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::flutter::ViewFactory, and KDDockWidgets::QtWidgets::ViewFactory.
Referenced by KDDockWidgets::QtWidgets::MDIArea::addDockWidget(), and lint().
|
pure virtual |
Called by the framework to create a DropArea view.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a FloatingWindow view Override to provide your own FloatingWindow sub-class.
parent | Just forward to FloatingWindow's constructor. |
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a Frame view Override to provide your own Frame sub-class. A group is the widget that holds the titlebar and tab-widget which holds the DockWidgets.
parent | just forward to Frame's constructor |
Implemented in KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgets::flutter::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a MDI Layout view.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, and KDDockWidgets::QtWidgets::ViewFactory.
|
pure virtual |
Called by the framework to create a RubberBand view to show as drop zone.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
Referenced by KDDockWidgets::Core::Separator::Separator().
|
pure virtual |
Creates the view that will parent the segmented drop indicators.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, and KDDockWidgets::QtWidgets::ViewFactory.
|
pure virtual |
Called by the framework to create a Separator view Override to provide your own Separator sub-class. The Separator allows the user to resize nested dock widgets.
parent | Just forward to Separator's constructor. |
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a SideBar view.
loc | The side-bar location without the main window. Just forward into your SideBar sub-class ctor. |
parent | The MainWindow. Just forward into your SideBar sub-class ctor. |
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a Stack view Override to provide your own Stack sub-class.
parent | Just forward to Stack's constructor. |
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a TabBar view Override to provide your own TabBar sub-class.
parent | Just forward to TabBar's's constructor. |
Implemented in KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgets::flutter::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper.
|
pure virtual |
Called by the framework to create a TitleBar view Override to provide your own TitleBar sub-class. Just forward the controller
and parent
arguments to the TitleBar view ctor.
Implemented in KDDockWidgets::flutter::ViewFactory, KDDockWidgets::QtQuick::ViewFactory, KDDockWidgets::QtWidgets::ViewFactory, KDDockWidgetsBindings_wrappersNS::KDDWBindingsFlutter::ViewFactory_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ViewFactory_wrapper.
|
pure virtual |
Returns the icon to be used with the specified type
.
dpr | the device pixel ratio of the button |
Implemented in KDDockWidgets::flutter::ViewFactory.
|
static |
@ The drop indicator type
Definition at line 146 of file core/ViewFactory.h.
Referenced by KDDockWidgets::createDropIndicatorOverlay().