KDDockWidgets API Documentation 2.1
|
#include <SideBar.h>
Public Member Functions | |
SideBar (SideBarLocation, MainWindow *parent=nullptr) | |
~SideBar () override | |
void | addDockWidget (DockWidget *dw) |
void | clear () |
clears the sidebar (removes all dock widgets from it) | |
bool | containsDockWidget (DockWidget *) const |
Vector< DockWidget * > | dockWidgets () const |
returns the list of dock widgets in this sidebar | |
bool | isEmpty () const |
returns whether there's no dock widgets | |
bool | isVertical () const |
returns if this side bar has vertical orientation | |
SideBarLocation | location () const |
returns the sidebar's location in the main window | |
MainWindow * | mainWindow () const |
Returns the main window this side bar belongs to. | |
void | onButtonClicked (DockWidget *dw) |
Qt::Orientation | orientation () const |
Returns this side bar's orientation. | |
void | removeDockWidget (DockWidget *dw) |
Vector< QString > | serialize () const |
returns a serialization of this sidebar's state Currently it's just a list of dock widget ids | |
void | toggleOverlay (DockWidget *) |
Toggles the dock widget overlay. Equivalent to the user clicking on the button. | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from KDDockWidgets::Core::Controller | |
virtual void | setParentView_impl (View *parent) |
Protected Attributes inherited from KDDockWidgets::Core::Controller | |
bool | m_inDtor = false |
Definition at line 29 of file core/SideBar.h.
|
explicit |
Definition at line 41 of file core/SideBar.cpp.
References KDDockWidgets::Core::View::init(), isVertical(), KDDockWidgets::Core::View::setFixedHeight(), KDDockWidgets::Core::View::setFixedWidth(), and KDDockWidgets::Core::Controller::view().
|
override |
Definition at line 61 of file core/SideBar.cpp.
void SideBar::addDockWidget | ( | DockWidget * | dw | ) |
Definition at line 66 of file core/SideBar.cpp.
References KDDockWidgets::Core::DockWidget::d, removeDockWidget(), KDDockWidgets::Core::DockWidget::title(), and KDDockWidgets::Core::Controller::view().
Referenced by KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::addDockWidget(), and c_KDDockWidgets__Core__SideBar__addDockWidget_DockWidget().
void SideBar::clear | ( | ) |
clears the sidebar (removes all dock widgets from it)
Definition at line 148 of file core/SideBar.cpp.
References removeDockWidget().
Referenced by c_KDDockWidgets__Core__SideBar__clear(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::clear().
bool SideBar::containsDockWidget | ( | DockWidget * | dw | ) | const |
Definition at line 98 of file core/SideBar.cpp.
Referenced by c_KDDockWidgets__Core__SideBar__containsDockWidget_DockWidget().
Vector< DockWidget * > SideBar::dockWidgets | ( | ) | const |
returns the list of dock widgets in this sidebar
Definition at line 154 of file core/SideBar.cpp.
bool SideBar::isEmpty | ( | ) | const |
returns whether there's no dock widgets
Definition at line 118 of file core/SideBar.cpp.
Referenced by c_KDDockWidgets__Core__SideBar__isEmpty().
|
inline |
returns if this side bar has vertical orientation
Definition at line 44 of file core/SideBar.h.
References Qt::Vertical.
Referenced by SideBar(), and c_KDDockWidgets__Core__SideBar__isVertical().
SideBarLocation SideBar::location | ( | ) | const |
returns the sidebar's location in the main window
Definition at line 123 of file core/SideBar.cpp.
MainWindow * SideBar::mainWindow | ( | ) | const |
Returns the main window this side bar belongs to.
Definition at line 128 of file core/SideBar.cpp.
Referenced by c_KDDockWidgets__Core__SideBar__mainWindow().
void SideBar::onButtonClicked | ( | DockWidget * | dw | ) |
Definition at line 103 of file core/SideBar.cpp.
References toggleOverlay().
Referenced by c_KDDockWidgets__Core__SideBar__onButtonClicked_DockWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::onButtonClicked().
Qt::Orientation SideBar::orientation | ( | ) | const |
Returns this side bar's orientation.
Definition at line 113 of file core/SideBar.cpp.
void SideBar::removeDockWidget | ( | DockWidget * | dw | ) |
Definition at line 84 of file core/SideBar.cpp.
References KDDockWidgets::Core::DockWidget::d, KDDockWidgets::Core::DockWidget::title(), and KDDockWidgets::Core::Controller::view().
Referenced by addDockWidget(), c_KDDockWidgets__Core__SideBar__removeDockWidget_DockWidget(), clear(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::removeDockWidget().
returns a serialization of this sidebar's state Currently it's just a list of dock widget ids
Definition at line 138 of file core/SideBar.cpp.
References KDToolBox::StlContainerAdaptor::StdVectorAdaptor< T, Args >::reserve(), and KDDockWidgets::Core::DockWidget::uniqueName().
void SideBar::toggleOverlay | ( | DockWidget * | dw | ) |
Toggles the dock widget overlay. Equivalent to the user clicking on the button.
Definition at line 133 of file core/SideBar.cpp.
References KDDockWidgets::Core::MainWindow::toggleOverlayOnSideBar().
Referenced by c_KDDockWidgets__Core__SideBar__toggleOverlay_DockWidget(), onButtonClicked(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::toggleOverlay().