KDDockWidgets API Documentation 2.1
|
#include <Group.h>
Public Types | |
typedef Vector< Group * > | List |
Public Member Functions | |
Group (View *parent=nullptr, FrameOptions=FrameOption_None, int userType=0) | |
virtual | ~Group () override |
Core::TitleBar * | actualTitleBar () const |
void | addTab (DockWidget *, const InitialOption &={}) |
Adds a widget into the Group's Stack. | |
void | addTab (FloatingWindow *floatingWindow, const InitialOption &={}) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | addTab (Group *, const InitialOption &={}) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Vector< QString > | affinities () const |
bool | allDockWidgetsHave (DockWidgetOption) const |
Returns whether all dock widgets have the specified option set. | |
bool | allDockWidgetsHave (LayoutSaverOption) const |
Returns whether all dock widgets have the specified layout saver option set. | |
bool | alwaysShowsTabs () const |
whether the tab widget will always show tabs, even if there's only 1 dock widget | |
bool | anyDockWidgetsHas (DockWidgetOption) const |
Returns whether at least one dock widget has the specified option set. | |
bool | anyDockWidgetsHas (LayoutSaverOption) const |
Returns whether at least one dock widget has the specified layout saver option set. | |
bool | anyNonClosable () const |
bool | anyNonDockable () const |
LayoutingGuest * | asLayoutingGuest () const |
bool | beingDeletedLater () const |
Returns whether a deleteLater has already been issued. | |
Size | biggestDockWidgetMaxSize () const |
Returns the biggest combined maxSize of all dock widgets. | |
void | changeTabIcon (int index, const Icon &) |
bool | containsDockWidget (DockWidget *w) const |
returns whether the dockwidget w is inside this group | |
bool | containsMouse (Point globalPos) const |
DockWidget * | currentDockWidget () const |
Returns the current dock widget. | |
int | currentIndex () const |
returns the index of the current tab | |
int | currentTabIndex () const |
FloatingWindow * | detachTab (DockWidget *) |
detaches this dock widget | |
DockWidget * | dockWidgetAt (int index) const |
Returns the dock widget at index . | |
int | dockWidgetCount () const |
returns the number of dock widgets inside the group | |
Vector< DockWidget * > | dockWidgets () const |
Size | dockWidgetsMinSize () const |
Returns the minimum size of the dock widgets. This might be slightly smaller than Frame::minSize() due to the QTabWidget having some margins and tab bar. | |
Private * | dptr () const |
virtual Rect | dragRect () const |
FloatingWindow * | floatingWindow () const |
returns the FloatingWindow this group is in, if any | |
bool | hasNestedMDIDockWidgets () const |
If this group is a MDI group (isMDI() == true), returns whether it contains nested dock widgets (DockWidgetOption_MDINestable) | |
bool | hasSingleDockWidget () const |
returns whether there's only 1 dock widget. | |
bool | hasTabsVisible () const |
returns true if tabs are visible | |
Icon | icon () const |
int | indexOfDockWidget (const DockWidget *) |
returns the index of the specified dock widget | |
void | insertDockWidget (DockWidget *, int index) |
Inserts a dock widget into the specified index. | |
void | insertWidget (DockWidget *, int index, const InitialOption &={}) |
Inserts a widget into the Group's TabWidget at index . | |
bool | isCentralGroup () const |
returns if this widget is the central group MainWindow supports a mode where the middle group is persistent even if no dock widget is there. | |
bool | isDockable () const |
Returns whether you can DND dock widgets over this group and tab into it. | |
bool | isEmpty () const |
returns whether there's 0 dock widgets. If not persistent then the Frame will delete itself. | |
bool | isFloating () const |
Returns whether this group is floating. A floating group isn't attached to any other MainWindow, and if it's attached to a FloatingWindow then it's considered floating if it's the only group in that Window. A floating group can have multiple dock widgets (tabbed), in which case each DockWidget::isFloating() returns false, in which case you can use isInFloatingWindow() which would still return true. | |
bool | isInFloatingWindow () const |
Returns whether this group is in a FloatingWindow, as opposed to MainWindow. | |
bool | isInMainWindow () const |
Returns whether this group is docked inside a MainWindow. | |
bool | isMDI () const |
Returns whether this group is in a MDI layout Usually no, unless you're using an MDI main window. | |
bool | isMDIWrapper () const |
Returns whether this group was created automatically just for the purpose of supporting DockWidgetOption_MDINestable. | |
bool | isOverlayed () const |
Returns whether this group is overlayed on top of the MainWindow (auto-hide feature);. | |
bool | isTheOnlyGroup () const |
Core::Item * | layoutItem () const |
returns the layout item that either contains this Frame in the layout or is a placeholder | |
MainWindow * | mainWindow () const |
Returns the main window this group is in. nullptr if not inside a main window. | |
DockWidget * | mdiDockWidgetWrapper () const |
If this is an MDI wrapper group, return the DockWidget MDI wrapper. | |
DropArea * | mdiDropAreaWrapper () const |
If this is an MDI wrapper group, return the DropArea MDI wrapper. | |
Group * | mdiFrame () const |
If this group is an MDI wrapper, returns the MDI group. That is the group you actually drag inside the MDI area. | |
MDILayout * | mdiLayout () const |
Returns the MDI layout. Or nullptr if this group isn't in a MDI layout. | |
int | nonContentsHeight () const |
void | onDockWidgetCountChanged () |
void | onDockWidgetTitleChanged (DockWidget *) |
FrameOptions | options () const |
void | removeWidget (DockWidget *) |
removes a dockwidget from the group | |
void | renameTab (int index, const QString &) |
FloatingWindowFlags | requestedFloatingWindowFlags () const |
User requested floating window flags for when this group floats. | |
WidgetResizeHandler * | resizeHandler () const |
Returns the resize handler. Used mostly in MDI mode. | |
void | restoreToPreviousPosition () |
Puts the Group back in its previous main window position. | |
LayoutSaver::Group | serialize () const |
void | setAllowedResizeSides (CursorPositions sides) |
To allow resizing the overlayed dock widget (auto-hide feature) | |
void | setCurrentDockWidget (DockWidget *) |
Sets the specified dock widget to be the current tab. | |
void | setCurrentTabIndex (int index) |
sets the current tab index | |
void | setLayout (Layout *) |
Sets the Layout which this group is in. | |
void | setLayoutItem (Core::Item *item) |
sets the layout item that either contains this Group in the layout or is a placeholder | |
Core::Stack * | stack () const |
returns the tab widget | |
Core::TabBar * | tabBar () const |
QString | title () const |
Core::TitleBar * | titleBar () const |
void | unoverlay () |
clears the FrameOption_IsOverlayed flag. For example, if you drag a side-bar overlay, then it becomes a normal floating window | |
void | updateFloatingActions () |
void | updateTitleAndIcon () |
void | updateTitleBarVisibility () |
int | userType () const |
See Core::DockWidget::userType() | |
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 Member Functions inherited from KDDockWidgets::Core::FocusScope | |
FocusScope (View *thisView) | |
constructor | |
virtual | ~FocusScope () |
void | focus (Qt::FocusReason=Qt::OtherFocusReason) |
Sets focus on this scope. | |
bool | isFocused () const |
Returns true if this FocusScope is focused. This is similar to the QWidget::hasFocus(), except that it counts with the children being focused too. i.e: If any child is focused then this FocusScope has focus too. | |
Static Public Member Functions | |
static int | dbg_numFrames () |
For tests-only. Returns the number of Frame instances in the whole application. | |
static Group * | deserialize (const LayoutSaver::Group &) |
static Core::Group * | fromItem (const Core::Item *) |
Returns the group that's in the specified item. | |
Static Public Attributes | |
static bool | s_inFloatHack = false |
Protected Member Functions | |
void | focusedWidgetChangedCallback () override |
void | isFocusedChangedCallback () override |
reimplement in the 1st QObject derived class | |
void | setParentView_impl (View *parent) override |
Protected Attributes | |
bool | m_inDtor = false |
Core::Stack *const | m_stack |
Core::TabBar *const | m_tabBar |
Core::TitleBar *const | m_titleBar |
Protected Attributes inherited from KDDockWidgets::Core::Controller | |
bool | m_inDtor = false |
Definition at line 40 of file core/Group.h.
typedef Vector<Group *> KDDockWidgets::Core::Group::List |
Definition at line 44 of file core/Group.h.
|
explicit |
Definition at line 93 of file core/Group.cpp.
References alwaysShowsTabs(), KDDockWidgets::Core::View::asLayout(), KDDockWidgets::Core::View::d, KDDockWidgets::Core::TabBar::dptr(), KDDockWidgets::Core::View::init(), m_stack, m_tabBar, KDDockWidgets::DockRegistry::registerGroup(), s_dbg_numFrames, KDDockWidgets::DockRegistry::self(), setLayout(), KDDockWidgets::Core::Stack::setTabBarAutoHide(), updateTitleAndIcon(), and KDDockWidgets::Core::Controller::view().
|
overridevirtual |
Definition at line 117 of file core/Group.cpp.
References m_inDtor, m_stack, m_titleBar, s_dbg_numFrames, KDDockWidgets::DockRegistry::self(), setLayout(), and KDDockWidgets::DockRegistry::unregisterGroup().
Core::TitleBar * Group::actualTitleBar | ( | ) | const |
Definition at line 504 of file core/Group.cpp.
References floatingWindow(), mdiDropAreaWrapper(), mdiFrame(), and titleBar().
Referenced by KDDockWidgets::Core::DockWidgetViewInterface::actualTitleBar(), KDDockWidgets::QtQuick::Group::actualTitleBar(), c_KDDockWidgets__Core__Group__actualTitleBar(), and KDDockWidgets::Core::TitleBar::makeWindow().
void Group::addTab | ( | DockWidget * | dockWidget, |
const InitialOption & | addingOption = {} |
||
) |
Adds a widget into the Group's Stack.
Definition at line 228 of file core/Group.cpp.
References dockWidgetCount(), insertWidget(), and onDockWidgetTitleChanged().
Referenced by KDDockWidgets::Core::DropArea::_addDockWidget(), KDDockWidgets::Core::DockWidget::addDockWidgetAsTab(), addTab(), addTab(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::addTab(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::addTab(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::addTab(), c_KDDockWidgets__Core__Group__addTab_DockWidget_InitialOption(), c_KDDockWidgets__Core__Group__addTab_FloatingWindow_InitialOption(), c_KDDockWidgets__Core__Group__addTab_Group_InitialOption(), and deserialize().
void Group::addTab | ( | FloatingWindow * | floatingWindow, |
const InitialOption & | addingOption = {} |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 252 of file core/Group.cpp.
References addTab(), floatingWindow(), and KDDockWidgets::Core::FloatingWindow::groups().
void Group::addTab | ( | Group * | group, |
const InitialOption & | addingOption = {} |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 240 of file core/Group.cpp.
References addTab(), dockWidgets(), and isEmpty().
Definition at line 680 of file core/Group.cpp.
References KDDockWidgets::Core::DockWidget::affinities(), dockWidgetAt(), isEmpty(), and mainWindow().
Referenced by KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(), and hackFindParentHarder().
bool Group::allDockWidgetsHave | ( | DockWidgetOption | option | ) | const |
Returns whether all dock widgets have the specified option set.
Definition at line 897 of file core/Group.cpp.
References dockWidgets().
Referenced by c_KDDockWidgets__Core__Group__allDockWidgetsHave_DockWidgetOption(), and c_KDDockWidgets__Core__Group__allDockWidgetsHave_LayoutSaverOption().
bool Group::allDockWidgetsHave | ( | LayoutSaverOption | option | ) | const |
Returns whether all dock widgets have the specified layout saver option set.
Definition at line 912 of file core/Group.cpp.
References dockWidgets().
bool Core::Group::alwaysShowsTabs | ( | ) | const |
whether the tab widget will always show tabs, even if there's only 1 dock widget
While technically a non-floating dock widget is always tabbed, the user won't see the tabs as in most cases there's only 1 widget tabbed. But for the main window central group it's often wanted to see tabs even if there's only 1 widget, where each widget represents a "document".
Definition at line 1020 of file core/Group.cpp.
References KDDockWidgets::FrameOption_AlwaysShowsTabs.
Referenced by Group(), c_KDDockWidgets__Core__Group__alwaysShowsTabs(), and hasTabsVisible().
bool Group::anyDockWidgetsHas | ( | DockWidgetOption | option | ) | const |
Returns whether at least one dock widget has the specified option set.
Definition at line 905 of file core/Group.cpp.
References dockWidgets().
Referenced by c_KDDockWidgets__Core__Group__anyDockWidgetsHas_DockWidgetOption(), and c_KDDockWidgets__Core__Group__anyDockWidgetsHas_LayoutSaverOption().
bool Group::anyDockWidgetsHas | ( | LayoutSaverOption | option | ) | const |
Returns whether at least one dock widget has the specified layout saver option set.
Definition at line 919 of file core/Group.cpp.
References dockWidgets().
bool Group::anyNonClosable | ( | ) | const |
Definition at line 605 of file core/Group.cpp.
References KDDockWidgets::DockWidgetOption_NotClosable, dockWidgets(), KDDockWidgets::Core::Platform::instance(), and KDDockWidgets::Core::Platform::isProcessingAppQuitEvent().
Referenced by KDDockWidgets::Core::FloatingWindow::anyNonClosable(), and c_KDDockWidgets__Core__Group__anyNonClosable().
bool Group::anyNonDockable | ( | ) | const |
Definition at line 617 of file core/Group.cpp.
References KDDockWidgets::DockWidgetOption_NotDockable, and dockWidgets().
Referenced by KDDockWidgets::Core::FloatingWindow::anyNonDockable(), and c_KDDockWidgets__Core__Group__anyNonDockable().
LayoutingGuest * Group::asLayoutingGuest | ( | ) | const |
Definition at line 1038 of file core/Group.cpp.
Referenced by KDDockWidgets::Core::Layout::deserialize(), and KDDockWidgets::Core::Layout::itemForGroup().
bool Group::beingDeletedLater | ( | ) | const |
Returns whether a deleteLater has already been issued.
Definition at line 667 of file core/Group.cpp.
Referenced by c_KDDockWidgets__Core__Group__beingDeletedLater().
Size Group::biggestDockWidgetMaxSize | ( | ) | const |
Returns the biggest combined maxSize of all dock widgets.
Example: dock 1, max=2000x1000 dock 2, max=3000x400 dock3, max= result=3000,1000
Any widget having 16777215x16777215 is ignored (represents not having a max-size, QWIDGETSIZE_MAX)
Definition at line 847 of file core/Group.cpp.
References dockWidgets(), and KDDockWidgets::Core::Controller::size().
Referenced by c_KDDockWidgets__Core__Group__biggestDockWidgetMaxSize(), and KDDockWidgets::QtWidgets::Group::maxSizeHint().
void Group::changeTabIcon | ( | int | index, |
const Icon & | icon | ||
) |
Definition at line 178 of file core/Group.cpp.
References KDDockWidgets::Core::TabBar::changeTabIcon(), icon(), and m_tabBar.
Referenced by onDockWidgetTitleChanged().
bool Group::containsDockWidget | ( | DockWidget * | w | ) | const |
returns whether the dockwidget w
is inside this group
Definition at line 543 of file core/Group.cpp.
References dockWidgetAt(), and dockWidgetCount().
Referenced by KDDockWidgets::Core::DropArea::_addDockWidget(), KDDockWidgets::Core::DockWidget::addDockWidgetAsTab(), c_KDDockWidgets__Core__Group__containsDockWidget_DockWidget(), and insertWidget().
bool Group::containsMouse | ( | Point | globalPos | ) | const |
Definition at line 494 of file core/Group.cpp.
References KDDockWidgets::Core::Controller::rect(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__containsMouse_Point().
Core::DockWidget * Group::currentDockWidget | ( | ) | const |
Returns the current dock widget.
Definition at line 392 of file core/Group.cpp.
References KDDockWidgets::Core::TabBar::currentDockWidget(), m_inDtor, and m_tabBar.
Referenced by c_KDDockWidgets__Core__Group__currentDockWidget(), KDDockWidgets::Core::TitleBar::onAutoHideClicked(), KDDockWidgets::Core::TitleBar::onCloseClicked(), and updateTitleAndIcon().
int Group::currentIndex | ( | ) | const |
returns the index of the current tab
Definition at line 350 of file core/Group.cpp.
References KDDockWidgets::Core::TabBar::currentIndex(), m_inDtor, and m_tabBar.
Referenced by c_KDDockWidgets__Core__Group__currentIndex(), KDDockWidgets::QtQuick::Group::currentIndex(), currentTabIndex(), and insertWidget().
int Group::currentTabIndex | ( | ) | const |
Definition at line 600 of file core/Group.cpp.
References currentIndex().
Referenced by c_KDDockWidgets__Core__Group__currentTabIndex(), serialize(), and updateTitleAndIcon().
|
static |
For tests-only. Returns the number of Frame instances in the whole application.
Definition at line 662 of file core/Group.cpp.
References s_dbg_numFrames.
|
static |
Definition at line 729 of file core/Group.cpp.
References KDDockWidgets::actualOptions(), addTab(), KDDockWidgets::Core::DockWidget::deserialize(), KDDockWidgets::FrameOption_IsCentralFrame, options(), KDDockWidgets::DockRegistry::self(), setCurrentTabIndex(), KDDockWidgets::Core::View::setGeometry(), and KDDockWidgets::Core::Controller::view().
Referenced by KDDockWidgets::Core::Layout::deserialize().
FloatingWindow * Group::detachTab | ( | DockWidget * | dockWidget | ) |
detaches this dock widget
Definition at line 317 of file core/Group.cpp.
References KDDockWidgets::Core::DockWidget::d, floatingWindow(), KDDockWidgets::Core::Controller::geometry(), m_inDtor, KDDockWidgets::Core::Controller::mapToGlobal(), removeWidget(), KDDockWidgets::Core::FloatingWindow::setSuggestedGeometry(), KDDockWidgets::Core::View::show(), KDDockWidgets::SuggestedGeometryHint_GeometryIsFromDocked, and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__detachTab_DockWidget().
Core::DockWidget * Group::dockWidgetAt | ( | int | index | ) | const |
Returns the dock widget at index
.
Definition at line 384 of file core/Group.cpp.
References KDDockWidgets::Core::TabBar::dockWidgetAt(), m_inDtor, and m_tabBar.
Referenced by affinities(), c_KDDockWidgets__Core__Group__dockWidgetAt_int(), containsDockWidget(), dockWidgets(), hasNestedMDIDockWidgets(), and KDDockWidgets::Core::FloatingWindow::singleDockWidget().
int Group::dockWidgetCount | ( | ) | const |
returns the number of dock widgets inside the group
Definition at line 400 of file core/Group.cpp.
References m_inDtor, m_stack, and KDDockWidgets::Core::Stack::numDockWidgets().
Referenced by addTab(), c_KDDockWidgets__Core__Group__dockWidgetCount(), containsDockWidget(), dockWidgets(), hasNestedMDIDockWidgets(), KDDockWidgets::Core::FloatingWindow::hasSingleDockWidget(), and hasTabsVisible().
Core::DockWidget::List Group::dockWidgets | ( | ) | const |
Definition at line 529 of file core/Group.cpp.
References dockWidgetAt(), dockWidgetCount(), dockWidgets(), and m_inDtor.
Referenced by addTab(), allDockWidgetsHave(), allDockWidgetsHave(), anyDockWidgetsHas(), anyDockWidgetsHas(), anyNonClosable(), anyNonDockable(), biggestDockWidgetMaxSize(), dockWidgets(), KDDockWidgets::Core::TitleBar::dockWidgets(), dockWidgetsMinSize(), KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(), floatingWindowFlagsForGroup(), KDDockWidgets::QtQuick::Group::maxSizeHint(), KDDockWidgets::Core::TitleBar::onAutoHideClicked(), onDockWidgetCountChanged(), requestedFloatingWindowFlags(), serialize(), updateFloatingActions(), and updateTitleBarVisibility().
Size Group::dockWidgetsMinSize | ( | ) | const |
Returns the minimum size of the dock widgets. This might be slightly smaller than Frame::minSize() due to the QTabWidget having some margins and tab bar.
Definition at line 835 of file core/Group.cpp.
References dockWidgets(), and KDDockWidgets::Core::Controller::size().
Referenced by c_KDDockWidgets__Core__Group__dockWidgetsMinSize(), KDDockWidgets::QtWidgets::Group::maxSizeHint(), KDDockWidgets::flutter::Group::minSize(), and KDDockWidgets::QtQuick::Group::minSize().
Group::Private * Group::dptr | ( | ) | const |
Definition at line 1033 of file core/Group.cpp.
Referenced by KDDockWidgets::Core::TitleBar::TitleBar(), and KDDockWidgets::QtWidgets::Group::init().
|
virtual |
Returns the drag rect in global coordinates. This is usually the title bar rect. However, when using Config::Flag_HideTitleBarWhenTabsVisible it will be the tab bar background. Returns global coordinates.
Reimplemented in KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper.
Definition at line 874 of file core/Group.cpp.
References KDDockWidgets::Core::Controller::isVisible(), m_titleBar, KDDockWidgets::Core::View::mapToGlobal(), KDDockWidgets::Core::Controller::rect(), KDDockWidgets::Core::View::rect(), and KDDockWidgets::Core::Controller::view().
FloatingWindow * Group::floatingWindow | ( | ) | const |
returns the FloatingWindow this group is in, if any
Definition at line 553 of file core/Group.cpp.
References KDDockWidgets::Core::MainWindow, KDDockWidgets::Core::View::parentView(), and KDDockWidgets::Core::Controller::view().
Referenced by actualTitleBar(), addTab(), c_KDDockWidgets__Core__Group__floatingWindow(), detachTab(), isInFloatingWindow(), onDockWidgetCountChanged(), KDDockWidgets::Core::Stack::onMouseDoubleClick(), updateTitleAndIcon(), and updateTitleBarVisibility().
|
overrideprotectedvirtual |
Implements KDDockWidgets::Core::FocusScope.
Reimplemented in KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper.
Definition at line 439 of file core/Group.cpp.
Referenced by KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::focusedWidgetChangedCallback(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::focusedWidgetChangedCallback_nocallback().
|
static |
Returns the group that's in the specified item.
Definition at line 1085 of file core/Group.cpp.
Referenced by KDDockWidgets::Core::DropArea::centralFrame(), KDDockWidgets::Core::DropArea::groups(), KDDockWidgets::Core::Layout::groups(), KDDockWidgets::Core::Layout::restorePlaceholder(), and KDDockWidgets::Core::Layout::serialize().
bool Group::hasNestedMDIDockWidgets | ( | ) | const |
If this group is a MDI group (isMDI() == true), returns whether it contains nested dock widgets (DockWidgetOption_MDINestable)
Definition at line 978 of file core/Group.cpp.
References KDDockWidgets::Core::DockWidget::d, dockWidgetAt(), dockWidgetCount(), and isMDI().
Referenced by c_KDDockWidgets__Core__Group__hasNestedMDIDockWidgets().
|
inline |
returns whether there's only 1 dock widget.
Definition at line 196 of file core/Group.h.
Referenced by KDDockWidgets::Core::DropArea::_addDockWidget(), c_KDDockWidgets__Core__Group__hasSingleDockWidget(), insertWidget(), restoreToPreviousPosition(), and KDDockWidgets::Core::FloatingWindow::singleDockWidget().
bool Group::hasTabsVisible | ( | ) | const |
returns true if tabs are visible
Definition at line 672 of file core/Group.cpp.
References alwaysShowsTabs(), and dockWidgetCount().
Referenced by c_KDDockWidgets__Core__Group__hasTabsVisible(), and updateTitleBarVisibility().
Icon Group::icon | ( | ) | const |
Definition at line 524 of file core/Group.cpp.
References KDDockWidgets::Core::TitleBar::icon(), and m_titleBar.
Referenced by changeTabIcon(), and KDDockWidgets::Core::FloatingWindow::updateTitleAndIcon().
int Group::indexOfDockWidget | ( | const DockWidget * | dw | ) |
returns the index of the specified dock widget
Definition at line 342 of file core/Group.cpp.
References KDDockWidgets::Core::TabBar::indexOfDockWidget(), m_inDtor, and m_tabBar.
Referenced by c_KDDockWidgets__Core__Group__indexOfDockWidget_DockWidget(), and onDockWidgetTitleChanged().
void Group::insertDockWidget | ( | DockWidget * | dw, |
int | index | ||
) |
Inserts a dock widget into the specified index.
Definition at line 374 of file core/Group.cpp.
References KDDockWidgets::Core::DockWidget::d, insertDockWidget(), m_inDtor, onDockWidgetTitleChanged(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__insertDockWidget_DockWidget_int(), insertDockWidget(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::insertDockWidget(), and insertWidget().
void Group::insertWidget | ( | DockWidget * | dockWidget, |
int | index, | ||
const InitialOption & | addingOption = {} |
||
) |
Inserts a widget into the Group's TabWidget at index
.
Definition at line 260 of file core/Group.cpp.
References KDDockWidgets::Core::View::close(), containsDockWidget(), currentIndex(), KDDockWidgets::Core::DockWidget::d, hasSingleDockWidget(), insertDockWidget(), KDDockWidgets::Core::DockWidget::isPersistentCentralDockWidget(), onDockWidgetTitleChanged(), KDDockWidgets::InitialOption::preservesCurrentTab(), KDDockWidgets::Core::View::resize(), setCurrentTabIndex(), KDDockWidgets::Core::Controller::size(), KDDockWidgets::InitialOption::startsHidden(), KDDockWidgets::Core::DockWidget::uniqueName(), and KDDockWidgets::Core::Controller::view().
Referenced by addTab(), c_KDDockWidgets__Core__Group__insertWidget_DockWidget_int_InitialOption(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::insertWidget().
bool Core::Group::isCentralGroup | ( | ) | const |
returns if this widget is the central group MainWindow supports a mode where the middle group is persistent even if no dock widget is there.
Definition at line 1028 of file core/Group.cpp.
References KDDockWidgets::FrameOption_IsCentralFrame.
Referenced by c_KDDockWidgets__Core__Group__isCentralGroup(), onDockWidgetCountChanged(), KDDockWidgets::Core::Stack::onMouseDoubleClick(), and updateTitleBarVisibility().
bool Core::Group::isDockable | ( | ) | const |
Returns whether you can DND dock widgets over this group and tab into it.
Definition at line 1024 of file core/Group.cpp.
References KDDockWidgets::FrameOption_NonDockable.
Referenced by c_KDDockWidgets__Core__Group__isDockable(), and KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible().
|
inline |
returns whether there's 0 dock widgets. If not persistent then the Frame will delete itself.
Definition at line 190 of file core/Group.h.
Referenced by addTab(), affinities(), c_KDDockWidgets__Core__Group__isEmpty(), and onDockWidgetCountChanged().
bool Group::isFloating | ( | ) | const |
Returns whether this group is floating. A floating group isn't attached to any other MainWindow, and if it's attached to a FloatingWindow then it's considered floating if it's the only group in that Window. A floating group can have multiple dock widgets (tabbed), in which case each DockWidget::isFloating() returns false, in which case you can use isInFloatingWindow() which would still return true.
Definition at line 711 of file core/Group.cpp.
References isInMainWindow(), isMDI(), and isTheOnlyGroup().
Referenced by c_KDDockWidgets__Core__Group__isFloating(), KDDockWidgets::Core::TitleBar::isFloating(), and KDDockWidgets::QtWidgets::Group::paintEvent().
|
overrideprotectedvirtual |
reimplement in the 1st QObject derived class
Implements KDDockWidgets::Core::FocusScope.
Reimplemented in KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper.
Definition at line 434 of file core/Group.cpp.
Referenced by KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::isFocusedChangedCallback(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::isFocusedChangedCallback_nocallback().
bool Group::isInFloatingWindow | ( | ) | const |
Returns whether this group is in a FloatingWindow, as opposed to MainWindow.
After setup it's equivalent to !isInMainWindow().
Definition at line 719 of file core/Group.cpp.
References floatingWindow().
Referenced by c_KDDockWidgets__Core__Group__isInFloatingWindow(), and KDDockWidgets::Core::TitleBar::onCloseClicked().
bool Group::isInMainWindow | ( | ) | const |
Returns whether this group is docked inside a MainWindow.
Definition at line 724 of file core/Group.cpp.
References mainWindow().
Referenced by c_KDDockWidgets__Core__Group__isInMainWindow(), isFloating(), KDDockWidgets::Core::Stack::onMouseDoubleClick(), setLayout(), and KDDockWidgets::Core::TitleBar::supportsAutoHideButton().
bool Group::isMDI | ( | ) | const |
Returns whether this group is in a MDI layout Usually no, unless you're using an MDI main window.
Definition at line 937 of file core/Group.cpp.
References mdiLayout().
Referenced by c_KDDockWidgets__Core__Group__isMDI(), hasNestedMDIDockWidgets(), isFloating(), KDDockWidgets::Core::GroupViewInterface::isMDI(), KDDockWidgets::Core::TabBar::isMDI(), KDDockWidgets::Core::DockWidget::mdiZ(), KDDockWidgets::Core::MDILayout::resizeDockWidget(), setLayout(), and KDDockWidgets::Core::DockWidget::setMDIZ().
bool Group::isMDIWrapper | ( | ) | const |
Returns whether this group was created automatically just for the purpose of supporting DockWidgetOption_MDINestable.
Definition at line 942 of file core/Group.cpp.
References mdiDropAreaWrapper().
Referenced by c_KDDockWidgets__Core__Group__isMDIWrapper(), and updateTitleBarVisibility().
bool Group::isOverlayed | ( | ) | const |
Returns whether this group is overlayed on top of the MainWindow (auto-hide feature);.
Definition at line 701 of file core/Group.cpp.
References KDDockWidgets::FrameOption_IsOverlayed.
Referenced by c_KDDockWidgets__Core__Group__isOverlayed(), KDDockWidgets::QtWidgets::Group::init(), KDDockWidgets::Core::TitleBar::isOverlayed(), KDDockWidgets::QtWidgets::Group::paintEvent(), and KDDockWidgets::Core::TitleBar::supportsAutoHideButton().
bool Group::isTheOnlyGroup | ( | ) | const |
Definition at line 696 of file core/Group.cpp.
References KDDockWidgets::Core::Layout::visibleCount().
Referenced by c_KDDockWidgets__Core__Group__isTheOnlyGroup(), KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(), isFloating(), KDDockWidgets::Core::TitleBar::makeWindow(), and KDDockWidgets::Core::TitleBar::onCloseClicked().
Item * Group::layoutItem | ( | ) | const |
returns the layout item that either contains this Frame in the layout or is a placeholder
Definition at line 657 of file core/Group.cpp.
Referenced by KDDockWidgets::Core::DropArea::addDockWidget(), KDDockWidgets::Core::DropArea::addMultiSplitter(), and c_KDDockWidgets__Core__Group__layoutItem().
MainWindow * Group::mainWindow | ( | ) | const |
Returns the main window this group is in. nullptr if not inside a main window.
Definition at line 891 of file core/Group.cpp.
References KDDockWidgets::Core::Layout::mainWindow().
Referenced by affinities(), c_KDDockWidgets__Core__Group__mainWindow(), isInMainWindow(), KDDockWidgets::Core::TitleBar::mainWindow(), and serialize().
Core::DockWidget * Group::mdiDockWidgetWrapper | ( | ) | const |
If this is an MDI wrapper group, return the DockWidget MDI wrapper.
Definition at line 956 of file core/Group.cpp.
References mdiDropAreaWrapper(), KDDockWidgets::Core::View::parentView(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__mdiDockWidgetWrapper(), and mdiFrame().
DropArea * Group::mdiDropAreaWrapper | ( | ) | const |
If this is an MDI wrapper group, return the DropArea MDI wrapper.
Definition at line 964 of file core/Group.cpp.
References KDDockWidgets::Core::View::parentView(), and KDDockWidgets::Core::Controller::view().
Referenced by actualTitleBar(), c_KDDockWidgets__Core__Group__mdiDropAreaWrapper(), isMDIWrapper(), mdiDockWidgetWrapper(), and updateTitleBarVisibility().
Group * Group::mdiFrame | ( | ) | const |
If this group is an MDI wrapper, returns the MDI group. That is the group you actually drag inside the MDI area.
Definition at line 947 of file core/Group.cpp.
References mdiDockWidgetWrapper().
Referenced by actualTitleBar(), and c_KDDockWidgets__Core__Group__mdiFrame().
MDILayout * Group::mdiLayout | ( | ) | const |
Returns the MDI layout. Or nullptr if this group isn't in a MDI layout.
Definition at line 973 of file core/Group.cpp.
References KDDockWidgets::Core::Layout::asMDILayout().
Referenced by isMDI(), and KDDockWidgets::QtQuick::Group::setMDISize().
int Group::nonContentsHeight | ( | ) | const |
Definition at line 183 of file core/Group.cpp.
References nonContentsHeight(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__nonContentsHeight(), and nonContentsHeight().
void Group::onDockWidgetCountChanged | ( | ) |
Definition at line 408 of file core/Group.cpp.
References dockWidgets(), floatingWindow(), KDDockWidgets::FrameOption_AlwaysShowsTabs, isCentralGroup(), isEmpty(), and updateTitleBarVisibility().
Referenced by c_KDDockWidgets__Core__Group__onDockWidgetCountChanged(), KDDockWidgets::Core::TabBar::insertDockWidget(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::onDockWidgetCountChanged(), KDDockWidgets::Core::TabBar::removeDockWidget(), and KDDockWidgets::QtQuick::Group::updateConstraints().
void Group::onDockWidgetTitleChanged | ( | DockWidget * | dw | ) |
Definition at line 217 of file core/Group.cpp.
References changeTabIcon(), KDDockWidgets::Core::DockWidget::icon(), indexOfDockWidget(), renameTab(), KDDockWidgets::TabBar, KDDockWidgets::Core::DockWidget::title(), and updateTitleAndIcon().
Referenced by addTab(), c_KDDockWidgets__Core__Group__onDockWidgetTitleChanged_DockWidget(), insertDockWidget(), insertWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::onDockWidgetTitleChanged().
FrameOptions Core::Group::options | ( | ) | const |
Definition at line 1016 of file core/Group.cpp.
Referenced by deserialize(), and serialize().
void Group::removeWidget | ( | DockWidget * | dw | ) |
removes a dockwidget from the group
Definition at line 303 of file core/Group.cpp.
References KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__Group__removeWidget_DockWidget(), detachTab(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::removeWidget().
void Group::renameTab | ( | int | index, |
const QString & | title | ||
) |
Definition at line 173 of file core/Group.cpp.
References m_tabBar, KDDockWidgets::Core::TabBar::renameTab(), and title().
Referenced by c_KDDockWidgets__Core__Group__renameTab_int_QString(), onDockWidgetTitleChanged(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::renameTab().
FloatingWindowFlags Group::requestedFloatingWindowFlags | ( | ) | const |
User requested floating window flags for when this group floats.
Definition at line 1007 of file core/Group.cpp.
References dockWidgets(), and KDDockWidgets::FromGlobalConfig.
Referenced by hackFindParentHarder().
WidgetResizeHandler * Group::resizeHandler | ( | ) | const |
Returns the resize handler. Used mostly in MDI mode.
Definition at line 996 of file core/Group.cpp.
Referenced by KDDockWidgets::QtQuick::Group::startMDIResize().
void Group::restoreToPreviousPosition | ( | ) |
Puts the Group back in its previous main window position.
Usually DockWidget::Private::restoreToPreviousPosition() is used, but when we have a floating group with tabs we just reuse the group instead of moving the tabbed dock widgets one by one.
Definition at line 578 of file core/Group.cpp.
References hasSingleDockWidget().
Referenced by c_KDDockWidgets__Core__Group__restoreToPreviousPosition(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::restoreToPreviousPosition().
LayoutSaver::Group Group::serialize | ( | ) | const |
Definition at line 777 of file core/Group.cpp.
References currentTabIndex(), KDDockWidgets::Core::View::d, dockWidgets(), KDDockWidgets::Core::Controller::geometry(), KDToolBox::StlContainerAdaptor::StdVectorAdaptor< T, Args >::isEmpty(), mainWindow(), options(), and KDDockWidgets::Core::Controller::view().
void Group::setAllowedResizeSides | ( | CursorPositions | sides | ) |
To allow resizing the overlayed dock widget (auto-hide feature)
Definition at line 926 of file core/Group.cpp.
void Group::setCurrentDockWidget | ( | DockWidget * | dw | ) |
Sets the specified dock widget to be the current tab.
Definition at line 366 of file core/Group.cpp.
References m_inDtor, m_tabBar, and KDDockWidgets::Core::TabBar::setCurrentDockWidget().
Referenced by c_KDDockWidgets__Core__Group__setCurrentDockWidget_DockWidget(), KDDockWidgets::QtQuick::Group::insertDockWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setCurrentDockWidget().
void Group::setCurrentTabIndex | ( | int | index | ) |
sets the current tab index
Definition at line 358 of file core/Group.cpp.
References m_inDtor, m_tabBar, and KDDockWidgets::Core::TabBar::setCurrentIndex().
Referenced by c_KDDockWidgets__Core__Group__setCurrentTabIndex_int(), deserialize(), insertWidget(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setCurrentTabIndex().
void Group::setLayout | ( | Layout * | dt | ) |
Sets the Layout which this group is in.
Definition at line 147 of file core/Group.cpp.
References KDDockWidgets::Core::Layout::d_ptr(), isInMainWindow(), isMDI(), and updateTitleBarVisibility().
Referenced by Group(), ~Group(), c_KDDockWidgets__Core__Group__setLayout_Layout(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setLayout(), and setParentView_impl().
void Group::setLayoutItem | ( | Core::Item * | item | ) |
sets the layout item that either contains this Group in the layout or is a placeholder
Definition at line 691 of file core/Group.cpp.
Referenced by c_KDDockWidgets__Core__Group__setLayoutItem_Item(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setLayoutItem().
|
overrideprotectedvirtual |
Reimplemented from KDDockWidgets::Core::Controller.
Reimplemented in KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper.
Definition at line 1001 of file core/Group.cpp.
References KDDockWidgets::Core::View::asLayout(), setLayout(), and KDDockWidgets::Core::Controller::setParentView_impl().
Referenced by KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setParentView_impl(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::setParentView_impl_nocallback().
Core::Stack * Group::stack | ( | ) | const |
returns the tab widget
Definition at line 188 of file core/Group.cpp.
References m_stack.
Referenced by c_KDDockWidgets__Core__Group__stack(), KDDockWidgets::QtWidgets::Group::init(), KDDockWidgets::Core::GroupViewInterface::insertDockWidget(), and KDDockWidgets::Core::TitleBar::tabBar().
Core::TabBar * Group::tabBar | ( | ) | const |
Definition at line 193 of file core/Group.cpp.
References m_stack, and KDDockWidgets::Core::Stack::tabBar().
Referenced by c_KDDockWidgets__Core__Group__tabBar(), KDDockWidgets::QtWidgets::Group::dragRect(), KDDockWidgets::QtQuick::Group::insertDockWidget(), KDDockWidgets::QtWidgets::Group::nonContentsHeight(), KDDockWidgets::QtQuick::Group::removeDockWidget(), KDDockWidgets::Core::GroupViewInterface::removeDockWidget(), and KDDockWidgets::Core::DockWidget::startDragging().
QString Group::title | ( | ) | const |
Definition at line 519 of file core/Group.cpp.
References m_titleBar, and KDDockWidgets::Core::TitleBar::title().
Referenced by c_KDDockWidgets__Core__Group__title(), renameTab(), and KDDockWidgets::Core::FloatingWindow::updateTitleAndIcon().
Core::TitleBar * Group::titleBar | ( | ) | const |
Definition at line 499 of file core/Group.cpp.
References m_titleBar.
Referenced by actualTitleBar(), c_KDDockWidgets__Core__Group__titleBar(), KDDockWidgets::QtWidgets::Group::init(), KDDockWidgets::QtWidgets::Group::nonContentsHeight(), and KDDockWidgets::QtQuick::Group::titleBar().
void Group::unoverlay | ( | ) |
clears the FrameOption_IsOverlayed flag. For example, if you drag a side-bar overlay, then it becomes a normal floating window
Definition at line 706 of file core/Group.cpp.
Referenced by c_KDDockWidgets__Core__Group__unoverlay(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::unoverlay().
void Group::updateFloatingActions | ( | ) |
Definition at line 487 of file core/Group.cpp.
References dockWidgets().
Referenced by c_KDDockWidgets__Core__Group__updateFloatingActions(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::updateFloatingActions().
void Group::updateTitleAndIcon | ( | ) |
Definition at line 198 of file core/Group.cpp.
References currentDockWidget(), currentTabIndex(), floatingWindow(), m_titleBar, KDDockWidgets::Core::TitleBar::setIcon(), and KDDockWidgets::Core::TitleBar::setTitle().
Referenced by Group(), c_KDDockWidgets__Core__Group__updateTitleAndIcon(), onDockWidgetTitleChanged(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::updateTitleAndIcon().
void Group::updateTitleBarVisibility | ( | ) |
Definition at line 444 of file core/Group.cpp.
References dockWidgets(), KDDockWidgets::Config::Flag_HideTitleBarWhenTabsVisible, floatingWindow(), hasTabsVisible(), isCentralGroup(), isMDIWrapper(), KDDockWidgets::Core::Controller::isVisible(), m_titleBar, mdiDropAreaWrapper(), KDDockWidgets::Config::self(), and KDDockWidgets::Core::Controller::setVisible().
Referenced by c_KDDockWidgets__Core__Group__updateTitleBarVisibility(), onDockWidgetCountChanged(), setLayout(), KDDockWidgets::Core::FloatingWindow::updateTitleBarVisibility(), and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Group_wrapper::updateTitleBarVisibility().
int Group::userType | ( | ) | const |
See Core::DockWidget::userType()
Definition at line 991 of file core/Group.cpp.
Referenced by c_KDDockWidgets__Core__Group__userType().
|
protected |
Definition at line 333 of file core/Group.h.
Referenced by ~Group(), currentDockWidget(), currentIndex(), detachTab(), dockWidgetAt(), dockWidgetCount(), dockWidgets(), indexOfDockWidget(), insertDockWidget(), setCurrentDockWidget(), and setCurrentTabIndex().
|
protected |
Definition at line 335 of file core/Group.h.
Referenced by Group(), ~Group(), dockWidgetCount(), KDDockWidgets::Core::TabBar::group(), stack(), and tabBar().
|
protected |
Definition at line 336 of file core/Group.h.
Referenced by Group(), changeTabIcon(), currentDockWidget(), currentIndex(), dockWidgetAt(), indexOfDockWidget(), renameTab(), setCurrentDockWidget(), and setCurrentTabIndex().
|
protected |
Definition at line 337 of file core/Group.h.
Referenced by ~Group(), dragRect(), icon(), title(), titleBar(), updateTitleAndIcon(), and updateTitleBarVisibility().
|
static |
Definition at line 296 of file core/Group.h.
Referenced by KDDockWidgets::Core::TitleBar::onFloatClicked().