summaryrefslogtreecommitdiffstats
path: root/kolourpaint/tools/kptoolresizescale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/tools/kptoolresizescale.cpp')
-rw-r--r--kolourpaint/tools/kptoolresizescale.cpp81
1 files changed, 32 insertions, 49 deletions
diff --git a/kolourpaint/tools/kptoolresizescale.cpp b/kolourpaint/tools/kptoolresizescale.cpp
index 3ced0735..f9a4c461 100644
--- a/kolourpaint/tools/kptoolresizescale.cpp
+++ b/kolourpaint/tools/kptoolresizescale.cpp
@@ -497,7 +497,7 @@ void kpToolResizeScaleCommand::unexecute ()
// private static
kpToolResizeScaleCommand::Type kpToolResizeScaleDialog::s_lastType =
- kpToolResizeScaleCommand::Resize;
+ kpToolResizeScaleCommand::SmoothScale;
// private static
double kpToolResizeScaleDialog::s_lastPercentWidth = 100,
@@ -591,8 +591,8 @@ void kpToolResizeScaleDialog::createActOnBox (TQWidget *baseWidget)
m_actOnBox->setStretchFactor (m_actOnCombo, 1);
- connect (m_actOnCombo, TQT_SIGNAL (activated (int)),
- this, TQT_SLOT (slotActOnChanged ()));
+ connect (m_actOnCombo, TQ_SIGNAL (activated (int)),
+ this, TQ_SLOT (slotActOnChanged ()));
}
@@ -634,7 +634,7 @@ static void toolButtonSetLook (TQToolButton *button,
button->setUsesTextLabel (true);
button->setTextLabel (name, false/*no tooltip*/);
button->setAccel (TQAccel::shortcutKey (name));
- button->setFocusPolicy (TQ_StrongFocus);
+ button->setFocusPolicy (TQWidget::StrongFocus);
button->setToggleButton (true);
}
@@ -662,40 +662,28 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
"</ul>"
"</qt>"));
- // TODO: ALT+R doesn't select the button.
- m_resizeButton = new TQToolButton (m_operationGroupBox);
- toolButtonSetLook (m_resizeButton,
- TQString::fromLatin1 ("resize"),
- i18n ("&Resize"));
-
- m_scaleButton = new TQToolButton (m_operationGroupBox);
- toolButtonSetLook (m_scaleButton,
- TQString::fromLatin1 ("scale"),
- i18n ("&Scale"));
-
m_smoothScaleButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_smoothScaleButton,
TQString::fromLatin1 ("smooth_scale"),
i18n ("S&mooth Scale"));
+ m_scaleButton = new TQToolButton (m_operationGroupBox);
+ toolButtonSetLook (m_scaleButton,
+ TQString::fromLatin1 ("scale"),
+ i18n ("&Scale"));
- //m_resizeLabel = new TQLabel (i18n ("&Resize"), m_operationGroupBox);
- //m_scaleLabel = new TQLabel (i18n ("&Scale"), m_operationGroupBox);
- //m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox);
-
-
- //m_resizeLabel->setAlignment (m_resizeLabel->alignment () | TQt::ShowPrefix);
- //m_scaleLabel->setAlignment (m_scaleLabel->alignment () | TQt::ShowPrefix);
- //m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | TQt::ShowPrefix);
-
+ m_resizeButton = new TQToolButton (m_operationGroupBox);
+ toolButtonSetLook (m_resizeButton,
+ TQString::fromLatin1 ("resize"),
+ i18n ("&Resize"));
TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget);
resizeScaleButtonGroup->setExclusive (true);
resizeScaleButtonGroup->hide ();
- resizeScaleButtonGroup->insert (m_resizeButton);
- resizeScaleButtonGroup->insert (m_scaleButton);
resizeScaleButtonGroup->insert (m_smoothScaleButton);
+ resizeScaleButtonGroup->insert (m_scaleButton);
+ resizeScaleButtonGroup->insert (m_resizeButton);
TQGridLayout *operationLayout = new TQGridLayout (m_operationGroupBox,
@@ -703,22 +691,17 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
marginHint () * 2/*don't overlap groupbox title*/,
spacingHint ());
- operationLayout->addWidget (m_resizeButton, 0, 0, TQt::AlignCenter);
- //operationLayout->addWidget (m_resizeLabel, 1, 0, TQt::AlignCenter);
-
+ operationLayout->addWidget (m_smoothScaleButton, 0, 0, TQt::AlignCenter);
operationLayout->addWidget (m_scaleButton, 0, 1, TQt::AlignCenter);
- //operationLayout->addWidget (m_scaleLabel, 1, 1, TQt::AlignCenter);
-
- operationLayout->addWidget (m_smoothScaleButton, 0, 2, TQt::AlignCenter);
- //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, TQt::AlignCenter);
+ operationLayout->addWidget (m_resizeButton, 0, 2, TQt::AlignCenter);
- connect (m_resizeButton, TQT_SIGNAL (toggled (bool)),
- this, TQT_SLOT (slotTypeChanged ()));
- connect (m_scaleButton, TQT_SIGNAL (toggled (bool)),
- this, TQT_SLOT (slotTypeChanged ()));
- connect (m_smoothScaleButton, TQT_SIGNAL (toggled (bool)),
- this, TQT_SLOT (slotTypeChanged ()));
+ connect (m_resizeButton, TQ_SIGNAL (toggled (bool)),
+ this, TQ_SLOT (slotTypeChanged ()));
+ connect (m_scaleButton, TQ_SIGNAL (toggled (bool)),
+ this, TQ_SLOT (slotTypeChanged ()));
+ connect (m_smoothScaleButton, TQ_SIGNAL (toggled (bool)),
+ this, TQ_SLOT (slotTypeChanged ()));
}
// private
@@ -800,18 +783,18 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget)
dimensionsLayout->setRowSpacing (4/*row*/, dimensionsLayout->rowSpacing (4) * 2);
- connect (m_newWidthInput, TQT_SIGNAL (valueChanged (int)),
- this, TQT_SLOT (slotWidthChanged (int)));
- connect (m_newHeightInput, TQT_SIGNAL (valueChanged (int)),
- this, TQT_SLOT (slotHeightChanged (int)));
+ connect (m_newWidthInput, TQ_SIGNAL (valueChanged (int)),
+ this, TQ_SLOT (slotWidthChanged (int)));
+ connect (m_newHeightInput, TQ_SIGNAL (valueChanged (int)),
+ this, TQ_SLOT (slotHeightChanged (int)));
- connect (m_percentWidthInput, TQT_SIGNAL (valueChanged (double)),
- this, TQT_SLOT (slotPercentWidthChanged (double)));
- connect (m_percentHeightInput, TQT_SIGNAL (valueChanged (double)),
- this, TQT_SLOT (slotPercentHeightChanged (double)));
+ connect (m_percentWidthInput, TQ_SIGNAL (valueChanged (double)),
+ this, TQ_SLOT (slotPercentWidthChanged (double)));
+ connect (m_percentHeightInput, TQ_SIGNAL (valueChanged (double)),
+ this, TQ_SLOT (slotPercentHeightChanged (double)));
- connect (m_keepAspectRatioCheckBox, TQT_SIGNAL (toggled (bool)),
- this, TQT_SLOT (setKeepAspectRatio (bool)));
+ connect (m_keepAspectRatioCheckBox, TQ_SIGNAL (toggled (bool)),
+ this, TQ_SLOT (setKeepAspectRatio (bool)));
}