CCIMXDesktop
 
Loading...
Searching...
No Matches
SideBarWidget Class Reference

A custom widget that implements a slide-in/slide-out sidebar with animation. More...

#include <SideBarWidget.h>

Inheritance diagram for SideBarWidget:

Public Types

enum class  Role {
  SideBar , MainSide , SideBar , MainSide ,
  SideBar , MainSide
}
 Defines which layout role to apply widgets to.
 
enum class  Role {
  SideBar , MainSide , SideBar , MainSide ,
  SideBar , MainSide
}
 Defines which layout role to apply widgets to.
 
enum class  Role {
  SideBar , MainSide , SideBar , MainSide ,
  SideBar , MainSide
}
 Defines which layout role to apply widgets to.
 

Public Slots

void switch_state ()
 Toggles the sidebar state between visible and hidden.
 
void switch_state ()
 Toggles the sidebar state between visible and hidden.
 
void switch_state ()
 Toggles the sidebar state between visible and hidden.
 
void switch_button_visible ()
 Toggles the button visibility.
 

Public Member Functions

 SideBarWidget (QWidget *parent=nullptr)
 Constructor to initialize the sidebar widget.
 
 ~SideBarWidget ()
 Destructor to release resources.
 
void showSideBar ()
 Shows the sidebar using animation.
 
void hideSideBar ()
 Hides the sidebar using animation.
 
void addLayout (const QWidgetList &widgetList, Role r)
 Adds widgets to either the sidebar or the main side layout.
 
void removeLayout (Role r)
 Removes all widgets from the specified layout role.
 
void setAnimationDuration (int duration)
 Sets the animation duration.
 
void setAnimationCurve (QEasingCurve::Type curve)
 Sets the easing curve type for the animation.
 
bool current_ui_states ()
 Returns the current state of sidebar visibility.
 
 SideBarWidget (QWidget *parent=nullptr)
 Constructor to initialize the sidebar widget.
 
 ~SideBarWidget ()
 Destructor to release resources.
 
void showSideBar ()
 Shows the sidebar using animation.
 
void hideSideBar ()
 Hides the sidebar using animation.
 
void addLayout (const QWidgetList &widgetList, Role r)
 Adds widgets to either the sidebar or the main side layout.
 
void removeLayout (Role r)
 Removes all widgets from the specified layout role.
 
void setAnimationDuration (int duration)
 Sets the animation duration.
 
void setAnimationCurve (QEasingCurve::Type curve)
 Sets the easing curve type for the animation.
 
bool current_ui_states ()
 Returns the current state of sidebar visibility.
 
 SideBarWidget (QWidget *parent=nullptr)
 Constructor to initialize the sidebar widget.
 
 ~SideBarWidget ()
 Destructor to release resources.
 
void showSideBar ()
 Shows the sidebar using animation.
 
void hideSideBar ()
 Hides the sidebar using animation.
 
void addLayout (const QWidgetList &widgetList, Role r)
 Adds widgets to either the sidebar or the main side layout.
 
void removeLayout (Role r)
 Removes all widgets from the specified layout role.
 
void setButtonVisible (bool visible)
 Sets the visibility of the control button.
 
void setAnimationDuration (int duration)
 Sets the animation duration.
 
void setAnimationCurve (QEasingCurve::Type curve)
 Sets the easing curve type for the animation.
 
bool current_ui_states ()
 Returns the current state of sidebar visibility.
 

Protected Member Functions

void resizeEvent (QResizeEvent *)
 resizeEvent
 
void resizeEvent (QResizeEvent *)
 resizeEvent
 

Detailed Description

A custom widget that implements a slide-in/slide-out sidebar with animation.

Constructor & Destructor Documentation

◆ SideBarWidget() [1/3]

SideBarWidget::SideBarWidget ( QWidget *  parent = nullptr)
explicit

Constructor to initialize the sidebar widget.

Parameters
parentOptional parent widget.

◆ SideBarWidget() [2/3]

SideBarWidget::SideBarWidget ( QWidget *  parent = nullptr)
explicit

Constructor to initialize the sidebar widget.

Parameters
parentOptional parent widget.

◆ SideBarWidget() [3/3]

SideBarWidget::SideBarWidget ( QWidget *  parent = nullptr)
explicit

Constructor to initialize the sidebar widget.

Parameters
parentOptional parent widget.

Member Function Documentation

◆ addLayout() [1/3]

void SideBarWidget::addLayout ( const QWidgetList &  widgetList,
Role  r 
)

Adds widgets to either the sidebar or the main side layout.

Parameters
widgetListThe list of widgets to add.
rThe role indicating target layout.

◆ addLayout() [2/3]

void SideBarWidget::addLayout ( const QWidgetList &  widgetList,
Role  r 
)

Adds widgets to either the sidebar or the main side layout.

Parameters
widgetListThe list of widgets to add.
rThe role indicating target layout.

◆ addLayout() [3/3]

void SideBarWidget::addLayout ( const QWidgetList &  widgetList,
Role  r 
)

Adds widgets to either the sidebar or the main side layout.

Parameters
widgetListThe list of widgets to add.
rThe role indicating target layout.

◆ current_ui_states() [1/3]

bool SideBarWidget::current_ui_states ( )
inline

Returns the current state of sidebar visibility.

Returns
True if hidden, false if visible.

◆ current_ui_states() [2/3]

bool SideBarWidget::current_ui_states ( )
inline

Returns the current state of sidebar visibility.

Returns
True if hidden, false if visible.

◆ current_ui_states() [3/3]

bool SideBarWidget::current_ui_states ( )
inline

Returns the current state of sidebar visibility.

Returns
True if hidden, false if visible.

◆ removeLayout() [1/3]

void SideBarWidget::removeLayout ( Role  r)

Removes all widgets from the specified layout role.

Parameters
rThe role indicating which layout to clear.

◆ removeLayout() [2/3]

void SideBarWidget::removeLayout ( Role  r)

Removes all widgets from the specified layout role.

Parameters
rThe role indicating which layout to clear.

◆ removeLayout() [3/3]

void SideBarWidget::removeLayout ( Role  r)

Removes all widgets from the specified layout role.

Parameters
rThe role indicating which layout to clear.

◆ setAnimationCurve() [1/3]

void SideBarWidget::setAnimationCurve ( QEasingCurve::Type  curve)

Sets the easing curve type for the animation.

Parameters
curveThe easing curve to use.

◆ setAnimationCurve() [2/3]

void SideBarWidget::setAnimationCurve ( QEasingCurve::Type  curve)

Sets the easing curve type for the animation.

Parameters
curveThe easing curve to use.

◆ setAnimationCurve() [3/3]

void SideBarWidget::setAnimationCurve ( QEasingCurve::Type  curve)

Sets the easing curve type for the animation.

Parameters
curveThe easing curve to use.

◆ setAnimationDuration() [1/3]

void SideBarWidget::setAnimationDuration ( int  duration)

Sets the animation duration.

Parameters
durationDuration in milliseconds.

◆ setAnimationDuration() [2/3]

void SideBarWidget::setAnimationDuration ( int  duration)

Sets the animation duration.

Parameters
durationDuration in milliseconds.

◆ setAnimationDuration() [3/3]

void SideBarWidget::setAnimationDuration ( int  duration)

Sets the animation duration.

Parameters
durationDuration in milliseconds.

◆ setButtonVisible()

void SideBarWidget::setButtonVisible ( bool  visible)

Sets the visibility of the control button.

Parameters
visibleWhether the button should be visible.

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