//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.


class KNumInput : QWidget
{
%TypeHeaderCode
#include <knuminput.h>
%End


public:
    explicit                KNumInput (QWidget* parent /TransferThis/ = 0);
                            KNumInput (QWidget* parent /TransferThis/, KNumInput* below);
    virtual void            setLabel (const QString& label, Qt::Alignment a = Qt::AlignLeft|Qt::AlignTop);
    QString                 label () const;
    bool                    showSlider () const;
    void                    setSteps (int minor, int major);
    virtual QSize           sizeHint () const;

protected:
    QSlider*                slider () const;
    void                    layout (bool deep);
    virtual void            doLayout () = 0;

private:
                            KNumInput (const KNumInput&);
};   // KNumInput


class KIntNumInput : KNumInput
{
%TypeHeaderCode
#include <knuminput.h>
%End


public:
    explicit                KIntNumInput (QWidget* parent /TransferThis/ = 0);
    explicit                KIntNumInput (int value, QWidget* parent /TransferThis/ = 0, int base = 10);
                            KIntNumInput (KNumInput* below, int value, QWidget* parent /TransferThis/, int base = 10);
    int                     value () const;
    double                  relativeValue () const;
    int                     referencePoint () const;
    QString                 suffix () const;
    QString                 prefix () const;
    QString                 specialValueText () const;
    void                    setRange (int min, int max, int step = 1);
    void                    setRange (int min, int max, int step, bool slider);
    void                    setSliderEnabled (bool enabled = 1);
    void                    setMinimum (int min);
    int                     minimum () const;
    void                    setMaximum (int max);
    int                     maximum () const;
    void                    setSpecialValueText (const QString& text);
    virtual void            setLabel (const QString& label, Qt::Alignment a = Qt::AlignLeft|Qt::AlignTop);
    virtual QSize           minimumSizeHint () const;
    void                    setValue (int);
    void                    setRelativeValue (double);
    void                    setReferencePoint (int);
    void                    setSuffix (const QString& suffix);
    void                    setPrefix (const QString& prefix);
    void                    setEditFocus (bool mark = 1);

signals:
    void                    valueChanged (int);
    void                    relativeValueChanged (double);

protected:
    QSpinBox*               spinBox () const;
    virtual void            doLayout ();
    void                    resizeEvent (QResizeEvent*);

private:
                            KIntNumInput (const KIntNumInput&);
};   // KIntNumInput


class KDoubleNumInput : KNumInput
{
%TypeHeaderCode
#include <knuminput.h>
%End


public:
    explicit                KDoubleNumInput (QWidget* parent /TransferThis/ = 0);
                            KDoubleNumInput (double lower, double upper, double value, QWidget* parent /TransferThis/ = 0, double step = 0.01, int precision = 2);
                            KDoubleNumInput (KNumInput* below, double lower, double upper, double value, QWidget* parent /TransferThis/ = 0, double step = 0.02, int precision = 2);
    double                  value () const;
    QString                 suffix () const;
    QString                 prefix () const;
    int                     decimals () const;
    QString                 specialValueText () const;
    void                    setRange (double min, double max, double step = 1, bool slider = 1);
    void                    setMinimum (double min);
    double                  minimum () const;
    void                    setMaximum (double max);
    double                  maximum () const;
    void                    setDecimals (int decimals);
    void                    setPrecision (int precision);
    double                  referencePoint () const;
    double                  relativeValue () const;
    void                    setSpecialValueText (const QString& text);
    virtual void            setLabel (const QString& label, Qt::Alignment a = Qt::AlignLeft|Qt::AlignTop);
    virtual QSize           minimumSizeHint () const;
    void                    setValue (double);
    void                    setRelativeValue (double);
    void                    setReferencePoint (double ref);
    void                    setSuffix (const QString& suffix);
    void                    setPrefix (const QString& prefix);

signals:
    void                    valueChanged (double);
    void                    relativeValueChanged (double);

protected:
    virtual void            doLayout ();
    void                    resizeEvent (QResizeEvent*);

private:
                            KDoubleNumInput (const KDoubleNumInput&);
};   // KDoubleNumInput


class KIntSpinBox : QSpinBox
{
%TypeHeaderCode
#include <knuminput.h>
%End


public:
    explicit                KIntSpinBox (QWidget* parent /TransferThis/ = 0);
                            KIntSpinBox (int lower, int upper, int step, int value, QWidget* parent /TransferThis/, int base = 10);
    void                    setBase (int base);
    int                     base () const;
    void                    setEditFocus (bool mark);

protected:
    virtual QString         textFromValue (int) const;
    virtual int             valueFromText (const QString& text) const;

private:
                            KIntSpinBox (const KIntSpinBox&);
};   // KIntSpinBox


