KDDockWidgets API Documentation 2.1
|
#include <MainWindow_c.h>
Public Types | |
typedef void(* | Callback_setParentView_impl) (void *, KDDockWidgets::Core::View *parent) |
Public Types inherited from KDDockWidgets::Core::MainWindow | |
typedef Vector< MainWindow * > | List |
Public Member Functions | |
MainWindow_wrapper (KDDockWidgets::Core::View *view, const QString &uniqueName, QFlags< KDDockWidgets::MainWindowOption > options) | |
~MainWindow_wrapper () | |
void | addDockWidget (KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget *relativeTo=nullptr, KDDockWidgets::InitialOption initialOption={}) |
void | addDockWidgetAsTab (KDDockWidgets::Core::DockWidget *dockwidget) |
void | addDockWidgetToSide (KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, KDDockWidgets::InitialOption initialOption={}) |
bool | anySideBarIsVisible () const |
KDDockWidgets::Margins | centerWidgetMargins () const |
KDDockWidgets::Rect | centralAreaGeometry () const |
void | clearSideBarOverlay (bool deleteGroup=true) |
bool | closeDockWidgets (bool force=false) |
KDDockWidgets::Core::DropArea * | dropArea () const |
void | init (const QString &name) |
bool | isMDI () const |
KDDockWidgets::Core::Layout * | layout () const |
void | layoutEqually () |
void | layoutParentContainerEqually (KDDockWidgets::Core::DockWidget *dockWidget) |
void | moveToSideBar (KDDockWidgets::Core::DockWidget *dw) |
KDDockWidgets::Core::DropArea * | multiSplitter () const |
QFlags< KDDockWidgets::MainWindowOption > | options () const |
KDDockWidgets::Core::DockWidget * | overlayedDockWidget () const |
int | overlayMargin () const |
void | overlayOnSideBar (KDDockWidgets::Core::DockWidget *dw) |
void | restoreFromSideBar (KDDockWidgets::Core::DockWidget *dw) |
void | setContentsMargins (int l, int t, int r, int b) |
void | setOverlayMargin (int margin) |
virtual void | setParentView_impl (KDDockWidgets::Core::View *parent) |
virtual void | setParentView_impl_nocallback (KDDockWidgets::Core::View *parent) |
void | setUniqueName (const QString &uniqueName) |
KDDockWidgets::Core::SideBar * | sideBarForDockWidget (const KDDockWidgets::Core::DockWidget *dw) const |
void | toggleOverlayOnSideBar (KDDockWidgets::Core::DockWidget *dw) |
QString | uniqueName () const |
Public Member Functions inherited from KDDockWidgets::Core::MainWindow | |
MainWindow (View *view, const QString &uniqueName, MainWindowOptions options) | |
~MainWindow () override | |
void | addDockWidget (KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget *relativeTo=nullptr, const KDDockWidgets::InitialOption &initialOption={}) |
Docks a DockWidget into this main window. | |
void | addDockWidgetAsTab (KDDockWidgets::Core::DockWidget *dockwidget) |
Docks a DockWidget into the central group, tabbed. | |
void | addDockWidgetToSide (KDDockWidgets::Core::DockWidget *dockWidget, KDDockWidgets::Location location, const KDDockWidgets::InitialOption &initialOption={}) |
Vector< QString > | affinities () const |
Returns the list of affinity names. Empty by default. | |
bool | anySideBarIsVisible () const |
Returns whether any side bar is visible. | |
Margins | centerWidgetMargins () const |
void | clearSideBarOverlay (bool deleteGroup=true) |
closes any overlayed dock widget. The sidebar still displays them as button. | |
bool | closeDockWidgets (bool force=false) |
Closes all dock widgets which are docked into this main window This is convenience to calling DockWidget::close() individually If force is true, then the individual dock widgets can't stop the process Returns false if there's at least one dock widget which rejected closing. Returns true if all dock widgets were closed (0 or more) | |
DropArea * | dropArea () const |
void | init (const QString &name) |
bool | isMDI () const |
Returns whether this main window is using an MDI layout. In other words, returns true if MainWindowOption_MDI was passed in the ctor. | |
Layout * | layout () const |
void | layoutEqually () |
layouts all the widgets so they have an equal size within their parent container | |
void | layoutParentContainerEqually (KDDockWidgets::Core::DockWidget *dockWidget) |
like layoutEqually() but starts with the container that has dockWidget . While layoutEqually() starts from the root of the layout tree this function starts on a sub-tree. | |
MDILayout * | mdiLayout () const |
void | moveToSideBar (KDDockWidgets::Core::DockWidget *dw) |
Moves the dock widget into one of the MainWindow's sidebar. Means the dock widget is removed from the layout, and the sidebar shows a button that if pressed will toggle the dock widget's visibility as an overlay over the layout. This is the auto-hide functionality. | |
void | moveToSideBar (KDDockWidgets::Core::DockWidget *dw, KDDockWidgets::SideBarLocation location) |
overload that allows to specify which sidebar to use, instead of using heuristics. | |
DropArea * | multiSplitter () const |
MainWindowOptions | options () const |
Returns the main window options that were passed via constructor. | |
Core::DockWidget * | overlayedDockWidget () const |
returns the dock widget which is currently overlayed. nullptr if none. This is only relevant when using the auto-hide and side-bar feature. | |
int | overlayMargin () const |
Returns the margin used by overlay docks. Default: 1. | |
void | overlayOnSideBar (KDDockWidgets::Core::DockWidget *dw) |
Shows the dock widget overlayed on top of the main window, placed next to the sidebar. | |
std::shared_ptr< View > | persistentCentralView () const |
void | restoreFromSideBar (KDDockWidgets::Core::DockWidget *dw) |
Removes the dock widget from the sidebar and docks it into the main window again. | |
void | setAffinities (const Vector< QString > &names) |
Sets the affinities names. Dock widgets can only dock into main windows of the same affinity. | |
void | setContentsMargins (int l, int t, int r, int b) |
Sets the content's margins. | |
void | setOverlayMargin (int margin) |
Sets the margin used by overlay docks. Does not modify currently overlayed docks. | |
void | setPersistentCentralView (std::shared_ptr< View > widget) |
Sets a persistent central widget. It can't be detached. | |
Core::SideBar * | sideBar (SideBarLocation location) const |
Returns the side bar at the specified location. | |
KDDockWidgets::Core::SideBar * | sideBarForDockWidget (const KDDockWidgets::Core::DockWidget *dw) const |
Returns the sidebar this dockwidget is in. nullptr if not in any. | |
bool | sideBarIsVisible (KDDockWidgets::SideBarLocation location) const |
Returns whether the specified sidebar is visible. | |
void | toggleOverlayOnSideBar (KDDockWidgets::Core::DockWidget *dw) |
Shows or hides an overlay. It's assumed the dock widget is already in a side-bar. | |
QString | uniqueName () const |
Returns the unique name that was passed via constructor. Used internally by the save/restore mechanism. | |
Public Member Functions inherited from KDDockWidgets::Core::Controller | |
Controller (ViewType type, View *) | |
virtual | ~Controller () |
bool | close () |
void | destroyLater () |
Controller::Private * | dptr () const |
Rect | geometry () const |
int | height () const |
bool | inDtor () const |
bool | is (ViewType) const |
Returns whether this controller is of the specified type. | |
bool | isFixedHeight () const |
bool | isFixedWidth () const |
bool | isVisible () const |
Point | mapToGlobal (Point) const |
Point | pos () const |
Rect | rect () const |
void | setParentView (View *parent) |
void | setVisible (bool) |
void | show () const |
Size | size () const |
ViewType | type () const |
Returns the type of this controller. | |
View * | view () const |
Returns the view associated with this controller, if any. | |
int | width () const |
std::shared_ptr< View > | window () const |
int | x () const |
int | y () const |
Public Attributes | |
Callback_setParentView_impl | m_setParentView_implCallback = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from KDDockWidgets::Core::MainWindow | |
Rect | centralAreaGeometry () const |
void | setUniqueName (const QString &uniqueName) |
Protected Attributes inherited from KDDockWidgets::Core::Controller | |
bool | m_inDtor = false |
Definition at line 24 of file KDDWBindingsCore/MainWindow_c.h.
typedef void(* KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::Callback_setParentView_impl) (void *, KDDockWidgets::Core::View *parent) |
Definition at line 58 of file KDDWBindingsCore/MainWindow_c.h.
KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::~MainWindow_wrapper | ( | ) |
Definition at line 158 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::MainWindow_wrapper | ( | KDDockWidgets::Core::View * | view, |
const QString & | uniqueName, | ||
QFlags< KDDockWidgets::MainWindowOption > | options | ||
) |
Definition at line 33 of file KDDWBindingsCore/MainWindow_c.cpp.
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::addDockWidget | ( | KDDockWidgets::Core::DockWidget * | dockWidget, |
KDDockWidgets::Location | location, | ||
KDDockWidgets::Core::DockWidget * | relativeTo = nullptr , |
||
KDDockWidgets::InitialOption | initialOption = {} |
||
) |
Definition at line 37 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::addDockWidget().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::addDockWidgetAsTab | ( | KDDockWidgets::Core::DockWidget * | dockwidget | ) |
Definition at line 41 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::addDockWidgetAsTab().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::addDockWidgetToSide | ( | KDDockWidgets::Core::DockWidget * | dockWidget, |
KDDockWidgets::Location | location, | ||
KDDockWidgets::InitialOption | initialOption = {} |
||
) |
Definition at line 45 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::addDockWidgetToSide().
bool KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::anySideBarIsVisible | ( | ) | const |
Definition at line 49 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgets::Margins KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::centerWidgetMargins | ( | ) | const |
Definition at line 53 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgets::Rect KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::centralAreaGeometry | ( | ) | const |
Definition at line 57 of file KDDWBindingsCore/MainWindow_c.cpp.
Referenced by c_KDDockWidgets__Core__MainWindow__centralAreaGeometry().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::clearSideBarOverlay | ( | bool | deleteGroup = true | ) |
Definition at line 61 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::clearSideBarOverlay().
bool KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::closeDockWidgets | ( | bool | force = false | ) |
Definition at line 65 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgets::Core::DropArea * KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::dropArea | ( | ) | const |
Definition at line 69 of file KDDWBindingsCore/MainWindow_c.cpp.
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::init | ( | const QString & | name | ) |
Definition at line 73 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::init().
bool KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::isMDI | ( | ) | const |
Definition at line 77 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgets::Core::Layout * KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::layout | ( | ) | const |
Definition at line 81 of file KDDWBindingsCore/MainWindow_c.cpp.
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::layoutEqually | ( | ) |
Definition at line 85 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::layoutEqually().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::layoutParentContainerEqually | ( | KDDockWidgets::Core::DockWidget * | dockWidget | ) |
Definition at line 89 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::layoutParentContainerEqually().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::moveToSideBar | ( | KDDockWidgets::Core::DockWidget * | dw | ) |
Definition at line 93 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::moveToSideBar().
KDDockWidgets::Core::DropArea * KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::multiSplitter | ( | ) | const |
Definition at line 97 of file KDDWBindingsCore/MainWindow_c.cpp.
QFlags< KDDockWidgets::MainWindowOption > KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::options | ( | ) | const |
Definition at line 101 of file KDDWBindingsCore/MainWindow_c.cpp.
KDDockWidgets::Core::DockWidget * KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::overlayedDockWidget | ( | ) | const |
Definition at line 113 of file KDDWBindingsCore/MainWindow_c.cpp.
int KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::overlayMargin | ( | ) | const |
Definition at line 105 of file KDDWBindingsCore/MainWindow_c.cpp.
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::overlayOnSideBar | ( | KDDockWidgets::Core::DockWidget * | dw | ) |
Definition at line 109 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::overlayOnSideBar().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::restoreFromSideBar | ( | KDDockWidgets::Core::DockWidget * | dw | ) |
Definition at line 117 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::restoreFromSideBar().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::setContentsMargins | ( | int | l, |
int | t, | ||
int | r, | ||
int | b | ||
) |
Definition at line 121 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::setContentsMargins().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::setOverlayMargin | ( | int | margin | ) |
Definition at line 125 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::setOverlayMargin().
|
virtual |
Reimplemented from KDDockWidgets::Core::Controller.
Definition at line 129 of file KDDWBindingsCore/MainWindow_c.cpp.
References m_setParentView_implCallback, and KDDockWidgets::Core::Controller::setParentView_impl().
|
virtual |
Definition at line 138 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::Controller::setParentView_impl().
Referenced by c_KDDockWidgets__Core__MainWindow__setParentView_impl_View().
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::setUniqueName | ( | const QString & | uniqueName | ) |
Definition at line 142 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::setUniqueName(), and uniqueName().
Referenced by c_KDDockWidgets__Core__MainWindow__setUniqueName_QString().
KDDockWidgets::Core::SideBar * KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::sideBarForDockWidget | ( | const KDDockWidgets::Core::DockWidget * | dw | ) | const |
Definition at line 146 of file KDDWBindingsCore/MainWindow_c.cpp.
void KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::toggleOverlayOnSideBar | ( | KDDockWidgets::Core::DockWidget * | dw | ) |
Definition at line 150 of file KDDWBindingsCore/MainWindow_c.cpp.
References KDDockWidgets::Core::MainWindow::toggleOverlayOnSideBar().
QString KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::uniqueName | ( | ) | const |
Definition at line 154 of file KDDWBindingsCore/MainWindow_c.cpp.
Referenced by setUniqueName().
Callback_setParentView_impl KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::m_setParentView_implCallback = nullptr |
Definition at line 59 of file KDDWBindingsCore/MainWindow_c.h.
Referenced by setParentView_impl().