Signals | Public Member Functions | List of all members
pqScaleByButton Class Reference

Custom QToolButton that adds a menu to key user scale by a factor. More...

#include <pqScaleByButton.h>

Inherits QToolButton.

Signals

void scale (double factor)
 Fired when the action corresponding to a scale factor is triggered. More...
 

Public Member Functions

 pqScaleByButton (QWidget *parent=nullptr)
 Creates the button with default scale factors or 0.5X and 2.0X. More...
 
 pqScaleByButton (const QList< double > &scaleFactors, const QString &suffix="X", QWidget *parent=nullptr)
 Creates the button with specified scale factors. More...
 
 pqScaleByButton (const QMap< double, QString > &scaleFactorsAndLabels, QWidget *parent=nullptr)
 Creates the button with specified scale factors and labels. More...
 
 ~pqScaleByButton () override
 

Detailed Description

Custom QToolButton that adds a menu to key user scale by a factor.

This is simply a QToolButton with a menu. The menu has actions which correspond to scale factors. When user clicks any of those actions, pqScaleByButton::scale signal is fired with the argument as the factor.

Definition at line 19 of file pqScaleByButton.h.

Constructor & Destructor Documentation

◆ pqScaleByButton() [1/3]

pqScaleByButton::pqScaleByButton ( QWidget *  parent = nullptr)

Creates the button with default scale factors or 0.5X and 2.0X.

◆ pqScaleByButton() [2/3]

pqScaleByButton::pqScaleByButton ( const QList< double > &  scaleFactors,
const QString &  suffix = "X",
QWidget *  parent = nullptr 
)

Creates the button with specified scale factors.

The label for the actions is created by use the suffix specified.

◆ pqScaleByButton() [3/3]

pqScaleByButton::pqScaleByButton ( const QMap< double, QString > &  scaleFactorsAndLabels,
QWidget *  parent = nullptr 
)

Creates the button with specified scale factors and labels.

◆ ~pqScaleByButton()

pqScaleByButton::~pqScaleByButton ( )
override

Member Function Documentation

◆ scale

void pqScaleByButton::scale ( double  factor)
signal

Fired when the action corresponding to a scale factor is triggered.


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