KDDockWidgets API Documentation 2.1
|
Struct describing the preferred dock widget size and visibility when adding it to a layout. More...
#include <KDDockWidgets.h>
Public Member Functions | |
InitialOption () | |
InitialOption (DefaultSizeMode mode) | |
InitialOption (InitialVisibilityOption v) | |
InitialOption (InitialVisibilityOption v, Size size) | |
InitialOption (Size size) | |
bool | hasPreferredLength (Qt::Orientation o) const |
int | preferredLength (Qt::Orientation o) const |
Returns preferred height if the container is vertical, otherwise preferred width. | |
bool | preservesCurrentTab () const |
bool | startsHidden () const |
Public Attributes | |
NeighbourSqueezeStrategy | neighbourSqueezeStrategy = s_defaultNeighbourSqueezeStrategy |
Size | preferredSize |
Allows to control the size a dock widget should get when docked. | |
InitialVisibilityOption | visibility = InitialVisibilityOption::StartVisible |
Allows a dock widget to be docked as hidden. | |
Static Public Attributes | |
static NeighbourSqueezeStrategy | s_defaultNeighbourSqueezeStrategy = NeighbourSqueezeStrategy::AllNeighbours |
Struct describing the preferred dock widget size and visibility when adding it to a layout.
You can pass this to MainWindowBase::addDockWidget() to give an hint of your preferred size and visibility.
See below the documentation for InitialOption::visibility and InitialOption::preferredSize.
Definition at line 175 of file KDDockWidgets.h.
InitialOption::InitialOption | ( | ) |
Definition at line 60 of file KDDockWidgets.cpp.
InitialOption::InitialOption | ( | InitialVisibilityOption | v | ) |
Definition at line 64 of file KDDockWidgets.cpp.
InitialOption::InitialOption | ( | Size | size | ) |
Definition at line 69 of file KDDockWidgets.cpp.
InitialOption::InitialOption | ( | InitialVisibilityOption | v, |
Size | size | ||
) |
Definition at line 74 of file KDDockWidgets.cpp.
InitialOption::InitialOption | ( | DefaultSizeMode | mode | ) |
Definition at line 80 of file KDDockWidgets.cpp.
|
inline |
Definition at line 200 of file KDDockWidgets.h.
|
inline |
Returns preferred height if the container is vertical, otherwise preferred width.
Definition at line 195 of file KDDockWidgets.h.
References Qt::Horizontal.
|
inline |
Definition at line 189 of file KDDockWidgets.h.
References KDDockWidgets::PreserveCurrentTab.
Referenced by c_KDDockWidgets__InitialOption__preservesCurrentTab(), and KDDockWidgets::Core::Group::insertWidget().
|
inline |
Definition at line 184 of file KDDockWidgets.h.
References KDDockWidgets::StartHidden.
Referenced by KDDockWidgets::Core::DropArea::_addDockWidget(), KDDockWidgets::Core::MDILayout::addDockWidget(), KDDockWidgets::Core::DropArea::addWidget(), c_KDDockWidgets__InitialOption__startsHidden(), and KDDockWidgets::Core::Group::insertWidget().
NeighbourSqueezeStrategy KDDockWidgets::InitialOption::neighbourSqueezeStrategy = s_defaultNeighbourSqueezeStrategy |
Definition at line 225 of file KDDockWidgets.h.
Size KDDockWidgets::InitialOption::preferredSize |
Allows to control the size a dock widget should get when docked.
If an invalid or empty size is passed then KDDW's default heuristics are applied.
Note that usually only the width or the height will be honoured: For example, when adding a dock widget to the left then only the preferred width will be taken into account, as the height will simply fill the whole layout.
Definition at line 222 of file KDDockWidgets.h.
|
static |
Definition at line 224 of file KDDockWidgets.h.
Referenced by KDDockWidgets::Core::defaultNeighbourSqueezeStrategy().
InitialVisibilityOption KDDockWidgets::InitialOption::visibility = InitialVisibilityOption::StartVisible |
Allows a dock widget to be docked as hidden.
Next time you call DockWidget::show() it will be shown at that place. This avoids flickering, as no show()/hide() workarounds are needed.
Definition at line 211 of file KDDockWidgets.h.
Referenced by KDDockWidgets::Core::DropArea::_addDockWidget().