KDDockWidgets API Documentation  1.5
Public Member Functions | Public Attributes | List of all members
KDDockWidgets::InitialOption Struct Reference

Struct describing the preferred dock widget size and visibility when adding it to a layout. More...

#include <KDDockWidgets.h>

Collaboration diagram for KDDockWidgets::InitialOption:
Collaboration graph
[legend]

Public Member Functions

 InitialOption ()=default
 
 InitialOption (AddingOption opt)
 
 InitialOption (InitialVisibilityOption v)
 
 InitialOption (InitialVisibilityOption v, QSize size)
 
 InitialOption (QSize size)
 
bool hasPreferredLength (Qt::Orientation o) const
 
int preferredLength (Qt::Orientation o) const
 
bool startsHidden () const
 

Public Attributes

QSize preferredSize
 Allows to control the size a dock widget should get when docked. More...
 
InitialVisibilityOption visibility = InitialVisibilityOption::StartVisible
 Allows a dock widget to be docked as hidden. More...
 

Detailed Description

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.

See also
MainWindowBase::addDockWidget()

Definition at line 104 of file KDDockWidgets.h.

Constructor & Destructor Documentation

◆ InitialOption() [1/5]

KDDockWidgets::InitialOption::InitialOption ( )
default

◆ InitialOption() [2/5]

KDDockWidgets::InitialOption::InitialOption ( InitialVisibilityOption  v)
inline

Definition at line 110 of file KDDockWidgets.h.

◆ InitialOption() [3/5]

KDDockWidgets::InitialOption::InitialOption ( QSize  size)
inline

Definition at line 115 of file KDDockWidgets.h.

◆ InitialOption() [4/5]

KDDockWidgets::InitialOption::InitialOption ( InitialVisibilityOption  v,
QSize  size 
)
inline

Definition at line 120 of file KDDockWidgets.h.

◆ InitialOption() [5/5]

KDDockWidgets::InitialOption::InitialOption ( AddingOption  opt)
inline

Definition at line 127 of file KDDockWidgets.h.

Member Function Documentation

◆ hasPreferredLength()

bool KDDockWidgets::InitialOption::hasPreferredLength ( Qt::Orientation  o) const
inline

Definition at line 144 of file KDDockWidgets.h.

◆ preferredLength()

int KDDockWidgets::InitialOption::preferredLength ( Qt::Orientation  o) const
inline

Definition at line 138 of file KDDockWidgets.h.

References Qt::Horizontal.

◆ startsHidden()

bool KDDockWidgets::InitialOption::startsHidden ( ) const
inline

Definition at line 133 of file KDDockWidgets.h.

References KDDockWidgets::StartVisible.

Referenced by operator<<().

Member Data Documentation

◆ preferredSize

QSize 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 166 of file KDDockWidgets.h.

◆ visibility

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 155 of file KDDockWidgets.h.


The documentation for this struct was generated from the following file:

© 2019-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated on Mon Mar 7 2022 02:01:21 for KDDockWidgets API Documentation by doxygen 1.8.20