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());
virtual void doLayout()
You need to overwrite this method and implement your layout calculations there.
Definition: knuminput.cpp:574
friend class KDoubleNumInputPrivate
Definition: knuminput.h:696
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
void setSuffix(const QString &suffix)
Sets the suffix to be displayed to suffix.
Definition: knuminput.cpp:1026
void ref()
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString label(StandardShortcut id)
Returns a localized label for user-visible display.
Definition: kstandardshortcut.cpp:267
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
QString toString() const
void valueChanged(int)
Emitted every time the value changes (by calling setValue() or by user interaction).
void setRange(double min, double max, double singleStep=1, bool slider=true)
Definition: knuminput.cpp:906
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 void doLayout()=0
You need to overwrite this method and implement your layout calculations there.
void valueChanged(double)
Emitted every time the value changes (by calling setValue() or by user interaction).
KIntNumInput(QWidget *parent=0)
Constructs an input control for integer values with base 10 and initial value 0.
Definition: knuminput.cpp:347
void setSteps(int minor, int major)
Sets the spacing of tickmarks for the slider.
Definition: knuminput.cpp:223
You need to inherit from this class if you want to implement K*NumInput for a different variable type...
Definition: knuminput.h:43
KLocalizedString subs(const QString &a, int fieldWidth=0, const QChar &fillChar=QLatin1Char(' ')) const
void setEditFocus(bool mark=true)
sets focus to the edit widget and marks all text in if mark == true
Definition: knuminput.cpp:541
void setRelativeValue(double)
Sets the value in units of referencePoint.
Definition: knuminput.cpp:889
void setPrefix(const QString &prefix)
Sets the prefix to be displayed to prefix.
Definition: knuminput.cpp:1033
virtual QString textFromValue(int) const
Overloaded the method in QSpinBox to make use of the base given in the constructor.
Definition: knuminput.cpp:285
virtual QSize sizeHint() const
Returns a size which fits the contents of the control.
Definition: knuminput.cpp:218
virtual QSize minimumSizeHint() const
This method returns the minimum size necessary to display the control.
Definition: knuminput.cpp:546
void layout(bool deep)
Call this function whenever you change something in the geometry of your KNumInput child.
Definition: knuminput.cpp:158
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
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
void relativeValueChanged(double)
Emitted whenever valueChanged is.
void setRelativeValue(double)
Sets the value in units of the referencePoint.
Definition: knuminput.cpp:634
void relativeValueChanged(double)
This is an overloaded member function, provided for convenience.
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:1052
KDoubleNumInput(QWidget *parent=0)
Constructs an input control for double values with initial value 0.00.
Definition: knuminput.cpp:697
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
QString prefix()
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
virtual void doLayout()
You need to overwrite this method and implement your layout calculations there.
Definition: knuminput.cpp:876
An input widget for integer numbers, consisting of a spinbox and a slider.
Definition: knuminput.h:172
void setBase(int base)
Sets the base in which the numbers in the spin box are represented.
Definition: knuminput.cpp:274
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:657
void setSuffix(const KLocalizedString &suffix)
Sets the suffix to suffix.
Definition: knuminput.cpp:311
bool isEmpty() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.