25 , m_ui(new
Ui::WGConfigWidget)
26 , m_shadeLineGroup(new QButtonGroup(this))
35 m_ui->btnSelectorShape, SLOT(hidePopupWidget()));
96 cfg.setCustomSelectionColorSpace(
m_ui->wdgColorspace->currentColorSpace());
112 lineConfig.resize(
m_ui->sbShadeLineCount->value());
113 cfg.setShadeSelectorLines(lineConfig);
127 m_ui->sbCommonColorsPatchHeight->value() });
153 : cfg.colorSelectorConfiguration();
163 m_ui->wdgColorspace->setCurrentColorSpace(cfg.customSelectionColorSpace(defaults));
168 if (patchOrientation == Qt::Horizontal) {
169 m_ui->rbPopupHorizontal->setChecked(
true);
171 m_ui->rbPopupVertical->setChecked(
true);
174 m_ui->sbPatchWidth->setValue(colorPatchSize.width());
175 m_ui->sbPatchHeight->setValue(colorPatchSize.height());
194 if (patchOrientation == Qt::Horizontal) {
195 m_ui->rbHistoryHorizontal->setChecked(
true);
197 m_ui->rbHistoryVertical->setChecked(
true);
200 m_ui->sbHistoryPatchWidth->setValue(colorPatchSize.width());
201 m_ui->sbHistoryPatchHeight->setValue(colorPatchSize.height());
209 if (patchOrientation == Qt::Horizontal) {
210 m_ui->rbCommonColorsHorizontal->setChecked(
true);
212 m_ui->rbCommonColorsVertical->setChecked(
true);
215 m_ui->sbCommonColorsPatchWidth->setValue(colorPatchSize.width());
216 m_ui->sbCommonColorsPatchHeight->setValue(colorPatchSize.height());
306 QLayout* layout =
new QVBoxLayout(
this);
311 QDialogButtonBox* buttonBox =
new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults,
314 layout->addWidget(buttonBox);
316 connect(buttonBox, SIGNAL(accepted()),
m_widget, SLOT(savePreferences()));
317 connect(buttonBox, SIGNAL(accepted()),
this, SLOT(accept()));
318 connect(buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
319 connect(buttonBox->button(QDialogButtonBox::RestoreDefaults),
320 SIGNAL(clicked()),
m_widget, SLOT(loadDefaultPreferences()));