KDDockWidgets API Documentation 2.0
|
Class to abstract QAction, so code still works with QtQuick and Flutter. More...
Namespaces | |
namespace | Core |
namespace | Debug |
namespace | flutter |
namespace | Flutter |
namespace | QtCommon |
namespace | QtQuick |
namespace | QtWidgets |
namespace | Tests |
Classes | |
class | Config |
Singleton to allow to choose certain behaviours of the framework. More... | |
class | DockRegistry |
class | DockWidgetInstantiator |
Indirection helper to instantiate dock widgets from QML. More... | |
struct | InitialOption |
Struct describing the preferred dock widget size and visibility when adding it to a layout. More... | |
class | LayoutSaver |
LayoutSaver allows to save or restore layouts. More... | |
class | LayoutSaverInstantiator |
A QObject wrapper around LayoutSaver so it can be used in QML. Use it from QML, like: LayoutSaver { id: saver } For C++, just use KDDockWidgets::LayoutSaver directly. More... | |
class | MainWindowInstantiator |
A wrapper to workaround the limitation that QtQuick can't pass arguments through MainWindow's ctor So instead, user instantiates a MainWindowWrapper in QML and calls init. More... | |
class | MainWindowMDIInstantiator |
A wrapper to workaround the limitation that QtQuick can't pass arguments through MainWindow's ctor So instead, user instantiates a MainWindowWrapper in QML and calls init. More... | |
class | SideBarButton |
Typedefs | |
typedef KDDockWidgets::Core::DockWidget *(* | DockWidgetFactoryFunc) (const QString &name) |
typedef bool(* | DragAboutToStartFunc) (Core::Draggable *draggable) |
typedef void(* | DragEndedFunc) () |
typedef bool(* | DropIndicatorAllowedFunc) (DropLocation location, const Vector< Core::DockWidget * > &source, const Vector< Core::DockWidget * > &target, Core::DropArea *dropArea) |
Function to allow more granularity to disallow where widgets are dropped. | |
typedef KDDockWidgets::Core::MainWindow *(* | MainWindowFactoryFunc) (const QString &name, KDDockWidgets::MainWindowOptions) |
template<typename T , typename... Args> | |
using | Vector = KDToolBox::StlContainerAdaptor::StdVectorAdaptor< T, Args... > |
Functions | |
static FrameOptions | actualOptions (FrameOptions options) |
template<typename T > | |
T | bound (T minVal, T value, T maxVal) |
QString | cleanQRCFilename (const QString &filename) |
static Core::Controller * | controllerForItem (QQuickItem *item) |
static ViewFactory * | createDefaultViewFactory () |
static Core::DropIndicatorOverlay * | createDropIndicatorOverlay (Core::DropArea *dropArea) |
void | from_json (const nlohmann::json &j, LayoutSaver::Layout &layout) |
void | from_json (const nlohmann::json &j, LayoutSaver::ScreenInfo &screenInfo) |
void | from_json (const nlohmann::json &json, LayoutSaver::DockWidget &dw) |
void | from_json (const nlohmann::json &json, LayoutSaver::FloatingWindow &window) |
void | from_json (const nlohmann::json &json, LayoutSaver::Group &f) |
void | from_json (const nlohmann::json &json, LayoutSaver::MainWindow &mw) |
void | from_json (const nlohmann::json &json, LayoutSaver::MultiSplitter &s) |
void | from_json (const nlohmann::json &json, LayoutSaver::Placeholder &placeHolder) |
void | from_json (const nlohmann::json &json, LayoutSaver::Position &pos) |
void | from_json (const nlohmann::json &json, typename LayoutSaver::DockWidget::List &list) |
bool | fuzzyCompare (double a, double b, double epsilon=0.0001) |
static QString | iconName (DropLocation loc, bool active) |
static QString | iconName (DropLocation loc, bool active) |
void DOCKS_EXPORT | initFrontend (FrontendType) |
Initializes the desired frontend This function should be called before using any docking. Note that if you only built one frontend (by specifying for example -DKDDockWidgets_FRONTENDS=qtwidgets) then KDDW will call this automatically. | |
template<typename T > | |
T | jsonValue (const nlohmann::json &json, const char *name, const T &defaultValue) |
Controller * | maybeCreateController (Controller *controller, ViewType type, View *view) |
QtQuick::Platform * | plat () |
static MyProxy * | proxyStyle () |
void | registerQmlTypes () |
DOCKS_EXPORT const char * | spdlogLoggerName () |
static StackOptions | tabWidgetOptions (FrameOptions options) |
void | to_json (nlohmann::json &j, const LayoutSaver::Layout &layout) |
void | to_json (nlohmann::json &json, const LayoutSaver::DockWidget &dw) |
void | to_json (nlohmann::json &json, const LayoutSaver::FloatingWindow &window) |
void | to_json (nlohmann::json &json, const LayoutSaver::Group &f) |
void | to_json (nlohmann::json &json, const LayoutSaver::MainWindow &mw) |
void | to_json (nlohmann::json &json, const LayoutSaver::MultiSplitter &s) |
void | to_json (nlohmann::json &json, const LayoutSaver::Placeholder &placeHolder) |
void | to_json (nlohmann::json &json, const LayoutSaver::Position &pos) |
void | to_json (nlohmann::json &json, const LayoutSaver::ScreenInfo &screenInfo) |
void | to_json (nlohmann::json &json, const typename LayoutSaver::DockWidget::List &list) |
template<typename Type > | |
void | to_json (nlohmann::json &json, const typename Type::List &list) |
bool | windowManagerHasTranslucency () |
Variables | |
static qint64 | s_nextId = 1 |
Class to abstract QAction, so code still works with QtQuick and Flutter.
DockRegistry is a singleton that knows about all DockWidgets. It's used so we can restore layouts. It's a private implementation detail.
typedef KDDockWidgets::Core::DockWidget *(* KDDockWidgets::DockWidgetFactoryFunc) (const QString &name) |
typedef bool(* KDDockWidgets::DragAboutToStartFunc) (Core::Draggable *draggable) |
typedef bool(* KDDockWidgets::DropIndicatorAllowedFunc) (DropLocation location, const Vector< Core::DockWidget * > &source, const Vector< Core::DockWidget * > &target, Core::DropArea *dropArea) |
Function to allow more granularity to disallow where widgets are dropped.
By default, widgets can be dropped to the outer and inner left/right/top/bottom and center. The client app can however provide a lambda via setDropIndicatorAllowedFunc to block (by returning false) any specific locations they desire.
location | The drop indicator location to allow or disallow |
source | The dock widgets being dragged |
target | The dock widgets within an existing docked tab group |
dropArea | The target drop area. Can belong to a MainWindow or a FloatingWindow. |
typedef KDDockWidgets::Core::MainWindow *(* KDDockWidgets::MainWindowFactoryFunc) (const QString &name, KDDockWidgets::MainWindowOptions) |
using KDDockWidgets::Vector = typedef KDToolBox::StlContainerAdaptor::StdVectorAdaptor<T, Args...> |
Definition at line 430 of file KDStlContainerAdaptor.h.
Only here for source-compat with v1.2. Do not use. Use InitialVisibilityOption instead.
Enumerator | |
---|---|
AddingOption_None | |
AddingOption_StartHidden |
Definition at line 144 of file KDDockWidgets.h.
Definition at line 314 of file KDDockWidgets.h.
|
strong |
Definition at line 132 of file KDDockWidgets.h.
DockWidget options to pass at construction time.
Definition at line 88 of file KDDockWidgets.h.
|
strong |
Enumerator | |
---|---|
Classic | The default. |
Segmented | Segmented indicators. |
None | Don't show any drop indicators while dragging. |
Definition at line 252 of file KDDockWidgets.h.
Enum describing the different drop indicator types.
Definition at line 291 of file KDDockWidgets.h.
|
strong |
Definition at line 353 of file KDDockWidgets.h.
Enumerator | |
---|---|
FrameOption_None | |
FrameOption_AlwaysShowsTabs | |
FrameOption_IsCentralFrame | |
FrameOption_IsOverlayed | |
FrameOption_NonDockable |
Definition at line 334 of file KDDockWidgets.h.
|
strong |
Enumerator | |
---|---|
QtWidgets | |
QtQuick | |
Flutter |
Definition at line 121 of file KDDockWidgets.h.
|
strong |
Enumerator | |
---|---|
TitleBar | |
TabBar | |
ToggleAction | |
All |
Definition at line 112 of file KDDockWidgets.h.
|
strong |
Enumerator | |
---|---|
StartVisible | The dock widget is made visible when docked. |
StartHidden | Don't show the dock widget when adding it. |
PreserveCurrentTab | When adding as tabbed, don't change the current index. |
Definition at line 150 of file KDDockWidgets.h.
|
strong |
Options which will affect LayoutSaver save/restore.
Enumerator | |
---|---|
None | Just use the defaults. |
Skip | The dock widget won't participate in save/restore. Currently only available for floating windows. |
Definition at line 105 of file KDDockWidgets.h.
Enumerator | |
---|---|
Location_None | |
Location_OnLeft | |
Location_OnTop |
|
Location_OnRight |
|
Location_OnBottom |
|
Definition at line 64 of file KDDockWidgets.h.
Definition at line 73 of file KDDockWidgets.h.
Definition at line 241 of file KDDockWidgets.h.
|
strong |
Each main window supports 4 sidebars.
Enumerator | |
---|---|
None | |
North | |
East | |
West | |
South | |
Last |
Definition at line 269 of file KDDockWidgets.h.
Enumerator | |
---|---|
StackOption_None | |
StackOption_DocumentMode |
Definition at line 345 of file KDDockWidgets.h.
Enumerator | |
---|---|
SuggestedGeometryHint_None | |
SuggestedGeometryHint_PreserveCenter | |
SuggestedGeometryHint_GeometryIsFromDocked |
Definition at line 260 of file KDDockWidgets.h.
|
strong |
describes a type of button you can have in the title bar
Enumerator | |
---|---|
Close | |
Float | |
Minimize | |
Maximize | |
Normal | |
AutoHide | |
UnautoHide |
Definition at line 279 of file KDDockWidgets.h.
|
strong |
Enumerator | |
---|---|
None | |
Minimized | |
Maximized | |
FullScreen |
Definition at line 369 of file KDDockWidgets.h.
|
static |
Definition at line 61 of file core/Group.cpp.
References KDDockWidgets::Config::Flag_AlwaysShowTabs, FrameOption_AlwaysShowsTabs, FrameOption_IsCentralFrame, and KDDockWidgets::Config::self().
T KDDockWidgets::bound | ( | T | minVal, |
T | value, | ||
T | maxVal | ||
) |
Definition at line 415 of file KDDockWidgets.h.
Definition at line 829 of file qtquick/views/View.cpp.
References QString::right(), QString::size(), and QString::startsWith().
Referenced by KDDockWidgets::QtQuick::View::createItem().
|
static |
Definition at line 43 of file qtquick/views/ViewWrapper.cpp.
References KDDockWidgets::Core::DockWidget, KDDockWidgets::Core::DropArea, KDDockWidgets::Core::DropAreaIndicatorOverlay, KDDockWidgets::Core::FIRST, KDDockWidgets::Core::FloatingWindow, KDDockWidgets::Core::Frame, KDDockWidgets::Core::LAST, KDDockWidgets::Core::LayoutItem, KDDockWidgets::Core::MainWindow, KDDockWidgets::Core::MDILayout, KDDockWidgets::Core::None, KDDockWidgets::Core::RubberBand, KDDockWidgets::Core::Separator, KDDockWidgets::Core::SideBar, KDDockWidgets::Core::Stack, KDDockWidgets::Core::TabBar, KDDockWidgets::Core::TitleBar, and KDDockWidgets::Core::ViewWrapper.
|
static |
Definition at line 38 of file Config.cpp.
References KDDockWidgets::Core::Platform::instance().
|
static |
Definition at line 45 of file core/DropArea.cpp.
References Classic, None, KDDockWidgets::Core::ViewFactory::s_dropIndicatorType, and Segmented.
void KDDockWidgets::from_json | ( | const nlohmann::json & | j, |
LayoutSaver::Layout & | layout | ||
) |
Definition at line 744 of file LayoutSaver.cpp.
void KDDockWidgets::from_json | ( | const nlohmann::json & | j, |
LayoutSaver::ScreenInfo & | screenInfo | ||
) |
Definition at line 282 of file LayoutSaver.cpp.
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::DockWidget & | dw | ||
) |
Definition at line 333 of file LayoutSaver.cpp.
References jsonValue().
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::FloatingWindow & | window | ||
) |
Definition at line 254 of file LayoutSaver.cpp.
References FromGlobalConfig, QString::isEmpty(), and jsonValue().
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::Group & | f | ||
) |
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::MainWindow & | mw | ||
) |
Definition at line 202 of file LayoutSaver.cpp.
References East, jsonValue(), North, QString::push_back(), South, and West.
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::MultiSplitter & | s | ||
) |
Definition at line 158 of file LayoutSaver.cpp.
References QString::fromStdString(), and jsonValue().
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::Placeholder & | placeHolder | ||
) |
Definition at line 300 of file LayoutSaver.cpp.
References jsonValue().
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
LayoutSaver::Position & | pos | ||
) |
Definition at line 317 of file LayoutSaver.cpp.
References jsonValue().
void KDDockWidgets::from_json | ( | const nlohmann::json & | json, |
typename LayoutSaver::DockWidget::List & | list | ||
) |
Definition at line 353 of file LayoutSaver.cpp.
References from_json().
|
inline |
Definition at line 420 of file KDDockWidgets.h.
Referenced by c_static_KDDockWidgets__fuzzyCompare_double_double_double().
|
static |
Definition at line 28 of file qtquick/views/ClassicIndicatorsWindow.cpp.
References DropLocation_Bottom, DropLocation_Center, DropLocation_Horizontal, DropLocation_Inner, DropLocation_Left, DropLocation_None, DropLocation_Outter, DropLocation_OutterBottom, DropLocation_OutterLeft, DropLocation_OutterRight, DropLocation_OutterTop, DropLocation_Right, DropLocation_Top, and DropLocation_Vertical.
Referenced by KDDockWidgets::QtQuick::ViewFactory::iconForButtonType(), KDDockWidgets::QtWidgets::ViewFactory::iconForButtonType(), and KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::iconName().
|
static |
Definition at line 68 of file qtwidgets/views/ClassicIndicatorsWindow.cpp.
References DropLocation_Bottom, DropLocation_Center, DropLocation_Horizontal, DropLocation_Inner, DropLocation_Left, DropLocation_None, DropLocation_Outter, DropLocation_OutterBottom, DropLocation_OutterLeft, DropLocation_OutterRight, DropLocation_OutterTop, DropLocation_Right, DropLocation_Top, and DropLocation_Vertical.
void KDDockWidgets::initFrontend | ( | FrontendType | type | ) |
Initializes the desired frontend This function should be called before using any docking. Note that if you only built one frontend (by specifying for example -DKDDockWidgets_FRONTENDS=qtwidgets) then KDDW will call this automatically.
Definition at line 29 of file KDDockWidgets.cpp.
Referenced by c_static_KDDockWidgets__initFrontend_FrontendType(), KDDockWidgets::Core::Platform::instance(), and main().
T KDDockWidgets::jsonValue | ( | const nlohmann::json & | json, |
const char * | name, | ||
const T & | defaultValue | ||
) |
Definition at line 96 of file LayoutSaver.cpp.
Referenced by from_json(), from_json(), from_json(), from_json(), from_json(), from_json(), and from_json().
Controller * KDDockWidgets::maybeCreateController | ( | Controller * | controller, |
ViewType | type, | ||
View * | view | ||
) |
Definition at line 39 of file core/View.cpp.
|
inline |
Definition at line 84 of file qtquick/Platform.h.
References KDDockWidgets::Core::Platform::instance().
Referenced by KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::ClassicDropIndicatorOverlay(), and KDDockWidgets::QtQuick::RubberBand::RubberBand().
|
static |
Definition at line 61 of file qtwidgets/views/TabBar.cpp.
Referenced by KDDockWidgets::QtWidgets::TabBar::TabBar().
void KDDockWidgets::registerQmlTypes | ( | ) |
Definition at line 21 of file QmlTypes.cpp.
const char * KDDockWidgets::spdlogLoggerName | ( | ) |
Returns the name of the logger used by KDDW You can pass this name to spdlog::get() and change log level
Definition at line 51 of file KDDockWidgets.cpp.
Referenced by c_static_KDDockWidgets__spdlogLoggerName().
|
static |
Definition at line 70 of file core/Group.cpp.
References FrameOption_NonDockable, StackOption_DocumentMode, and StackOption_None.
void KDDockWidgets::to_json | ( | nlohmann::json & | j, |
const LayoutSaver::Layout & | layout | ||
) |
Definition at line 734 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::DockWidget & | dw | ||
) |
Definition at line 326 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::FloatingWindow & | window | ||
) |
Definition at line 237 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::Group & | f | ||
) |
Definition at line 114 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::MainWindow & | mw | ||
) |
Definition at line 179 of file LayoutSaver.cpp.
References East, KDToolBox::StlContainerAdaptor::StdVectorAdaptor< T, Args >::isEmpty(), North, South, and West.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::MultiSplitter & | s | ||
) |
Definition at line 148 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::Placeholder & | placeHolder | ||
) |
Definition at line 290 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::Position & | pos | ||
) |
Definition at line 308 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const LayoutSaver::ScreenInfo & | screenInfo | ||
) |
Definition at line 275 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const typename LayoutSaver::DockWidget::List & | list | ||
) |
Definition at line 346 of file LayoutSaver.cpp.
void KDDockWidgets::to_json | ( | nlohmann::json & | json, |
const typename Type::List & | list | ||
) |
Definition at line 107 of file LayoutSaver.cpp.
|
inline |
Definition at line 35 of file qtwidgets/views/ClassicIndicatorsWindow.cpp.
References KDDockWidgets::Config::InternalFlag_DisableTranslucency, and KDDockWidgets::Config::self().
|
static |
Definition at line 37 of file core/View.cpp.