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
qquickscalegrid_p_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 QQUICKSCALEGRID_P_P_H
5#define QQUICKSCALEGRID_P_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 "qquickborderimage_p.h"
19
20#include <QtQml/qqml.h>
21#include <QtCore/qobject.h>
22
23#include <QtQuick/private/qquickpixmap_p.h>
24#include <private/qtquickglobal_p.h>
25
27
28class Q_QUICK_EXPORT QQuickScaleGrid : public QObject
29{
31
32 Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftBorderChanged FINAL)
33 Q_PROPERTY(int top READ top WRITE setTop NOTIFY topBorderChanged FINAL)
34 Q_PROPERTY(int right READ right WRITE setRight NOTIFY rightBorderChanged FINAL)
35 Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY bottomBorderChanged FINAL)
38
39public:
40 QQuickScaleGrid(QObject *parent=nullptr);
41
42 bool isNull() const;
43
44 int left() const { return _left; }
45 void setLeft(int);
46
47 int top() const { return _top; }
48 void setTop(int);
49
50 int right() const { return _right; }
51 void setRight(int);
52
53 int bottom() const { return _bottom; }
54 void setBottom(int);
55
62
63private:
64 int _left;
65 int _top;
66 int _right;
67 int _bottom;
68};
69
71{
72public:
77 bool isValid() const;
78 int gridLeft() const;
79 int gridRight() const;
80 int gridTop() const;
81 int gridBottom() const;
84
85 QString pixmapUrl() const;
86
87private:
88 static QQuickBorderImage::TileMode stringToRule(QStringView);
89
90private:
91 int _l;
92 int _r;
93 int _t;
94 int _b;
97 QString _pix;
98};
99
101
102#endif // QQUICKSCALEGRID_P_P_H
\inmodule QtCore \reentrant
Definition qiodevice.h:34
\inmodule QtCore
Definition qobject.h:103
QQuickBorderImage::TileMode horizontalTileRule() const
QQuickBorderImage::TileMode verticalTileRule() const
The QQuickScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
void borderChanged()
void rightBorderChanged()
void leftBorderChanged()
void topBorderChanged()
void bottomBorderChanged()
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
#define QML_ANONYMOUS
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_AUTOTEST_EXPORT
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS