API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
SectionWidget Class Reference

SectionWidget manages multiple instances of SectionContent. It displays a title TAB, which is clickable and will switch to the contents associated to the title when clicked. More...

#include <SectionWidget.h>

Inheritance diagram for SectionWidget:
[legend]
Collaboration diagram for SectionWidget:
[legend]

Public Slots

void updateTabs ()
 

Signals

void ribbonLocationChangedSignal (RibbonArea area)
 
void tabChangedSignal (uint04 idx)
 
void userChangedCurrentTabSignal (uint04 idx)
 
- Signals inherited from QCustomStackedWidgetBase
void animationFinished ()
 

Public Member Functions

uint04 activeIndex () const
 
void addContent (SectionContent *c)
 
void addContent (SectionContent *data, bool animate)
 
ContainerWidgetBasecontainerWidget () const
 
uint04 contentCount () const
 
const Buffer< SectionContent * > & contents () const
 
uint04 currentIndex () const
 
void finishAnimation ()
 
bool hasVisibleTab () const
 
void hideCurrentSection ()
 
uint04 indexOf (SectionContent *c)
 
uint04 indexOfContent (SectionContent *c) const
 
uint04 indexOfContentByTitlePos (const QPoint &pos, QWidget *exclude=nullptr) const
 
uint04 indexOfContentByUid (UUID uid) const
 
void insertContent (uint04 index, SectionContent *data, bool animate)
 
bool isLayoutVertical () const
 
bool isRibbonHorizontal () const
 
bool isRibbonLayoutHorizontal () const
 
bool minimizeAllowed ()
 
QSize minimumSizeHint () const override
 
void moveContent (uint04 from, uint04 to) override
 
 operator const QObject * () const
 
 operator const QWidget * () const
 
 operator QObject * ()
 
 operator QWidget * ()
 
RibbonArea ribbonArea () const
 
 SectionWidget (ContainerWidgetBase *parent, RibbonArea ribbon_area)
 
void setAnimationProgress (double width)
 
void setCurrentIndex (uint04 index, bool animate)
 
void setMinimizeAllowed (bool allowed)
 
void setRibbonArea (RibbonArea area)
 
void setTabLock (bool tab_lock)
 
void setTabVisible (bool visible)
 
void setupAsBoxWidget (bool is_box_widget)
 
bool showTabs () const
 
QSize sizeHint () const override
 
void swapIndices (uint04 from, uint04 to) override
 
SectionWidgetTabsScrollAreatabScrollArea ()
 
bool takeContent (SectionContent *data)
 
bool takeContent (uint04 index)
 
QRect titleAreaGeometry () const
 
UUID uid () const
 
void updateLayout (QBoxLayout *layout)
 
virtual ~SectionWidget ()
 
- Public Member Functions inherited from QCustomStackedWidgetBase
void setAnimation (enum QEasingCurve::Type animationtype)
 
void setCustomPixmap (QPixmap *pixmap)
 
void setSpeed (int speed)
 
void setVerticalMode (bool vertical=true)
 
void setWrap (bool wrap)
 

Protected Member Functions

