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());
QLayout * layout() const
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
int width() const
QString toString() const
void relativeValueChanged(double)
Emitted whenever valueChanged is.
QString suffix() const
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:657
void setFocusPolicy(Qt::FocusPolicy policy)
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
QString prefix() const
double referencePoint() const
void setSpecialValueText(const QString &text)
Sets the special value text.
Definition: knuminput.cpp:1052
void ensurePolished() const
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual QSize minimumSizeHint() const
void setRelativeValue(double)
Sets the value in units of the referencePoint.
Definition: knuminput.cpp:634
QString & remove(int position, int n)
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
void chop(int n)
typedef Alignment
double exponentRatio() const
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
You need to inherit from this class if you want to implement K*NumInput for a different variable type...
Definition: knuminput.h:43
QString text() const
void setRange(int minimum, int maximum)
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
void valueChanged(int i)
bool isEmpty() const
double singleStep() const
QString number(int n, int base)
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 setFocus()
void setSuffix(const QString &suffix)
Sets the suffix to be displayed to suffix.
Definition: knuminput.cpp:1026
int toInt(bool *ok, int base) const
QLineEdit * lineEdit() const
void setFocusProxy(QWidget *w)
bool isEmpty() const
QString trimmed() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
decimals
int referencePoint() const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
int maximum() const
void selectAll()
void setSizePolicy(QSizePolicy)
void relativeValueChanged(double)
This is an overloaded member function, provided for convenience.
void setSingleStep(int val)
void setRelativeValue(double)
Sets the value in units of referencePoint.
Definition: knuminput.cpp:889
friend class KDoubleNumInputPrivate
Definition: knuminput.h:696
const QSize & size() const
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
int value() 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
minimum
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.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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
maximum
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.