Public Member Functions | Private Attributes | List of all members
ads::CDockAreaLayout Class Reference

Public Member Functions

 CDockAreaLayout (QBoxLayout *ParentLayout)
 
int count () const
 
int currentIndex () const
 
QWidget * currentWidget () const
 
QRect geometry () const
 
int indexOf (QWidget *w) const
 
void insertWidget (int index, QWidget *Widget)
 
bool isEmpty () const
 
void removeWidget (QWidget *Widget)
 
void setCurrentIndex (int index)
 
QWidget * widget (int index) const
 

Private Attributes

int m_CurrentIndex = -1
 
QWidget * m_CurrentWidget = nullptr
 
QBoxLayout * m_ParentLayout
 
QList< QWidget * > m_Widgets
 

Detailed Description

Internal dock area layout mimics stack layout but only inserts the current widget into the internal QLayout object.

Warning
Only the current widget has a parent. All other widgets do not have a parent. That means, a widget that is in this layout may return nullptr for its parent() function if it is not the current widget.

Definition at line 71 of file DockAreaWidget.cpp.

Constructor & Destructor Documentation

◆ CDockAreaLayout()

ads::CDockAreaLayout::CDockAreaLayout ( QBoxLayout *  ParentLayout)
inline

Creates an instance with the given parent layout

Definition at line 83 of file DockAreaWidget.cpp.

Member Function Documentation

◆ count()

int ads::CDockAreaLayout::count ( ) const
inline

Returns the number of widgets in this layout

Definition at line 92 of file DockAreaWidget.cpp.

◆ currentIndex()

int ads::CDockAreaLayout::currentIndex ( ) const
inline

Returns the index of the current active widget

Definition at line 198 of file DockAreaWidget.cpp.

◆ currentWidget()

QWidget* ads::CDockAreaLayout::currentWidget ( ) const
inline

Returns the current selected widget

Definition at line 147 of file DockAreaWidget.cpp.

◆ geometry()

QRect ads::CDockAreaLayout::geometry ( ) const
inline

Returns the geometry of the current active widget

Definition at line 230 of file DockAreaWidget.cpp.

◆ indexOf()

int ads::CDockAreaLayout::indexOf ( QWidget *  w) const
inline

Returns the index of the given widget

Definition at line 214 of file DockAreaWidget.cpp.

◆ insertWidget()

void ads::CDockAreaLayout::insertWidget ( int  index,
QWidget *  Widget 
)
inline

Inserts the widget at the given index position into the internal widget list

Definition at line 101 of file DockAreaWidget.cpp.

◆ isEmpty()

bool ads::CDockAreaLayout::isEmpty ( ) const
inline

Returns true if there are no widgets in the layout

Definition at line 206 of file DockAreaWidget.cpp.

◆ removeWidget()

void ads::CDockAreaLayout::removeWidget ( QWidget *  Widget)
inline

Removes the given widget from the layout

Definition at line 125 of file DockAreaWidget.cpp.

◆ setCurrentIndex()

void ads::CDockAreaLayout::setCurrentIndex ( int  index)
inline

Activates the widget with the give index.

Definition at line 155 of file DockAreaWidget.cpp.

◆ widget()

QWidget* ads::CDockAreaLayout::widget ( int  index) const
inline

Returns the widget for the given index

Definition at line 222 of file DockAreaWidget.cpp.

Member Data Documentation

◆ m_CurrentIndex

int ads::CDockAreaLayout::m_CurrentIndex = -1
private

Definition at line 76 of file DockAreaWidget.cpp.

◆ m_CurrentWidget

QWidget* ads::CDockAreaLayout::m_CurrentWidget = nullptr
private

Definition at line 77 of file DockAreaWidget.cpp.

◆ m_ParentLayout

QBoxLayout* ads::CDockAreaLayout::m_ParentLayout
private

Definition at line 74 of file DockAreaWidget.cpp.

◆ m_Widgets

QList<QWidget*> ads::CDockAreaLayout::m_Widgets
private

Definition at line 75 of file DockAreaWidget.cpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51