bool event (QEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
virtual void showEvent (QShowEvent *) override
 
- Protected Member Functions inherited from QCustomStackedWidgetBase
uint04 activeIndex () const
 
QWidget * activeWidget () const
 
virtual uint04 addWidget (QWidget *w)
 
double animationPercent () const
 
uint04 count () const
 
uint04 currentIndex () const
 
QWidget * currentWidget () const
 
bool eventFilter (QObject *object, QEvent *event) override
 
uint04 indexOf (QWidget *widget) const
 
void insertWidget (uint04 index, QWidget *w)
 
QSize minimumSizeHint () const override
 
void paintEvent (QPaintEvent *) override
 
 QCustomStackedWidgetBase (QWidget *parent=nullptr)
 
void removeWidget (QWidget *widget)
 
void removeWidget (QWidget *widget, QWidget *slide_to_if_active)
 
void resizeEvent (QResizeEvent *event) override
 
void setAnimationPercent (double animation_percent)
 
virtual void setCurrentIdx (uint04 current_index)
 
void showEvent (QShowEvent *event) override
 
QSize sizeHint () const override
 
virtual void slideInAnimation (enum StackAnimationDirection direction=e_automatic, bool cache_in_image=false)
 
virtual void slideInAnimation (PopupInfo origin_rect, enum StackAnimationDirection direction=e_automatic, bool cache_in_image=false)
 
virtual void slideInIdx (uint04 idx, enum StackAnimationDirection direction)
 
virtual void slideInIdx (uint04 idx, int delay_time=0, enum StackAnimationDirection direction=e_automatic)
 
virtual void slideInIdx (uint04 idx, PopupInfo origin_rect, int delay_time=0, enum StackAnimationDirection direction=e_automatic)
 
virtual void slideInNext ()
 
virtual void slideInPrev ()
 
virtual void slideInWgt (QWidget *widget, enum StackAnimationDirection direction=e_automatic, bool force_slide=false)
 
QWidget * widget (uint04 index) const
 
virtual ~QCustomStackedWidgetBase ()
 

Properties

double animation_progress
 
- Properties inherited from QCustomStackedWidgetBase
double animation_percent
 

Additional Inherited Members

- Public Types inherited from QCustomStackedWidgetBase
enum  StackAnimationDirection {
  e_left_to_right , e_right_to_left , e_top_to_bottom , e_bottom_to_top ,
  e_automatic
}
 
- Static Public Attributes inherited from QCustomStackedWidgetBase
static ApplicationOption< sint04default_stack_animation_speed
 
- Protected Slots inherited from QCustomStackedWidgetBase
void animationDoneSlot ()
 
void childDestroyedSlot (QObject *widget)
 
- Protected Attributes inherited from QCustomStackedWidgetBase
double m_animation_percent
 
enum QEasingCurve::Type m_animationtype
 
Buffer< QWidget * > m_child_widgets
 
uint04 m_current_index
 
bool m_is_animating
 
uint04 m_last
 
int m_last_animation_time
 
QPointer< QPropertyAnimation > m_move_animation
 
uint04 m_next
 
uint04 m_now
 
QPoint m_offset
 
PopupInfo m_popup_info
 
int m_speed
 
bool m_vertical
 
bool m_wrap = false
 

Detailed Description

SectionWidget manages multiple instances of SectionContent. It displays a title TAB, which is clickable and will switch to the contents associated to the title when clicked.


Constructor & Destructor Documentation

◆ SectionWidget()

SectionWidget ( ContainerWidgetBase * parent,
RibbonArea ribbon_area )
explicit

◆ ~SectionWidget()

virtual ~SectionWidget ( )
virtual

Member Function Documentation

◆ activeIndex()

uint04 activeIndex ( ) const

◆ addContent() [1/2]

void addContent ( SectionContent * c)

◆ addContent() [2/2]

void addContent ( SectionContent * data,
bool animate )

◆ containerWidget()

ContainerWidgetBase * containerWidget ( ) const

◆ contentCount()

uint04 contentCount ( ) const

◆ contents()

const Buffer< SectionContent * > & contents ( ) const
inline

◆ currentIndex()

uint04 currentIndex ( ) const

◆ event()

bool event ( QEvent * event)
overrideprotected

◆ finishAnimation()

void finishAnimation ( )

◆ hasVisibleTab()

bool hasVisibleTab ( ) const

◆ hideCurrentSection()

void hideCurrentSection ( )

◆ indexOf()

uint04 indexOf ( SectionContent * c)

◆ indexOfContent()

uint04 indexOfContent ( SectionContent * c) const

◆ indexOfContentByTitlePos()

uint04 indexOfContentByTitlePos ( const QPoint & pos,
QWidget * exclude = nullptr ) const

◆ indexOfContentByUid()

uint04 indexOfContentByUid ( UUID uid) const

◆ insertContent()

void insertContent ( uint04 index,
SectionContent * data,
bool animate )

◆ isLayoutVertical()

bool isLayoutVertical ( ) const

◆ isRibbonHorizontal()

bool isRibbonHorizontal ( ) const

◆ isRibbonLayoutHorizontal()

bool isRibbonLayoutHorizontal ( ) const

◆ minimizeAllowed()

bool minimizeAllowed ( )

◆ minimumSizeHint()

QSize minimumSizeHint ( ) const
override

◆ moveContent()

void moveContent ( uint04 from,
uint04 to )
overridevirtual

Reimplemented from QCustomStackedWidgetBase.

◆ operator const QObject *()

operator const QObject * ( ) const
inlineexplicit

◆ operator const QWidget *()

operator const QWidget * ( ) const
inlineexplicit

◆ operator QObject *()

operator QObject * ( )
inlineexplicit

◆ operator QWidget *()

operator QWidget * ( )
inlineexplicit

◆ resizeEvent()

void resizeEvent ( QResizeEvent * event)
overrideprotected

◆ ribbonArea()

RibbonArea ribbonArea ( ) const
inline

◆ ribbonLocationChangedSignal

void ribbonLocationChangedSignal ( RibbonArea area)
signal

◆ setAnimationProgress()

void setAnimationProgress ( double width)

◆ setCurrentIndex()

void setCurrentIndex ( uint04 index,
bool animate )

◆ setMinimizeAllowed()

void setMinimizeAllowed ( bool allowed)

◆ setRibbonArea()

void setRibbonArea ( RibbonArea area)

◆ setTabLock()

void setTabLock ( bool tab_lock)

◆ setTabVisible()

void setTabVisible ( bool visible)

◆ setupAsBoxWidget()

void setupAsBoxWidget ( bool is_box_widget)

◆ showEvent()

virtual void showEvent ( QShowEvent * )
overrideprotectedvirtual

◆ showTabs()

bool showTabs ( ) const
inline

◆ sizeHint()

QSize sizeHint ( ) const
override

◆ swapIndices()

void swapIndices ( uint04 from,
uint04 to )
overridevirtual

Reimplemented from QCustomStackedWidgetBase.

◆ tabChangedSignal

void tabChangedSignal ( uint04 idx)
signal

◆ tabScrollArea()

SectionWidgetTabsScrollArea * tabScrollArea ( )
inline

◆ takeContent() [1/2]

bool takeContent ( SectionContent * data)

◆ takeContent() [2/2]

bool takeContent ( uint04 index)

◆ titleAreaGeometry()

QRect titleAreaGeometry ( ) const

◆ uid()

UUID uid ( ) const

◆ updateLayout()

void updateLayout ( QBoxLayout * layout)

◆ updateTabs

void updateTabs ( )
slot

◆ userChangedCurrentTabSignal

void userChangedCurrentTabSignal ( uint04 idx)
signal

Property Documentation

◆ animation_progress

double animation_progress
readwrite

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