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
qsgsoftwareinternalrectanglenode_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QSGSOFTWAREINTERNALRECTANGLENODE_H
6#define QSGSOFTWAREINTERNALRECTANGLENODE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qsgadaptationlayer_p.h>
20
21#include <QPen>
22#include <QBrush>
23#include <QPixmap>
24
26
28{
29public:
31
32 void setRect(const QRectF &rect) override;
33 void setColor(const QColor &color) override;
34 void setPenColor(const QColor &color) override;
35 void setPenWidth(qreal width) override;
36 void setGradientStops(const QGradientStops &stops) override;
37 void setGradientVertical(bool vertical) override;
38 void setRadius(qreal radius) override;
39 void setTopLeftRadius(qreal radius) override;
40 void setTopRightRadius(qreal radius) override;
41 void setBottomLeftRadius(qreal radius) override;
42 void setBottomRightRadius(qreal radius) override;
47 void setAntialiasing(bool antialiasing) override { Q_UNUSED(antialiasing); }
48 void setAligned(bool aligned) override;
49
50 void update() override;
51
52 void paint(QPainter *);
53
54 bool isOpaque() const;
55 QRectF rect() const;
56private:
57 void paintRectangle(QPainter *painter, const QRect &rect);
58 void paintRectangleIndividualCorners(QPainter *painter, const QRect &rect);
59 void generateCornerPixmap();
60
61 QRect m_rect;
62 QColor m_color;
63 QColor m_penColor;
64 qreal m_penWidth;
65 QGradientStops m_stops;
66 qreal m_radius;
67 qreal m_topLeftRadius;
68 qreal m_topRightRadius;
69 qreal m_bottomLeftRadius;
70 qreal m_bottomRightRadius;
71 QPen m_pen;
72 QBrush m_brush;
73 QPixmap m_cornerPixmap;
74 qreal m_devicePixelRatio;
75
76 uint m_vertical : 1;
77 uint m_cornerPixmapIsDirty : 1;
78 uint m_isTopLeftRadiusSet : 1;
79 uint m_isTopRightRadiusSet : 1;
80 uint m_isBottomLeftRadiusSet : 1;
81 uint m_isBottomRightRadiusSet : 1;
82};
83
84QT_END_NAMESPACE
85
86#endif // QSGSOFTWAREINTERNALRECTANGLENODE_H
void setAntialiasing(bool antialiasing) override
void setColor(const QColor &color) override
void setGradientStops(const QGradientStops &stops) override
void setPenColor(const QColor &color) override
Combined button and popup list for selecting options.