change labels when toggling between scale and absolute value.
This commit is contained in:
parent
86e1544c0e
commit
0882d2c854
@ -81,11 +81,28 @@ PModSelect::PModSelect(QWidget *parent) :
|
||||
|
||||
setLayout(main);
|
||||
|
||||
connect(fAbsVal, SIGNAL(stateChanged(int)), this, SLOT(absoluteValueStateChanged(int)));
|
||||
connect(fScaleAutomatic, SIGNAL(pressed()), this, SLOT(scaleAuto()));
|
||||
connect(fScaleByFactor, SIGNAL(pressed()), this, SLOT(getFactor()));
|
||||
connect(fCancel, SIGNAL(pressed()), this, SLOT(reject()));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PModSelect::absoluteValueStateChanged
|
||||
* @param ival
|
||||
*/
|
||||
void PModSelect::absoluteValueStateChanged(int ival)
|
||||
{
|
||||
if (ival == Qt::Unchecked) {
|
||||
fFactorLabel->setText("Factor");
|
||||
fScaleByFactor->setText("Scale by &Factor");
|
||||
} else if (ival == Qt::Checked) {
|
||||
fFactorLabel->setText("Value");
|
||||
fScaleByFactor->setText("Set Abs. Value");
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
|
@ -60,6 +60,7 @@ class PModSelect : public QDialog
|
||||
void scale(bool automatic, double factor, bool absVal);
|
||||
|
||||
private slots:
|
||||
void absoluteValueStateChanged(int);
|
||||
void scaleAuto();
|
||||
void getFactor();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user