KDEUI
knuminput.cpp
Go to the documentation of this file.
266 KIntSpinBox::KIntSpinBox(int lower, int upper, int singleStep, int value, QWidget *parent, int base)
603 d->intSpinBox->setGeometry(w, h, priv->slider ? priv->column2Width : qMax(priv->column2Width, e->size().width() - w), d->intSpinBoxSize.height());
607 priv->slider->setGeometry(w, h, e->size().width() - w, d->intSpinBoxSize.height() + KDialog::spacingHint());
610 priv->slider->setGeometry(w, h, e->size().width() - (w + priv->column2Width + KDialog::spacingHint()), d->intSpinBoxSize.height() + KDialog::spacingHint());
611 d->intSpinBox->setGeometry(w + priv->slider->size().width() + KDialog::spacingHint(), h, priv->column2Width, d->intSpinBoxSize.height());
613 d->intSpinBox->setGeometry(w, h, qMax(priv->column2Width, e->size().width() - w), d->intSpinBoxSize.height());
858 priv->slider->setGeometry(w, h, e->size().width() - w, d->editSize.height() + KDialog::spacingHint());
double relativeValue() const
virtual void setLabel(const QString &label, Qt::Alignment a=Qt::AlignLeft|Qt::AlignTop)
Sets the text and alignment of the main description label.
Definition: knuminput.cpp:130
virtual QString textFromValue(int) const
Overloaded the method in QSpinBox to make use of the base given in the constructor.
Definition: knuminput.cpp:285
int minimum() const
void setPrefix(const QString &prefix)
Sets the prefix to be displayed to prefix.
Definition: knuminput.cpp:1033
double minimum() const
QString specialValueText() const
QString toString() const
void relativeValueChanged(double)
Emitted whenever valueChanged is.
void layout(bool deep)
Call this function whenever you change something in the geometry of your KNumInput child...
Definition: knuminput.cpp:158
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:657
virtual QSize sizeHint() const
Returns a size which fits the contents of the control.
Definition: knuminput.cpp:218
virtual void setLabel(const QString &label, Qt::Alignment a=Qt::AlignLeft|Qt::AlignTop)
Sets the text and alignment of the main description label.
Definition: knuminput.cpp:668
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition: kstandardshortcut.cpp:267
QString prefix() const
double referencePoint() const
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:1052
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setRelativeValue(double)
Sets the value in units of the referencePoint.
Definition: knuminput.cpp:634
virtual int valueFromText(const QString &text) const
Overloaded the method in QSpinBox to make use of the base given in the constructor.
Definition: knuminput.cpp:290
double exponentRatio() const
You need to inherit from this class if you want to implement K*NumInput for a different variable type...
Definition: knuminput.h:43
QString prefix()
void valueChanged(double)
Emitted every time the value changes (by calling setValue() or by user interaction).
void setRange(int min, int max, int singleStep=1)
Sets the allowed input range and the step size for the slider and the spin box.
Definition: knuminput.cpp:450
virtual void doLayout()
You need to overwrite this method and implement your layout calculations there.
Definition: knuminput.cpp:876
bool isEmpty() const
double singleStep() const
QString suffix() const
void setRange(double min, double max, double singleStep=1, bool slider=true)
Definition: knuminput.cpp:906
double maximum() const
int value() const
int base() const
static int spacingHint()
Returns the number of pixels that should be used between widgets inside a dialog according to the KDE...
Definition: kdialog.cpp:432
void setSuffix(const QString &suffix)
Sets the suffix to be displayed to suffix.
Definition: knuminput.cpp:1026
int referencePoint() const
int maximum() const
void relativeValueChanged(double)
This is an overloaded member function, provided for convenience.
void setRelativeValue(double)
Sets the value in units of referencePoint.
Definition: knuminput.cpp:889
friend class KDoubleNumInputPrivate
Definition: knuminput.h:696
QString specialValueText() const
KDoubleNumInput(QWidget *parent=0)
Constructs an input control for double values with initial value 0.00.
Definition: knuminput.cpp:697
QString prefix() const
void setBase(int base)
Sets the base in which the numbers in the spin box are represented.
Definition: knuminput.cpp:274
void valueChanged(int)
Emitted every time the value changes (by calling setValue() or by user interaction).
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KLocalizedString subs(int a, int fieldWidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const
int decimals() const
virtual void doLayout()
You need to overwrite this method and implement your layout calculations there.
Definition: knuminput.cpp:574
double relativeValue() const
KIntNumInput(QWidget *parent=0)
Constructs an input control for integer values with base 10 and initial value 0.
Definition: knuminput.cpp:347
int singleStep() const
double value() const
virtual void setLabel(const QString &label, Qt::Alignment a=Qt::AlignLeft|Qt::AlignTop)
Sets the text and alignment of the main description label.
Definition: knuminput.cpp:1060
QString label() const
virtual void doLayout()=0
You need to overwrite this method and implement your layout calculations there.
QString suffix() const
void setSuffix(const KLocalizedString &suffix)
Sets the suffix to suffix.
Definition: knuminput.cpp:311
void setEditFocus(bool mark=true)
sets focus to the edit widget and marks all text in if mark == true
Definition: knuminput.cpp:541
void setSteps(int minor, int major)
Sets the spacing of tickmarks for the slider.
Definition: knuminput.cpp:223
virtual QSize minimumSizeHint() const
This method returns the minimum size necessary to display the control.
Definition: knuminput.cpp:546
void setReferencePoint(int)
Sets the reference point for relativeValue.
Definition: knuminput.cpp:387
An input widget for integer numbers, consisting of a spinbox and a slider.
Definition: knuminput.h:172
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.