Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickstyleitemspinbox.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSTYLEITEMSPINBOX_H
6#define QQUICKSTYLEITEMSPINBOX_H
7
9#include <QtQuickTemplates2/private/qquickspinbox_p.h>
10
11QT_BEGIN_NAMESPACE
12
13class QQuickStyleItemSpinBox : public QQuickStyleItem
14{
15 Q_OBJECT
16
17 Q_PROPERTY(SubControl subControl MEMBER m_subControl)
18
19 QML_NAMED_ELEMENT(SpinBox)
20
21public:
22 enum SubControl {
23 Frame = 1,
24 Up,
25 Down,
26 };
27 Q_ENUM(SubControl)
28
29 QFont styleFont(QQuickItem *control) const override;
30
31protected:
32 void connectToControl() const override;
33 void paintEvent(QPainter *painter) const override;
34 StyleItemGeometry calculateGeometry() override;
35
36private:
37 void initStyleOption(QStyleOptionSpinBox &styleOption) const;
38
39private:
40 SubControl m_subControl = Frame;
41};
42
44
45#endif // QQUICKSTYLEITEMSPINBOX_H
#define QML_NAMED_ELEMENT(NAME)