##// END OF EJS Templates
Inits gradient combobox
Alexandre Leroux -
r1046:b02b27914540
parent child
Show More
@@ -2,10 +2,33
2
2
3 #include "ui_ColorScaleEditor.h"
3 #include "ui_ColorScaleEditor.h"
4
4
5 namespace {
6
7 const auto GRADIENTS = QVariantMap{{"Candy", QCPColorGradient::gpCandy},
8 {"Cold", QCPColorGradient::gpCold},
9 {"Geography", QCPColorGradient::gpGeography},
10 {"Grayscale", QCPColorGradient::gpGrayscale},
11 {"Hot", QCPColorGradient::gpHot},
12 {"Hues", QCPColorGradient::gpHues},
13 {"Ion", QCPColorGradient::gpIon},
14 {"Jet", QCPColorGradient::gpJet},
15 {"Night", QCPColorGradient::gpNight},
16 {"Polar", QCPColorGradient::gpPolar},
17 {"Spectrum", QCPColorGradient::gpSpectrum},
18 {"Thermal", QCPColorGradient::gpThermal}};
19
20 } // namespace
21
5 ColorScaleEditor::ColorScaleEditor(QWidget *parent)
22 ColorScaleEditor::ColorScaleEditor(QWidget *parent)
6 : QDialog{parent}, ui{new Ui::ColorScaleEditor}, m_ThresholdGroup{new QButtonGroup{this}}
23 : QDialog{parent}, ui{new Ui::ColorScaleEditor}, m_ThresholdGroup{new QButtonGroup{this}}
7 {
24 {
8 ui->setupUi(this);
25 ui->setupUi(this);
26
27 // Inits gradient combobox content
28 for (auto it = GRADIENTS.begin(), end = GRADIENTS.end(); it != end; ++it) {
29 ui->gradientComboBox->addItem(it.key(), it.value());
30 }
31
9 // Creates threshold group
32 // Creates threshold group
10 m_ThresholdGroup->addButton(ui->thresholdAutoButton);
33 m_ThresholdGroup->addButton(ui->thresholdAutoButton);
11 m_ThresholdGroup->addButton(ui->thresholdManualButton);
34 m_ThresholdGroup->addButton(ui->thresholdManualButton);
General Comments 0
You need to be logged in to leave comments. Login now