Commit 8ee1df94 authored by Martin Koller's avatar Martin Koller

more KF5 changes

parent 35a5fdf0
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include <qpixmap.h> #include <qpixmap.h>
#include <qsize.h> #include <qsize.h>
#include <qtoolbutton.h> #include <qtoolbutton.h>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <kconfig.h> #include <kconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
...@@ -52,7 +54,6 @@ ...@@ -52,7 +54,6 @@
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocale.h> #include <klocale.h>
#include <knuminput.h>
#include <kpAbstractSelection.h> #include <kpAbstractSelection.h>
#include <kpDefs.h> #include <kpDefs.h>
...@@ -121,7 +122,7 @@ kpTransformResizeScaleDialog::kpTransformResizeScaleDialog ( ...@@ -121,7 +122,7 @@ kpTransformResizeScaleDialog::kpTransformResizeScaleDialog (
slotActOnChanged (); slotActOnChanged ();
m_newWidthInput->setEditFocus (); m_newWidthInput->setFocus ();
//enableButtonOk (!isNoOp ()); //enableButtonOk (!isNoOp ());
} }
...@@ -286,33 +287,33 @@ QGroupBox *kpTransformResizeScaleDialog::createDimensionsGroupBox(QWidget *baseW ...@@ -286,33 +287,33 @@ QGroupBox *kpTransformResizeScaleDialog::createDimensionsGroupBox(QWidget *baseW
heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter); heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter);
QLabel *originalLabel = new QLabel (i18n ("Original:"), dimensionsGroupBox); QLabel *originalLabel = new QLabel (i18n ("Original:"), dimensionsGroupBox);
m_originalWidthInput = new KIntNumInput ( m_originalWidthInput = new QSpinBox;
document ()->width ((bool) selection ()), m_originalWidthInput->setValue(document()->width((bool)selection()));
dimensionsGroupBox);
QLabel *xLabel0 = new QLabel (i18n ("x"), dimensionsGroupBox); QLabel *xLabel0 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_originalHeightInput = new KIntNumInput ( m_originalHeightInput = new QSpinBox;
document ()->height ((bool) selection ()), m_originalHeightInput->setValue(document()->height((bool)selection()));
dimensionsGroupBox);
QLabel *newLabel = new QLabel (i18n ("&New:"), dimensionsGroupBox); QLabel *newLabel = new QLabel (i18n ("&New:"), dimensionsGroupBox);
m_newWidthInput = new KIntNumInput (dimensionsGroupBox); m_newWidthInput = new QSpinBox;
QLabel *xLabel1 = new QLabel (i18n ("x"), dimensionsGroupBox); QLabel *xLabel1 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_newHeightInput = new KIntNumInput (dimensionsGroupBox); m_newHeightInput = new QSpinBox;
QLabel *percentLabel = new QLabel (i18n ("&Percent:"), dimensionsGroupBox); QLabel *percentLabel = new QLabel (i18n ("&Percent:"), dimensionsGroupBox);
m_percentWidthInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/, m_percentWidthInput = new QDoubleSpinBox;
100/*value*/, m_percentWidthInput->setRange(0.01, 1000000);
dimensionsGroupBox, m_percentWidthInput->setValue(100);
1/*step*/, m_percentWidthInput->setSingleStep(1);
2/*precision*/); m_percentWidthInput->setDecimals(2);
m_percentWidthInput->setSuffix (i18n ("%")); m_percentWidthInput->setSuffix(i18n("%"));
QLabel *xLabel2 = new QLabel (i18n ("x"), dimensionsGroupBox); QLabel *xLabel2 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_percentHeightInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/,
100/*value*/, m_percentHeightInput = new QDoubleSpinBox;
dimensionsGroupBox, m_percentHeightInput->setRange(0.01, 1000000);
1/*step*/, m_percentHeightInput->setValue(100);
2/*precision*/); m_percentHeightInput->setSingleStep(1);
m_percentHeightInput->setSuffix (i18n ("%")); m_percentHeightInput->setDecimals(2);
m_percentHeightInput->setSuffix(i18n("%"));
m_keepAspectRatioCheckBox = new QCheckBox (i18n ("Keep &aspect ratio"), m_keepAspectRatioCheckBox = new QCheckBox (i18n ("Keep &aspect ratio"),
dimensionsGroupBox); dimensionsGroupBox);
......
...@@ -39,9 +39,8 @@ class QCheckBox; ...@@ -39,9 +39,8 @@ class QCheckBox;
class QComboBox; class QComboBox;
class QGroupBox; class QGroupBox;
class QToolButton; class QToolButton;
class QSpinBox;
class KDoubleNumInput; class QDoubleSpinBox;
class KIntNumInput;
class kpAbstractSelection; class kpAbstractSelection;
class kpDocument; class kpDocument;
...@@ -109,9 +108,9 @@ Q_OBJECT ...@@ -109,9 +108,9 @@ Q_OBJECT
*m_scaleButton, *m_scaleButton,
*m_smoothScaleButton; *m_smoothScaleButton;
KIntNumInput *m_originalWidthInput, *m_originalHeightInput, QSpinBox *m_originalWidthInput, *m_originalHeightInput,
*m_newWidthInput, *m_newHeightInput; *m_newWidthInput, *m_newHeightInput;
KDoubleNumInput *m_percentWidthInput, *m_percentHeightInput; QDoubleSpinBox *m_percentWidthInput, *m_percentHeightInput;
QCheckBox *m_keepAspectRatioCheckBox; QCheckBox *m_keepAspectRatioCheckBox;
int m_ignoreKeepAspectRatio; int m_ignoreKeepAspectRatio;
......
/* /*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved. All rights reserved.
...@@ -40,12 +39,11 @@ ...@@ -40,12 +39,11 @@
#include <qpushbutton.h> #include <qpushbutton.h>
#include <qmatrix.h> #include <qmatrix.h>
#include <QImage> #include <QImage>
#include <qpolygon.h> #include <QSpinBox>
#include <kdebug.h> #include <kdebug.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocale.h> #include <klocale.h>
#include <knuminput.h>
#include <kpDefs.h> #include <kpDefs.h>
#include <kpDocument.h> #include <kpDocument.h>
...@@ -86,7 +84,7 @@ kpTransformSkewDialog::kpTransformSkewDialog (bool actOnSelection, ...@@ -86,7 +84,7 @@ kpTransformSkewDialog::kpTransformSkewDialog (bool actOnSelection,
slotUpdate (); slotUpdate ();
m_horizontalSkewInput->setEditFocus (); m_horizontalSkewInput->setFocus ();
} }
kpTransformSkewDialog::~kpTransformSkewDialog () kpTransformSkewDialog::~kpTransformSkewDialog ()
...@@ -106,9 +104,10 @@ void kpTransformSkewDialog::createAngleGroupBox () ...@@ -106,9 +104,10 @@ void kpTransformSkewDialog::createAngleGroupBox ()
horizontalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_horizontal")); horizontalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_horizontal"));
QLabel *horizontalSkewLabel = new QLabel (i18n ("&Horizontal:"), angleGroupBox); QLabel *horizontalSkewLabel = new QLabel (i18n ("&Horizontal:"), angleGroupBox);
m_horizontalSkewInput = new KIntNumInput (s_lastHorizontalAngle, angleGroupBox); m_horizontalSkewInput = new QSpinBox;
m_horizontalSkewInput->setMinimum (-89); m_horizontalSkewInput->setValue(s_lastHorizontalAngle);
m_horizontalSkewInput->setMaximum (+89); m_horizontalSkewInput->setMinimum(-89);
m_horizontalSkewInput->setMaximum(+89);
QLabel *horizontalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox); QLabel *horizontalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
...@@ -117,9 +116,10 @@ void kpTransformSkewDialog::createAngleGroupBox () ...@@ -117,9 +116,10 @@ void kpTransformSkewDialog::createAngleGroupBox ()
verticalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_vertical")); verticalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_vertical"));
QLabel *verticalSkewLabel = new QLabel (i18n ("&Vertical:"), angleGroupBox); QLabel *verticalSkewLabel = new QLabel (i18n ("&Vertical:"), angleGroupBox);
m_verticalSkewInput = new KIntNumInput (s_lastVerticalAngle, angleGroupBox); m_verticalSkewInput = new QSpinBox;
m_verticalSkewInput->setMinimum (-89); m_verticalSkewInput->setValue(s_lastVerticalAngle);
m_verticalSkewInput->setMaximum (+89); m_verticalSkewInput->setMinimum(-89);
m_verticalSkewInput->setMaximum(+89);
QLabel *verticalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox); QLabel *verticalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
......
/* /*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved. All rights reserved.
...@@ -29,16 +28,10 @@ ...@@ -29,16 +28,10 @@
#ifndef kpTransformSkewDialog_H #ifndef kpTransformSkewDialog_H
#define kpTransformSkewDialog_H #define kpTransformSkewDialog_H
#include <qpixmap.h>
#include <kpColor.h> #include <kpColor.h>
#include <kpTransformPreviewDialog.h> #include <kpTransformPreviewDialog.h>
class QSpinBox;
class QPixmap;
class KIntNumInput;
class kpTransformSkewDialog : public kpTransformPreviewDialog class kpTransformSkewDialog : public kpTransformPreviewDialog
...@@ -83,7 +76,7 @@ private slots: ...@@ -83,7 +76,7 @@ private slots:
virtual void accept (); virtual void accept ();
private: private:
KIntNumInput *m_horizontalSkewInput, *m_verticalSkewInput; QSpinBox *m_horizontalSkewInput, *m_verticalSkewInput;
}; };
......
...@@ -141,17 +141,5 @@ void kpColorSimilarityDialog::slotColorSimilarityValueChanged () ...@@ -141,17 +141,5 @@ void kpColorSimilarityDialog::slotColorSimilarityValueChanged ()
// private slot // private slot
void kpColorSimilarityDialog::slotWhatIsLabelClicked () void kpColorSimilarityDialog::slotWhatIsLabelClicked ()
{ {
QWhatsThis::showText (QCursor::pos (), m_colorSimilarityFrame->whatsThis (), QWhatsThis::showText(QCursor::pos(), m_colorSimilarityFrame->whatsThis(), this);
this);
// LOTODO: It looks weird with the focus rectangle.
// It's also very hard for the user to make it lose focus for some reason
// (you must click on the label - nowhere else will work).
//
// This doesn't work - I don't know why:
// m_whatIsLabel->clearFocus ();
//
// Maybe it's a weird kind of focus?
} }
/* /*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved. All rights reserved.
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include <kconfig.h> #include <kconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h> #include <kdebug.h>
#include <KIntSpinBox> #include <KPluralHandlingSpinBox>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kio/netaccess.h> #include <kio/netaccess.h>
...@@ -444,7 +444,11 @@ QList<QUrl> kpMainWindow::askForOpenURLs(const QString &caption, bool allowMulti ...@@ -444,7 +444,11 @@ QList<QUrl> kpMainWindow::askForOpenURLs(const QString &caption, bool allowMulti
filter += glob; filter += glob;
filterList << mime.comment() + QStringLiteral(" (") + glob + QLatin1Char(')'); // I want to show the mime comment AND the file glob pattern,
// but to avoid that the "All Supported Files" entry shows ALL glob patterns,
// I must add the pattern here a second time so that QFileDialog::HideNameFilterDetails
// can hide the first pattern and I still see the second one
filterList << mime.comment() + QString(" (%1)(%2)").arg(glob).arg(glob);
} }
} }
...@@ -661,7 +665,7 @@ void kpMainWindow::slotScreenshot() ...@@ -661,7 +665,7 @@ void kpMainWindow::slotScreenshot()
connect (buttons, SIGNAL (rejected()), dialog, SLOT (reject())); connect (buttons, SIGNAL (rejected()), dialog, SLOT (reject()));
QLabel *label = new QLabel(i18n("Snapshot Delay")); QLabel *label = new QLabel(i18n("Snapshot Delay"));
KIntSpinBox *seconds = new KIntSpinBox; KPluralHandlingSpinBox *seconds = new KPluralHandlingSpinBox;
seconds->setRange(0, 99); seconds->setRange(0, 99);
seconds->setSuffix(ki18np(" second", " seconds")); seconds->setSuffix(ki18np(" second", " seconds"));
seconds->setSpecialValueText(i18n("No delay")); seconds->setSpecialValueText(i18n("No delay"));
......
/* /*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved. All rights reserved.
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
class QCheckBox; class QCheckBox;
class KIntNumInput; //class KIntNumInput;
class kpEffectEmbossWidget : public kpEffectWidgetBase class kpEffectEmbossWidget : public kpEffectWidgetBase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment