1// qlcdnumber.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 QLCDNumber : QFrame
24{
25%TypeHeaderCode
26#include <qlcdnumber.h>
27%End
28
29public:
30    explicit QLCDNumber(QWidget *parent /TransferThis/ = 0);
31    QLCDNumber(uint numDigits, QWidget *parent /TransferThis/ = 0);
32    virtual ~QLCDNumber();
33
34    enum Mode
35    {
36        Hex,
37        Dec,
38        Oct,
39        Bin,
40    };
41
42    enum SegmentStyle
43    {
44        Outline,
45        Filled,
46        Flat,
47    };
48
49    bool smallDecimalPoint() const;
50    int digitCount() const;
51    void setDigitCount(int nDigits);
52    void setNumDigits(int nDigits);
53%MethodCode
54        // This is implemented for Qt v5 so that .ui files created with Designer for Qt v4 will continue to work.
55        sipCpp->setDigitCount(a0);
56%End
57
58    bool checkOverflow(double num /Constrained/) const;
59    bool checkOverflow(int num) const;
60    QLCDNumber::Mode mode() const;
61    void setMode(QLCDNumber::Mode);
62    QLCDNumber::SegmentStyle segmentStyle() const;
63    void setSegmentStyle(QLCDNumber::SegmentStyle);
64    double value() const;
65    int intValue() const;
66    virtual QSize sizeHint() const;
67    void display(const QString &str);
68    void display(double num /Constrained/);
69    void display(int num);
70    void setHexMode();
71    void setDecMode();
72    void setOctMode();
73    void setBinMode();
74    void setSmallDecimalPoint(bool);
75
76signals:
77    void overflow();
78
79protected:
80    virtual bool event(QEvent *e);
81    virtual void paintEvent(QPaintEvent *);
82};
83