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 | |
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.
pqScaleByButton::pqScaleByButton | ( | QWidget * | parent = nullptr | ) |
Creates the button with default scale factors or 0.5X
and 2.0X
.
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::pqScaleByButton | ( | const QMap< double, QString > & | scaleFactorsAndLabels, |
QWidget * | parent = nullptr |
||
) |
Creates the button with specified scale factors and labels.
|
override |
|
signal |
Fired when the action corresponding to a scale factor is triggered.