KDDockWidgets API Documentation 2.1
|
#include <Controller.h>
Public Member Functions | |
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 |
Protected Member Functions | |
virtual void | setParentView_impl (View *parent) |
Protected Attributes | |
bool | m_inDtor = false |
Definition at line 49 of file Controller.h.
Definition at line 26 of file Controller.cpp.
|
virtual |
Definition at line 31 of file Controller.cpp.
References m_inDtor.
bool Controller::close | ( | ) |
Definition at line 121 of file Controller.cpp.
References KDDockWidgets::Core::View::close(), and view().
Referenced by c_KDDockWidgets__Core__Controller__close().
void Controller::destroyLater | ( | ) |
Equivalent to QObject::deleteLater() when Qt used but works with Flutter as well
Definition at line 151 of file Controller.cpp.
References QObject::deleteLater(), KDDockWidgets::Core::Platform::instance(), and KDDockWidgets::Core::Platform::runDelayed().
Referenced by c_KDDockWidgets__Core__Controller__destroyLater(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::destroyLater(), and KDDockWidgets::Core::FloatingWindow::scheduleDeleteLater().
Controller::Private * Controller::dptr | ( | ) | const |
Definition at line 164 of file Controller.cpp.
Rect Controller::geometry | ( | ) | const |
Definition at line 101 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__geometry(), KDDockWidgets::Core::Group::detachTab(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::FloatingWindow_wrapper::ensureRectIsOnScreen(), KDDockWidgets::Core::FloatingWindow::ensureRectIsOnScreen(), KDDockWidgets::Core::DockWidget::groupGeometry(), KDDockWidgets::Core::FloatingWindow::serialize(), KDDockWidgets::Core::Group::serialize(), KDDockWidgets::Core::MDILayout::setDockWidgetGeometry(), and KDDockWidgets::Core::DockWidget::setFloatingGeometry().
int Controller::height | ( | ) | const |
Definition at line 86 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__height(), and KDDockWidgets::QtWidgets::Group::nonContentsHeight().
bool Controller::inDtor | ( | ) | const |
Definition at line 52 of file Controller.cpp.
References m_inDtor.
Referenced by c_KDDockWidgets__Core__Controller__inDtor().
bool Controller::is | ( | ViewType | t | ) | const |
Returns whether this controller is of the specified type.
Definition at line 47 of file Controller.cpp.
Referenced by KDDockWidgets::Core::View::asDockWidgetController(), KDDockWidgets::Core::View::asDropAreaController(), KDDockWidgets::Core::View::asFloatingWindowController(), KDDockWidgets::Core::View::asGroupController(), KDDockWidgets::Core::View::asMainWindowController(), KDDockWidgets::Core::View::asMDILayoutController(), KDDockWidgets::Core::View::asStackController(), KDDockWidgets::Core::View::asTabBarController(), KDDockWidgets::Core::View::asTitleBarController(), KDDockWidgets::Core::Stack::setDocumentMode(), KDDockWidgets::Core::Stack::setTabBarAutoHide(), setVisible(), and KDDockWidgets::Core::DropIndicatorOverlay::setWindowBeingDragged().
bool Controller::isFixedHeight | ( | ) | const |
Definition at line 169 of file Controller.cpp.
References view().
Referenced by c_KDDockWidgets__Core__Controller__isFixedHeight(), and KDDockWidgets::QtQuick::View::isFixedHeight().
bool Controller::isFixedWidth | ( | ) | const |
Definition at line 177 of file Controller.cpp.
References view().
Referenced by c_KDDockWidgets__Core__Controller__isFixedWidth(), and KDDockWidgets::QtQuick::View::isFixedWidth().
bool Controller::isVisible | ( | ) | const |
Returns whether the view is visible Convenience for calling View::isVisible()
Definition at line 62 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__isVisible(), KDDockWidgets::DockRegistry::closedDockwidgets(), KDDockWidgets::Core::FloatingWindow::dragRect(), KDDockWidgets::Core::Group::dragRect(), KDDockWidgets::DockRegistry::ensureAllFloatingWidgetsAreMorphed(), KDDockWidgets::Core::TitleBar::makeWindow(), KDDockWidgets::QtWidgets::Group::nonContentsHeight(), KDDockWidgets::Core::FloatingWindow::serialize(), KDDockWidgets::Core::DockWidget::setFloating(), KDDockWidgets::DockRegistry::topLevels(), and KDDockWidgets::Core::Group::updateTitleBarVisibility().
Point Controller::mapToGlobal | ( | Point | localPt | ) | const |
Definition at line 81 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__mapToGlobal_Point(), KDDockWidgets::Core::Group::detachTab(), and KDDockWidgets::Core::TitleBar::makeWindow().
Point Controller::pos | ( | ) | const |
Definition at line 106 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__pos(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::dragCanStart(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::dragCanStart_nocallback(), KDDockWidgets::Core::SegmentedDropIndicatorOverlay::dropLocationForPos(), KDDockWidgets::Core::MDILayout::moveDockWidget(), KDDockWidgets::Core::MDILayout::moveDockWidget(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Separator_wrapper::onMouseMove(), KDDockWidgets::Core::Separator::onMouseMove(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DockWidget_wrapper::setMDIPosition(), and KDDockWidgets::Core::DockWidget::setMDIPosition().
Rect Controller::rect | ( | ) | const |
Definition at line 73 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__rect(), KDDockWidgets::Core::Group::containsMouse(), KDDockWidgets::Core::FloatingWindow::dragRect(), KDDockWidgets::Core::Group::dragRect(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), and KDDockWidgets::Core::DropIndicatorOverlay::setWindowBeingDragged().
void Controller::setParentView | ( | View * | parent | ) |
Sets the parent view In Qt this would be equivalent to calling view()->setParent(parent);
Definition at line 136 of file Controller.cpp.
References setParentView_impl().
Referenced by KDDockWidgets::Core::DockWidget::addDockWidgetAsTab(), KDDockWidgets::Core::DropArea::addWidget(), c_KDDockWidgets__Core__Controller__setParentView_View(), KDDockWidgets::QtQuick::Group::insertDockWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::setParentView().
|
protectedvirtual |
Reimplemented in KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DockWidget_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::FloatingWindow_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Layout_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Separator_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TitleBar_wrapper, KDDockWidgets::Core::DockWidget, and KDDockWidgets::Core::Group.
Definition at line 142 of file Controller.cpp.
References view().
Referenced by setParentView(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::FloatingWindow_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Layout_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Separator_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TitleBar_wrapper::setParentView_impl(), KDDockWidgets::Core::DockWidget::setParentView_impl(), KDDockWidgets::Core::Group::setParentView_impl(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::FloatingWindow_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Layout_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::MainWindow_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Separator_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::setParentView_impl_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TabBar_wrapper::setParentView_impl_nocallback(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::TitleBar_wrapper::setParentView_impl_nocallback().
void Controller::setVisible | ( | bool | is | ) |
Hides or shows the view associated with this controller Convenience for calling View::setVisible()
Definition at line 67 of file Controller.cpp.
References is().
Referenced by KDDockWidgets::Core::DropIndicatorOverlay::DropIndicatorOverlay(), KDDockWidgets::Core::Separator::Separator(), c_KDDockWidgets__Core__Controller__setVisible_bool(), KDDockWidgets::Core::DockWidget::deserialize(), KDDockWidgets::Core::Separator::setGeometry(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::setVisible(), KDDockWidgets::Core::DropIndicatorOverlay::setWindowBeingDragged(), KDDockWidgets::Core::FloatingWindow::updateTitleBarVisibility(), and KDDockWidgets::Core::Group::updateTitleBarVisibility().
void Controller::show | ( | ) | const |
Definition at line 131 of file Controller.cpp.
References KDDockWidgets::Core::View::show(), and view().
Referenced by c_KDDockWidgets__Core__Controller__show(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::show().
Size Controller::size | ( | ) | const |
Definition at line 96 of file Controller.cpp.
Referenced by KDDockWidgets::Core::MDILayout::addDockWidget(), KDDockWidgets::Core::Group::biggestDockWidgetMaxSize(), c_KDDockWidgets__Core__Controller__size(), KDDockWidgets::Core::Group::dockWidgetsMinSize(), KDDockWidgets::Core::Group::insertWidget(), KDDockWidgets::Core::TabBar::numDockWidgets(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::onResize(), KDDockWidgets::Core::MDILayout::resizeDockWidget(), KDDockWidgets::Core::MDILayout::resizeDockWidget(), KDDockWidgets::Core::Layout::setLayoutSize(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DockWidget_wrapper::setMDISize(), KDDockWidgets::Core::DockWidget::setMDISize(), and KDDockWidgets::Core::DockWidget::sizeInLayout().
ViewType Controller::type | ( | ) | const |
Returns the type of this controller.
Definition at line 42 of file Controller.cpp.
Referenced by KDDockWidgets::Core::Stack::buttonHidesIfDisabled(), KDDockWidgets::Core::TitleBar::buttonHidesIfDisabled(), KDDockWidgets::Core::TitleBar::buttonIsUserHidden(), and KDDockWidgets::Core::TitleBar::buttonIsUserHidden().
View * Controller::view | ( | ) | const |
Returns the view associated with this controller, if any.
Definition at line 57 of file Controller.cpp.
Referenced by KDDockWidgets::Core::DropIndicatorOverlay::DropIndicatorOverlay(), KDDockWidgets::Core::FloatingWindow::FloatingWindow(), KDDockWidgets::Core::Group::Group(), KDDockWidgets::Core::Layout::Layout(), KDDockWidgets::Core::Separator::Separator(), KDDockWidgets::Core::SideBar::SideBar(), KDDockWidgets::Core::Stack::Stack(), KDDockWidgets::Core::FloatingWindow::~FloatingWindow(), KDDockWidgets::Core::DropArea::_addDockWidget(), KDDockWidgets::Core::SideBar::addDockWidget(), KDDockWidgets::Core::DockWidget::addDockWidgetAsTab(), KDDockWidgets::Core::DockWidget::addDockWidgetToContainingWindow(), KDDockWidgets::Core::DropArea::addMultiSplitter(), KDDockWidgets::Core::Layout::asDropArea(), KDDockWidgets::Core::Layout::asMDILayout(), KDDockWidgets::QtQuick::asQQuickItem(), KDDockWidgets::flutter::asView_flutter(), KDDockWidgets::QtQuick::asView_qtquick(), c_KDDockWidgets__Core__Controller__view(), KDDockWidgets::Core::TabBar::changeTabIcon(), close(), KDDockWidgets::Core::Group::containsMouse(), KDDockWidgets::QtQuick::ViewFactory::createFloatingWindow(), KDDockWidgets::QtWidgets::ViewFactory::createFloatingWindow(), createLayout(), KDDockWidgets::Core::FloatingWindow::deserialize(), KDDockWidgets::Core::Group::deserialize(), KDDockWidgets::Core::Layout::deserialize(), KDDockWidgets::Core::Group::detachTab(), KDDockWidgets::Core::FloatingWindow::dragRect(), KDDockWidgets::Core::Group::dragRect(), KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(), KDDockWidgets::DockRegistry::ensureAllFloatingWidgetsAreMorphed(), KDDockWidgets::DockRegistry::floatingQWindows(), KDDockWidgets::Core::DockWidget::floatingWindow(), KDDockWidgets::Core::Group::floatingWindow(), KDDockWidgets::Core::Layout::floatingWindow(), KDDockWidgets::DockRegistry::floatingWindowForHandle(), KDDockWidgets::QtQuick::DockWidget::groupVisualItem(), KDDockWidgets::Core::SegmentedDropIndicatorOverlay::hover_impl(), KDDockWidgets::Core::DockWidget::init(), KDDockWidgets::QtQuick::Group::insertDockWidget(), KDDockWidgets::Core::Group::insertDockWidget(), KDDockWidgets::Core::TabBar::insertDockWidget(), KDDockWidgets::flutter::TabBar::insertDockWidget(), KDDockWidgets::Core::Group::insertWidget(), isFixedHeight(), isFixedWidth(), KDDockWidgets::Core::DockWidget::isFloating(), KDDockWidgets::Core::TitleBar::isFocused(), KDDockWidgets::Core::TitleBar::isMDI(), KDDockWidgets::Core::Stack::isPositionDraggable(), KDDockWidgets::Core::Stack::isWindow(), KDDockWidgets::Core::FloatingWindow::mainWindow(), KDDockWidgets::Core::Layout::mainWindow(), KDDockWidgets::Core::Stack::makeWindow(), KDDockWidgets::Core::TitleBar::makeWindow(), KDDockWidgets::Core::FloatingWindow::maybeCreateResizeHandler(), KDDockWidgets::Core::DropArea::mdiDockWidgetWrapper(), KDDockWidgets::Core::Group::mdiDockWidgetWrapper(), KDDockWidgets::Core::Group::mdiDropAreaWrapper(), KDDockWidgets::Core::DockWidget::mdiZ(), KDDockWidgets::QtQuick::FloatingWindow::minSize(), KDDockWidgets::Core::Group::nonContentsHeight(), KDDockWidgets::Core::TitleBar::onCloseClicked(), KDDockWidgets::QtQuick::DockWidget::onGeometryUpdated(), KDDockWidgets::Core::TitleBar::onMinimizeClicked(), KDDockWidgets::Core::DockWidget::onResize(), KDDockWidgets::Core::DockWidget::open(), parentForIndicatorWindow(), KDDockWidgets::Core::TabBar::removeDockWidget(), KDDockWidgets::flutter::TabBar::removeDockWidget(), KDDockWidgets::Core::SideBar::removeDockWidget(), KDDockWidgets::Core::Group::removeWidget(), KDDockWidgets::Core::TabBar::renameTab(), KDDockWidgets::Core::MDILayout::resizeDockWidget(), KDDockWidgets::Core::Layout::restorePlaceholder(), KDDockWidgets::Core::FloatingWindow::scheduleDeleteLater(), KDDockWidgets::Core::FloatingWindow::serialize(), KDDockWidgets::Core::Group::serialize(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), KDDockWidgets::Core::TabBar::setCurrentIndex(), KDDockWidgets::QtQuick::DockWidgetModel::setCurrentIndex(), KDDockWidgets::Core::Stack::setDocumentMode(), KDDockWidgets::Core::DockWidget::setFloatingGeometry(), KDDockWidgets::Core::Separator::setGeometry(), KDDockWidgets::Core::DockWidget::setGuestView(), KDDockWidgets::Core::DropIndicatorOverlay::setHoveredGroup(), KDDockWidgets::Core::Layout::setLayoutSize(), KDDockWidgets::Core::DockWidget::setMDIZ(), setParentView_impl(), KDDockWidgets::Core::Layout::setRootItem(), KDDockWidgets::Core::FloatingWindow::setSuggestedGeometry(), KDDockWidgets::Core::TitleBar::setTitle(), KDDockWidgets::Core::DropIndicatorOverlay::setWindowBeingDragged(), show(), KDDockWidgets::QtQuick::TabBar::stackView(), KDDockWidgets::Core::DockWidget::startDragging(), KDDockWidgets::Core::TitleBar::toggleMaximized(), KDDockWidgets::DockRegistry::topLevels(), KDDockWidgets::QtWidgets::IndicatorWindow::updatePositions(), KDDockWidgets::Core::FloatingWindow::updateTitleAndIcon(), KDDockWidgets::Core::Layout::viewAboutToBeDeleted(), and window().
int Controller::width | ( | ) | const |
Definition at line 91 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__width().
std::shared_ptr< View > Controller::window | ( | ) | const |
Definition at line 126 of file Controller.cpp.
References KDDockWidgets::Core::View::rootView(), and view().
Referenced by KDDockWidgets::Core::FloatingWindow::FloatingWindow(), KDDockWidgets::Core::DropArea::drop(), and KDDockWidgets::Core::ClassicDropIndicatorOverlay::onResize().
int Controller::x | ( | ) | const |
Definition at line 111 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__x().
int Controller::y | ( | ) | const |
Definition at line 116 of file Controller.cpp.
Referenced by c_KDDockWidgets__Core__Controller__y().
|
protected |
Definition at line 103 of file Controller.h.
Referenced by ~Controller(), KDDockWidgets::Core::DockWidget::~DockWidget(), inDtor(), and KDDockWidgets::Core::TabBar::removeDockWidget().