1// qabstractspinbox.sip generated by MetaSIP
2//
3// This file is part of the QtWidgets Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QAbstractSpinBox : QWidget
24{
25%TypeHeaderCode
26#include <qabstractspinbox.h>
27%End
28
29public:
30    explicit QAbstractSpinBox(QWidget *parent /TransferThis/ = 0);
31    virtual ~QAbstractSpinBox();
32
33    enum StepEnabledFlag
34    {
35        StepNone,
36        StepUpEnabled,
37        StepDownEnabled,
38    };
39
40    typedef QFlags<QAbstractSpinBox::StepEnabledFlag> StepEnabled;
41
42    enum ButtonSymbols
43    {
44        UpDownArrows,
45        PlusMinus,
46        NoButtons,
47    };
48
49    QAbstractSpinBox::ButtonSymbols buttonSymbols() const;
50    void setButtonSymbols(QAbstractSpinBox::ButtonSymbols bs);
51    QString text() const;
52    QString specialValueText() const;
53    void setSpecialValueText(const QString &s);
54    bool wrapping() const;
55    void setWrapping(bool w);
56    void setReadOnly(bool r);
57    bool isReadOnly() const;
58    void setAlignment(Qt::Alignment flag);
59    Qt::Alignment alignment() const;
60    void setFrame(bool);
61    bool hasFrame() const;
62    virtual QSize sizeHint() const;
63    virtual QSize minimumSizeHint() const;
64    void interpretText();
65    virtual bool event(QEvent *event);
66    virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
67    virtual void fixup(QString &input /In,Out/) const;
68    virtual void stepBy(int steps);
69
70public slots:
71    void stepUp();
72    void stepDown();
73    void selectAll();
74    virtual void clear();
75
76signals:
77    void editingFinished();
78
79protected:
80    virtual void resizeEvent(QResizeEvent *e);
81    virtual void keyPressEvent(QKeyEvent *e);
82    virtual void keyReleaseEvent(QKeyEvent *e);
83    virtual void wheelEvent(QWheelEvent *e);
84    virtual void focusInEvent(QFocusEvent *e);
85    virtual void focusOutEvent(QFocusEvent *e);
86    virtual void contextMenuEvent(QContextMenuEvent *e);
87    virtual void changeEvent(QEvent *e);
88    virtual void closeEvent(QCloseEvent *e);
89    virtual void hideEvent(QHideEvent *e);
90    virtual void mousePressEvent(QMouseEvent *e);
91    virtual void mouseReleaseEvent(QMouseEvent *e);
92    virtual void mouseMoveEvent(QMouseEvent *e);
93    virtual void timerEvent(QTimerEvent *e);
94    virtual void paintEvent(QPaintEvent *e);
95    virtual void showEvent(QShowEvent *e);
96    QLineEdit *lineEdit() const;
97    void setLineEdit(QLineEdit *e /Transfer/);
98    virtual QAbstractSpinBox::StepEnabled stepEnabled() const;
99    void initStyleOption(QStyleOptionSpinBox *option) const;
100
101public:
102    enum CorrectionMode
103    {
104        CorrectToPreviousValue,
105        CorrectToNearestValue,
106    };
107
108    void setCorrectionMode(QAbstractSpinBox::CorrectionMode cm);
109    QAbstractSpinBox::CorrectionMode correctionMode() const;
110    bool hasAcceptableInput() const;
111    void setAccelerated(bool on);
112    bool isAccelerated() const;
113    void setKeyboardTracking(bool kt);
114    bool keyboardTracking() const;
115    virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
116%If (Qt_5_3_0 -)
117    void setGroupSeparatorShown(bool shown);
118%End
119%If (Qt_5_3_0 -)
120    bool isGroupSeparatorShown() const;
121%End
122%If (Qt_5_12_0 -)
123
124    enum StepType
125    {
126        DefaultStepType,
127        AdaptiveDecimalStepType,
128    };
129
130%End
131};
132
133QFlags<QAbstractSpinBox::StepEnabledFlag> operator|(QAbstractSpinBox::StepEnabledFlag f1, QFlags<QAbstractSpinBox::StepEnabledFlag> f2);
134