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

more KF5 changes

parent 35a5fdf0
......@@ -45,6 +45,8 @@
#include <qpixmap.h>
#include <qsize.h>
#include <qtoolbutton.h>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <kconfig.h>
#include <kconfiggroup.h>
......@@ -52,7 +54,6 @@
#include <kiconeffect.h>
#include <kiconloader.h>
#include <klocale.h>
#include <knuminput.h>
#include <kpAbstractSelection.h>
#include <kpDefs.h>
......@@ -121,7 +122,7 @@ kpTransformResizeScaleDialog::kpTransformResizeScaleDialog (
slotActOnChanged ();
m_newWidthInput->setEditFocus ();
m_newWidthInput->setFocus ();
//enableButtonOk (!isNoOp ());
}
......@@ -286,33 +287,33 @@ QGroupBox *kpTransformResizeScaleDialog::createDimensionsGroupBox(QWidget *baseW
heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter);
QLabel *originalLabel = new QLabel (i18n ("Original:"), dimensionsGroupBox);
m_originalWidthInput = new KIntNumInput (
document ()->width ((bool) selection ()),
dimensionsGroupBox);
m_originalWidthInput = new QSpinBox;
m_originalWidthInput->setValue(document()->width((bool)selection()));
QLabel *xLabel0 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_originalHeightInput = new KIntNumInput (
document ()->height ((bool) selection ()),
dimensionsGroupBox);
m_originalHeightInput = new QSpinBox;
m_originalHeightInput->setValue(document()->height((bool)selection()));
QLabel *newLabel = new QLabel (i18n ("&New:"), dimensionsGroupBox);
m_newWidthInput = new KIntNumInput (dimensionsGroupBox);
m_newWidthInput = new QSpinBox;
QLabel *xLabel1 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_newHeightInput = new KIntNumInput (dimensionsGroupBox);
m_newHeightInput = new QSpinBox;
QLabel *percentLabel = new QLabel (i18n ("&Percent:"), dimensionsGroupBox);
m_percentWidthInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/,
100/*value*/,
dimensionsGroupBox,
1/*step*/,
2/*precision*/);
m_percentWidthInput->setSuffix (i18n ("%"));
m_percentWidthInput = new QDoubleSpinBox;
m_percentWidthInput->setRange(0.01, 1000000);
m_percentWidthInput->setValue(100);
m_percentWidthInput->setSingleStep(1);
m_percentWidthInput->setDecimals(2);
m_percentWidthInput->setSuffix(i18n("%"));
QLabel *xLabel2 = new QLabel (i18n ("x"), dimensionsGroupBox);
m_percentHeightInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/,
100/*value*/,
dimensionsGroupBox,
1/*step*/,
2/*precision*/);
m_percentHeightInput->setSuffix (i18n ("%"));
m_percentHeightInput = new QDoubleSpinBox;
m_percentHeightInput->setRange(0.01, 1000000);
m_percentHeightInput->setValue(100);
m_percentHeightInput->setSingleStep(1);
m_percentHeightInput->setDecimals(2);
m_percentHeightInput->setSuffix(i18n("%"));
m_keepAspectRatioCheckBox = new QCheckBox (i18n ("Keep &aspect ratio"),
dimensionsGroupBox);
......
......@@ -39,9 +39,8 @@ class QCheckBox;
class QComboBox;
class QGroupBox;
class QToolButton;
class KDoubleNumInput;
class KIntNumInput;
class QSpinBox;
class QDoubleSpinBox;
class kpAbstractSelection;
class kpDocument;
......@@ -109,9 +108,9 @@ Q_OBJECT
*m_scaleButton,
*m_smoothScaleButton;
KIntNumInput *m_originalWidthInput, *m_originalHeightInput,
QSpinBox *m_originalWidthInput, *m_originalHeightInput,
*m_newWidthInput, *m_newHeightInput;
KDoubleNumInput *m_percentWidthInput, *m_percentHeightInput;
QDoubleSpinBox *m_percentWidthInput, *m_percentHeightInput;
QCheckBox *m_keepAspectRatioCheckBox;
int m_ignoreKeepAspectRatio;
......
/*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved.
......@@ -40,12 +39,11 @@
#include <qpushbutton.h>
#include <qmatrix.h>
#include <QImage>
#include <qpolygon.h>
#include <QSpinBox>
#include <kdebug.h>
#include <kiconloader.h>
#include <klocale.h>
#include <knuminput.h>
#include <kpDefs.h>
#include <kpDocument.h>
......@@ -86,7 +84,7 @@ kpTransformSkewDialog::kpTransformSkewDialog (bool actOnSelection,
slotUpdate ();
m_horizontalSkewInput->setEditFocus ();
m_horizontalSkewInput->setFocus ();
}
kpTransformSkewDialog::~kpTransformSkewDialog ()
......@@ -106,9 +104,10 @@ void kpTransformSkewDialog::createAngleGroupBox ()
horizontalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_horizontal"));
QLabel *horizontalSkewLabel = new QLabel (i18n ("&Horizontal:"), angleGroupBox);
m_horizontalSkewInput = new KIntNumInput (s_lastHorizontalAngle, angleGroupBox);
m_horizontalSkewInput->setMinimum (-89);
m_horizontalSkewInput->setMaximum (+89);
m_horizontalSkewInput = new QSpinBox;
m_horizontalSkewInput->setValue(s_lastHorizontalAngle);
m_horizontalSkewInput->setMinimum(-89);
m_horizontalSkewInput->setMaximum(+89);
QLabel *horizontalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
......@@ -117,9 +116,10 @@ void kpTransformSkewDialog::createAngleGroupBox ()
verticalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_vertical"));
QLabel *verticalSkewLabel = new QLabel (i18n ("&Vertical:"), angleGroupBox);
m_verticalSkewInput = new KIntNumInput (s_lastVerticalAngle, angleGroupBox);
m_verticalSkewInput->setMinimum (-89);
m_verticalSkewInput->setMaximum (+89);
m_verticalSkewInput = new QSpinBox;
m_verticalSkewInput->setValue(s_lastVerticalAngle);
m_verticalSkewInput->setMinimum(-89);
m_verticalSkewInput->setMaximum(+89);
QLabel *verticalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
......
/*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved.
......@@ -29,16 +28,10 @@
#ifndef kpTransformSkewDialog_H
#define kpTransformSkewDialog_H
#include <qpixmap.h>
#include <kpColor.h>
#include <kpTransformPreviewDialog.h>
class QPixmap;
class KIntNumInput;
class QSpinBox;
class kpTransformSkewDialog : public kpTransformPreviewDialog
......@@ -83,7 +76,7 @@ private slots:
virtual void accept ();
private:
KIntNumInput *m_horizontalSkewInput, *m_verticalSkewInput;
QSpinBox *m_horizontalSkewInput, *m_verticalSkewInput;
};
......
......@@ -141,17 +141,5 @@ void kpColorSimilarityDialog::slotColorSimilarityValueChanged ()
// private slot
void kpColorSimilarityDialog::slotWhatIsLabelClicked ()
{
QWhatsThis::showText (QCursor::pos (), m_colorSimilarityFrame->whatsThis (),
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?
QWhatsThis::showText(QCursor::pos(), m_colorSimilarityFrame->whatsThis(), this);
}
/*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved.
......
......@@ -54,7 +54,7 @@
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <KIntSpinBox>
#include <KPluralHandlingSpinBox>
#include <kfiledialog.h>
#include <kiconloader.h>
#include <kio/netaccess.h>
......@@ -444,7 +444,11 @@ QList<QUrl> kpMainWindow::askForOpenURLs(const QString &caption, bool allowMulti
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()
connect (buttons, SIGNAL (rejected()), dialog, SLOT (reject()));
QLabel *label = new QLabel(i18n("Snapshot Delay"));
KIntSpinBox *seconds = new KIntSpinBox;
KPluralHandlingSpinBox *seconds = new KPluralHandlingSpinBox;
seconds->setRange(0, 99);
seconds->setSuffix(ki18np(" second", " seconds"));
seconds->setSpecialValueText(i18n("No delay"));
......
/*
Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
All rights reserved.
......
......@@ -36,7 +36,7 @@
class QCheckBox;
class KIntNumInput;
//class KIntNumInput;
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