18 #include "ui_complexfactorgui.h" 26 ui->automatic->setChecked(
false);
36 return ui->module->value() / 100.0;
41 return ui->arg->value() * 1.0;
46 return ui->automatic->isChecked();
51 double modValue = value < -1.0 ? -1.0 : value > 1.0 ? 1.0 : value;
52 ui->module->setValue((
int) modValue*100.0f);
53 ui->moduleText->setText(tr(
"%1").
arg(modValue, 0,
'f', 2));
58 int argValue = (int) (value < -180.0 ? -180.0 : value > 180.0 ? 180.0 : value);
59 ui->arg->setValue(argValue);
60 ui->argText->setText(tr(
"%1").
arg(value));
65 ui->automatic->setChecked(automatic);
70 ui->automatic->setEnabled(enable);
75 ui->label->setText(text);
80 ui->label->setToolTip(text);
85 ui->module->setEnabled(!
set);
86 ui->arg->setEnabled(!
set);
92 ui->moduleText->setText(tr(
"%1").
arg(value/100.0f, 0,
'f', 2));
98 ui->argText->setText(tr(
"%1").
arg(value));
Ui::ComplexFactorGUI * ui
bool getAutomatic() const
void moduleChanged(double value)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setArgument(double value)
void setAutomatic(bool automatic)
void setLabel(const QString &text)
void setAutomaticEnable(bool enable)
ComplexFactorGUI(QWidget *parent=0)
void on_module_valueChanged(int value)
double getArgument() const
void on_automatic_toggled(bool set)
void setModule(double value)
void setToolTip(const QString &text)
void automaticChanged(bool value)
void on_arg_valueChanged(int value)
void argumentChanged(double value)