Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickborderimage_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
4#ifndef QQUICKBORDERIMAGE_P_H
5#define QQUICKBORDERIMAGE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qquickimagebase_p.h"
19
21
22class QQuickScaleGrid;
25class Q_QUICK_EXPORT QQuickBorderImage : public QQuickImageBase
26{
28
30 Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
31 Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
32 // read-only for BorderImage
33 Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
34 QML_NAMED_ELEMENT(BorderImage)
36
37public:
38 QQuickBorderImage(QQuickItem *parent=nullptr);
40
42
44 Q_ENUM(TileMode)
45
46 TileMode horizontalTileMode() const;
47 void setHorizontalTileMode(TileMode);
48
49 TileMode verticalTileMode() const;
50 void setVerticalTileMode(TileMode);
51
52 void setSource(const QUrl &url) override;
53
58
59protected:
60 void load() override;
61 void pixmapChange() override;
62 QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
63
64private:
65 void setGridScaledImage(const QQuickGridScaledImage& sci);
66
67private Q_SLOTS:
68 void doUpdate();
69 void requestFinished() override;
70#if QT_CONFIG(qml_network)
71 void sciRequestFinished();
72#endif
73
74private:
75 Q_DISABLE_COPY(QQuickBorderImage)
76 Q_DECLARE_PRIVATE(QQuickBorderImage)
77};
78
80
81#endif // QQUICKBORDERIMAGE_P_H
void sourceSizeChanged()
void verticalTileModeChanged()
void horizontalTileModeChanged()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QQuickScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
\inmodule QtCore
Definition qsize.h:25
\inmodule QtCore
Definition qurl.h:94
p1 load("image.bmp")
Combined button and popup list for selecting options.
@ RepeatTile
Definition qnamespace.h:135
@ RoundTile
Definition qnamespace.h:136
@ StretchTile
Definition qnamespace.h:134
@ Repeat
GLint GLenum GLsizei GLsizei GLsizei GLint border
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
QUrl url("example.com")
[constructor-url-reference]