276 m_d->ui =
new Ui_KisToolKnifeOptionsWidget();
277 m_d->ui->setupUi(
this);
279 m_d->toolId = toolId;
280 m_d->resolution = resolution;
286 m_d->buttonModeAddGutter =
m_d->ui->optionButtonStripToolMode->addButton(
288 m_d->buttonModeRemoveGutter =
m_d->ui->optionButtonStripToolMode->addButton(
293 m_d->buttonModeAddGutter->setChecked(
true);
294 m_d->buttonModeAddGutter->setMinimumSize(QSize(20, 20));
295 m_d->buttonModeRemoveGutter->setMinimumSize(QSize(20, 20));
296 m_d->buttonModeAddGutter->setIconSize(QSize(16, 16));
297 m_d->buttonModeRemoveGutter->setIconSize(QSize(16, 16));
299 m_d->buttonModeAddGutter->setToolTip(i18nc(
"Tooltip for the button in the Knife Tool for the mode to add gutters/cut through shapes",
"Cutting mode: Cuts through shapes to create gutters of specified width."));
300 m_d->buttonModeRemoveGutter->setToolTip(i18nc(
"Tooltip for the button in the Knife Tool for the mode to remove gutters/merge shapes",
"Merging mode: Removes the gutter between shapes."));
306 m_d->ui->unitsCombobox->addItem(i18n(
"Pixels"), QVariant(
"px"));
307 m_d->ui->unitsCombobox->addItem(i18n(
"Millimeters"), QVariant(
"mm"));
309 m_d->ui->automaticHorizontalCombobox->addItem(i18nc(
"Thick type of gutter (in comics); keep consistent with the label in the GUI",
"Thick"), QVariant(
KisToolKnifeOptionsWidget::Thick));
310 m_d->ui->automaticHorizontalCombobox->addItem(i18nc(
"Thin type of gutter (in comics); keep consistent with the label in the GUI",
"Thin"), QVariant(
KisToolKnifeOptionsWidget::Thin));
311 m_d->ui->automaticHorizontalCombobox->addItem(i18nc(
"Special type of gutter (in comics); keep consistent with the label in the GUI",
"Special"), QVariant(
KisToolKnifeOptionsWidget::Special));
314 m_d->ui->automaticVerticalCombobox->addItem(i18nc(
"Thick type of gutter (in comics); keep consistent with the label in the GUI",
"Thick"), QVariant(
KisToolKnifeOptionsWidget::Thick));
315 m_d->ui->automaticVerticalCombobox->addItem(i18nc(
"Thin type of gutter (in comics); keep consistent with the label in the GUI",
"Thin"), QVariant(
KisToolKnifeOptionsWidget::Thin));
316 m_d->ui->automaticVerticalCombobox->addItem(i18nc(
"Special type of gutter (in comics); keep consistent with the label in the GUI",
"Special"), QVariant(
KisToolKnifeOptionsWidget::Special));
319 m_d->ui->automaticDiagonalCombobox->addItem(i18nc(
"Thick type of gutter (in comics); keep consistent with the label in the GUI",
"Thick"), QVariant(
KisToolKnifeOptionsWidget::Thick));
320 m_d->ui->automaticDiagonalCombobox->addItem(i18nc(
"Thin type of gutter (in comics); keep consistent with the label in the GUI",
"Thin"), QVariant(
KisToolKnifeOptionsWidget::Thin));
321 m_d->ui->automaticDiagonalCombobox->addItem(i18nc(
"Special type of gutter (in comics); keep consistent with the label in the GUI",
"Special"), QVariant(
KisToolKnifeOptionsWidget::Special));
324 m_d->readFromConfig(toolId);
328 connect(
m_d->buttonModeAddGutter, SIGNAL(clicked()),
this, SLOT(
modeChanged()));
329 connect(
m_d->buttonModeRemoveGutter, SIGNAL(clicked()),
this, SLOT(
modeChanged()));
399 m_d->ui->automaticDiagonalCombobox->setEnabled(
false);
400 m_d->ui->automaticVerticalCombobox->setEnabled(
false);
401 m_d->ui->automaticHorizontalCombobox->setEnabled(
false);
402 m_d->ui->gutterWidthAngleSpinBox->setEnabled(
false);
403 m_d->ui->angleLabel->setEnabled(
false);
404 m_d->ui->horizontalLabel->setEnabled(
false);
405 m_d->ui->verticalLabel->setEnabled(
false);
406 m_d->ui->diagonalLabel->setEnabled(
false);
410 m_d->ui->automaticDiagonalCombobox->setEnabled(
true);
411 m_d->ui->automaticVerticalCombobox->setEnabled(
true);
412 m_d->ui->automaticHorizontalCombobox->setEnabled(
true);
413 m_d->ui->gutterWidthAngleSpinBox->setEnabled(
true);
414 m_d->ui->horizontalLabel->setEnabled(
true);
415 m_d->ui->verticalLabel->setEnabled(
true);
416 m_d->ui->diagonalLabel->setEnabled(
true);
417 m_d->ui->angleLabel->setEnabled(
true);