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:
[legend]
Collaboration diagram for cvExpanderButton:
[legend]

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 (+).

Constructor & Destructor Documentation

◆ cvExpanderButton()

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

◆ ~cvExpanderButton()

cvExpanderButton::~cvExpanderButton ( )
overridedefault

Member Function Documentation

◆ checked

bool cvExpanderButton::checked ( ) const
inlineslot

◆ mousePressEvent()

void cvExpanderButton::mousePressEvent ( QMouseEvent *  evt)
overrideprotected

◆ mouseReleaseEvent()

void cvExpanderButton::mouseReleaseEvent ( QMouseEvent *  evt)
overrideprotected

References toggle().

◆ setChecked

void cvExpanderButton::setChecked ( bool  checked)
slot

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

References checked, and toggled().

Referenced by toggle().

◆ setText

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

This property holds the text shown on the button.

References text.

◆ text

QString cvExpanderButton::text ( ) const
slot

◆ toggle

void cvExpanderButton::toggle ( )
slot

Toggles the state of the checkable button.

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

Referenced by setChecked().

◆ text

QString cvExpanderButton::text
readwrite

Referenced by setText().


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