1 #include "NomenclatureToolConfigDialog.h"
5 #include "FeatureNomenclatureTool.h"
18 QVBoxLayout *mainLayout =
new QVBoxLayout;
19 setLayout(mainLayout);
22 mainLayout->addWidget(settingsAreaWidget);
25 mainLayout->addWidget(buttonsAreaWidget);
27 QGridLayout *settingsAreaLayout =
new QGridLayout;
28 settingsAreaWidget->setLayout(settingsAreaLayout);
32 QLabel *fontSizeLabel =
new QLabel(
"Font Size");
33 settingsAreaLayout->addWidget(fontSizeLabel, row, 0);
36 for (
int i = 8; i <= 20; i++) {
42 QLabel *fontColorLabel =
new QLabel(
"Font Color");
43 settingsAreaLayout->addWidget(fontColorLabel, row, 0);
51 QLabel *showVectorsLabel =
new QLabel(
"Show feature extents");
52 settingsAreaLayout->addWidget(showVectorsLabel, row, 0);
64 QLabel *showApprovedLabel =
new QLabel(
"Show IAU approved only");
65 settingsAreaLayout->addWidget(showApprovedLabel, row, 0);
71 QLabel *defaultOnLabel =
new QLabel(
72 "Enabled when " + QCoreApplication::instance()->applicationName() +
74 settingsAreaLayout->addWidget(defaultOnLabel, row, 0);
81 QHBoxLayout *buttonsAreaLayout =
new QHBoxLayout;
82 buttonsAreaWidget->setLayout(buttonsAreaLayout);
84 buttonsAreaLayout->addStretch();
86 QPushButton *okayButton =
new QPushButton(
"&Ok");
87 okayButton->setIcon(QIcon::fromTheme(
"dialog-ok"));
88 buttonsAreaLayout->addWidget(okayButton);
89 connect(okayButton, SIGNAL(clicked()),
91 connect(okayButton, SIGNAL(clicked()),
92 this, SLOT(accept()));
94 QPushButton *applyButton =
new QPushButton(
"&Apply");
95 applyButton->setIcon(QIcon::fromTheme(
"dialog-ok-apply"));
96 buttonsAreaLayout->addWidget(applyButton);
97 connect(applyButton, SIGNAL(clicked()),
100 QPushButton *cancelButton =
new QPushButton(
"&Cancel");
101 cancelButton->setIcon(QIcon::fromTheme(
"dialog-cancel"));
102 buttonsAreaLayout->addWidget(cancelButton);
103 connect(cancelButton, SIGNAL(clicked()),
104 this, SLOT(reject()));
145 QPalette colorPalette;
164 QColor newColor = QColorDialog::getColor(
165 colorPalette.color(QPalette::Button),
this);
167 if(newColor.isValid()) {
168 colorPalette.setColor(QPalette::Button, newColor);