158 m_d->optionButtonStripMode->addButton(
160 m_d->optionButtonStripMode->button(0)->setChecked(
true);
165 m_d->optionButtonStripAction->addButton(
167 m_d->optionButtonStripAction->addButton(
169 m_d->optionButtonStripAction->addButton(
171 m_d->optionButtonStripAction->addButton(
173 m_d->optionButtonStripAction->button(0)->setChecked(
true);
175 m_d->checkBoxSelectionActionsPanel =
new QCheckBox(i18n(
"Enable Selection Actions Bar"));
176 m_d->checkBoxSelectionActionsPanel->setToolTip(
177 i18n(
"When enabled, any selections will produce a small floating panel of useful selection-related actions."));
182 m_d->checkBoxSelectionActionsPanel->setCheckState(Qt::CheckState::Checked);
184 m_d->checkBoxSelectionActionsPanel->setCheckState(Qt::CheckState::Unchecked);
187 m_d->checkBoxAntiAliasSelection =
new QCheckBox(
188 i18nc(
"The anti-alias checkbox in fill tool options",
"Anti-aliasing"));
191 m_d->sliderGrowSelection->setPrefix(
192 i18nc(
"The 'grow/shrink' spinbox prefix in selection tools options",
195 m_d->sliderGrowSelection->setSoftRange(-40, 40);
196 m_d->sliderGrowSelection->setSuffix(i18n(
" px"));
197 m_d->buttonStopGrowingAtDarkestPixel =
new QToolButton;
198 m_d->buttonStopGrowingAtDarkestPixel->setAutoRaise(
true);
199 m_d->buttonStopGrowingAtDarkestPixel->setCheckable(
true);
201 containerGrowSelection->
appendWidget(
"sliderGrowSelection",
m_d->sliderGrowSelection);
202 containerGrowSelection->
appendWidget(
"buttonStopGrowingAtDarkestPixel",
m_d->buttonStopGrowingAtDarkestPixel);
204 containerGrowSelection->
setWidgetVisible(
"buttonStopGrowingAtDarkestPixel",
false);
206 m_d->sliderFeatherSelection->setPrefix(
207 i18nc(
"The 'feather' spinbox prefix in selection tools options",
210 m_d->sliderFeatherSelection->setSoftRange(0, 40);
211 m_d->sliderFeatherSelection->setSuffix(i18n(
" px"));
216 m_d->optionButtonStripReference->addButton(
219 m_d->optionButtonStripReference->button(0)->setChecked(
true);
222 m_d->widgetLabels->setButtonSize(20);
223 m_d->widgetLabels->setButtonWrapEnabled(
true);
224 m_d->widgetLabels->setMouseDragEnabled(
true);
227 m_d->optionButtonStripMode->button(0)->setToolTip(
228 i18nc(
"@info:tooltip",
"Pixel Selection"));
229 m_d->optionButtonStripMode->button(1)->setToolTip(
230 i18nc(
"@info:tooltip",
"Vector Selection"));
232 m_d->optionButtonStripAction->button(0)->setToolTip(
233 i18nc(
"@info:tooltip",
"Replace"));
234 m_d->optionButtonStripAction->button(1)->setToolTip(
235 i18nc(
"@info:tooltip",
"Intersect"));
236 m_d->optionButtonStripAction->button(2)->setToolTip(
237 i18nc(
"@info:tooltip",
"Add"));
238 m_d->optionButtonStripAction->button(3)->setToolTip(
239 i18nc(
"@info:tooltip",
"Subtract"));
240 m_d->optionButtonStripAction->button(4)->setToolTip(
241 i18nc(
"@info:tooltip",
"Symmetric Difference"));
243 m_d->checkBoxAntiAliasSelection->setToolTip(
244 i18n(
"Smooths the edges of the selection"));
245 m_d->sliderGrowSelection->setToolTip(
246 i18n(
"Grow or shrink the selection by the set amount"));
247 m_d->buttonStopGrowingAtDarkestPixel->setToolTip(
248 i18n(
"Stop growing at the darkest and/or most opaque pixels"));
249 m_d->sliderFeatherSelection->setToolTip(
250 i18n(
"Blur the selection by the set amount"));
252 m_d->optionButtonStripReference->button(0)->setToolTip(
253 i18n(
"Select regions found from the active layer"));
254 m_d->optionButtonStripReference->button(1)->setToolTip(
255 i18n(
"Select regions found from the merging of all layers"));
256 m_d->optionButtonStripReference->button(2)->setToolTip(
257 i18n(
"Select regions found from the merging of layers with specific color labels"));
264 i18nc(
"The 'mode' section label in selection tools options",
271 i18nc(
"The 'action' section label in selection tools options",
278 i18nc(
"The 'reference' section label in selection tools options",
287 i18nc(
"The 'adjustments' section label in selection tools options",
289 sectionAdjustments->
appendWidget(
"checkBoxAntiAliasSelection",
290 m_d->checkBoxAntiAliasSelection);
291 sectionAdjustments->
appendWidget(
"containerGrowSelection", containerGrowSelection);
293 m_d->sliderFeatherSelection);
299 connect(
m_d->optionButtonStripMode,
301 [
this](
int i,
int c) {
302 m_d->on_optionButtonStripMode_buttonToggled(i, c);
304 connect(
m_d->optionButtonStripAction,
306 [
this](
int i,
int c) {
307 m_d->on_optionButtonStripAction_buttonToggled(i, c);
309 connect(
m_d->checkBoxAntiAliasSelection,
310 SIGNAL(toggled(
bool)),
312 connect(
m_d->sliderGrowSelection,
313 SIGNAL(valueChanged(
int)),
315 connect(
m_d->buttonStopGrowingAtDarkestPixel,
316 SIGNAL(toggled(
bool)),
318 connect(
m_d->sliderFeatherSelection,
319 SIGNAL(valueChanged(
int)),
321 connect(
m_d->optionButtonStripReference,
323 [
this](
int i,
int c) {
324 m_d->on_optionButtonStripReference_buttonToggled(i, c);
326 connect(
m_d->widgetLabels,
327 SIGNAL(selectionChanged()),
331 connect(
m_d->checkBoxSelectionActionsPanel,
332 SIGNAL(toggled(
bool)),