21 #include "ui_colorrangedialog.h" 33 ui->minDoubleSpinBox->setValue(0);
34 ui->maxDoubleSpinBox->setValue(1000);
39 ui->gradientComboBox->addItems(gradient_names);
44 ui->minDoubleSpinBox->setValue(lower);
45 ui->maxDoubleSpinBox->setValue(upper);
50 ui->nameLineEdit->setText(name);
51 ui->nameLineEdit->setEnabled(editable);
52 ui->nameLabel->setEnabled(editable);
60 void ColorRangeDialog::on_buttonBox_accepted()
62 double lower = ui->minDoubleSpinBox->value();
63 double upper = ui->maxDoubleSpinBox->value();
64 QString name = ui->nameLineEdit->text();
65 QString gradient_key = ui->gradientComboBox->currentText();
67 QMessageBox::warning(
this,
"Range Invalid",
68 "The range entered is not valid",
73 parent_->
AddGradient(name, gradient_key, lower, upper);
77 void ColorRangeDialog::on_buttonBox_rejected()
void AddGradient(QString name, QString gradient_key, double lower, double upper)
void SetGradientNames(QStringList gradient_names)
VESPUCCI_EXPORT arma::uword max(arma::uword a, arma::uword b)
Vespucci::Math::max.
void SetRange(double lower, double upper)
void SetName(QString name, bool editable)
VESPUCCI_EXPORT arma::uword min(arma::uword a, arma::uword b)
Vespucci::Math::min.
ColorRangeDialog(GlobalGradientDialog *parent=0)