ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvExpanderButton Class Reference

cvExpanderButton provides a frame with a toggle mode for collapsible sections. More...

#include <cvExpanderButton.h>

Inheritance diagram for cvExpanderButton:
Collaboration diagram for cvExpanderButton:

Public Slots

void toggle ()
 Toggles the state of the checkable button. More...
 
void setChecked (bool checked)
 This property holds whether the button is checked. By default, the button is unchecked (collapsed). More...
 
bool checked () const
 
void setText (const QString &text)
 This property holds the text shown on the button. More...
 
QString text () const
 

Signals

void toggled (bool checked)
 This signal is emitted whenever the button changes its state. More...
 

Public Member Functions

 cvExpanderButton (QWidget *parent=nullptr)
 
 ~cvExpanderButton () override
 

Protected Member Functions

void mousePressEvent (QMouseEvent *evt) override
 
void mouseReleaseEvent (QMouseEvent *evt) override
 

Properties

QString text
 
bool checked
 

Detailed Description

cvExpanderButton provides a frame with a toggle mode for collapsible sections.

This widget is based on ParaView's pqExpanderButton and is used to simulate a toggle button for expanding/collapsing frames in an accordion style.

When checked (expanded), it shows a minus icon (-). When unchecked (collapsed), it shows a plus icon (+).

Definition at line 27 of file cvExpanderButton.h.

Constructor & Destructor Documentation

◆ cvExpanderButton()

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

Definition at line 14 of file cvExpanderButton.cpp.

◆ ~cvExpanderButton()

cvExpanderButton::~cvExpanderButton ( )
overridedefault

Member Function Documentation

◆ checked

bool cvExpanderButton::checked ( ) const
inlineslot

Definition at line 48 of file cvExpanderButton.h.

◆ mousePressEvent()

void cvExpanderButton::mousePressEvent ( QMouseEvent *  evt)
overrideprotected

Definition at line 106 of file cvExpanderButton.cpp.

◆ mouseReleaseEvent()

void cvExpanderButton::mouseReleaseEvent ( QMouseEvent *  evt)
overrideprotected

Definition at line 113 of file cvExpanderButton.cpp.

References toggle().

◆ setChecked

void cvExpanderButton::setChecked ( bool  checked)
slot

This property holds whether the button is checked. By default, the button is unchecked (collapsed).

Definition at line 83 of file cvExpanderButton.cpp.

References checked, and toggled().

Referenced by toggle().

◆ setText

void cvExpanderButton::setText ( const QString &  text)
slot

This property holds the text shown on the button.

Definition at line 94 of file cvExpanderButton.cpp.

References text.

◆ text

QString cvExpanderButton::text ( ) const
slot

Definition at line 101 of file cvExpanderButton.cpp.

◆ toggle

void cvExpanderButton::toggle ( )
slot

Toggles the state of the checkable button.

Definition at line 80 of file cvExpanderButton.cpp.

References setChecked().

Referenced by mouseReleaseEvent().

◆ toggled

void cvExpanderButton::toggled ( bool  checked)
signal

This signal is emitted whenever the button changes its state.

Parameters
checkedtrue if the button is checked (expanded), false if unchecked (collapsed).

Referenced by setChecked().

Property Documentation

◆ checked

bool cvExpanderButton::checked
readwrite

Definition at line 1 of file cvExpanderButton.h.

Referenced by setChecked().

◆ text

QString cvExpanderButton::text
readwrite

Definition at line 1 of file cvExpanderButton.h.

Referenced by setText().


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