Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgfxsourceproxy_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
2
// Copyright (C) 2022 The Qt Company Ltd.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5
#
ifndef
QGFXSOURCEPROXY_P_H
6
#
define
QGFXSOURCEPROXY_P_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
<
QtQuick
/
QQuickItem
>
20
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
21
#
include
<
QtCore
/
qrect
.
h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
QQuickShaderEffectSource;
26
27
class
QGfxSourceProxyME
:
public
QQuickItem
28
{
29
Q_OBJECT
30
Q_PROPERTY(QQuickItem *input READ input WRITE setInput NOTIFY inputChanged RESET resetInput FINAL)
31
Q_PROPERTY
(
QQuickItem
*
output
READ
output
NOTIFY
outputChanged
FINAL
)
32
Q_PROPERTY
(
QRectF
sourceRect
READ
sourceRect
WRITE
setSourceRect
NOTIFY
sourceRectChanged
FINAL
)
33
Q_PROPERTY
(
bool
active
READ
isActive
NOTIFY
activeChanged
FINAL
)
34
Q_PROPERTY
(
Interpolation
interpolation
READ
interpolation
WRITE
setInterpolation
NOTIFY
interpolationChanged
FINAL
)
35
36
public
:
37
enum
class
Interpolation
{
38
Any
,
39
Nearest
,
40
Linear
41
};
42
Q_ENUM(Interpolation)
43
44
QGfxSourceProxyME
(QQuickItem *parentItem =
nullptr
);
45
~
QGfxSourceProxyME
();
46
47
QQuickItem
*
input
()
const
{
return
m_input; }
48
void
setInput
(QQuickItem *input);
49
void
resetInput
() { setInput(
nullptr
); }
50
51
QQuickItem
*
output
()
const
{
return
m_output; }
52
53
QRectF
sourceRect
()
const
{
return
m_sourceRect; }
54
void
setSourceRect
(
const
QRectF &sourceRect);
55
56
bool
isActive
()
const
{
return
m_output && m_output != m_input; }
57
58
void
setInterpolation
(Interpolation i);
59
Interpolation
interpolation
()
const
{
return
m_interpolation; }
60
61
protected
:
62
void
updatePolish
()
override
;
63
64
Q_SIGNALS
:
65
void
inputChanged
();
66
void
outputChanged
();
67
void
sourceRectChanged
();
68
void
activeChanged
();
69
void
interpolationChanged
();
70
71
private
Q_SLOTS
:
72
void
repolish
();
73
74
private
:
75
void
setOutput(QQuickItem *output);
76
void
useProxy();
77
static
QObject *findLayer(QQuickItem *);
78
79
QRectF m_sourceRect;
80
QQuickItem *m_input =
nullptr
;
81
QQuickItem *m_output =
nullptr
;
82
QQuickShaderEffectSource *m_proxy =
nullptr
;
83
84
Interpolation m_interpolation =
Interpolation
::
Any
;
85
};
86
87
QT_END_NAMESPACE
88
89
#
endif
// QGFXSOURCEPROXY_P_H
QGfxSourceProxyME
Definition
qgfxsourceproxy_p.h:28
QGfxSourceProxyME::setInterpolation
void setInterpolation(Interpolation i)
Definition
qgfxsourceproxy.cpp:60
QGfxSourceProxyME::isActive
bool isActive() const
Definition
qgfxsourceproxy_p.h:56
QGfxSourceProxyME::output
QQuickItem * output() const
Definition
qgfxsourceproxy_p.h:51
QGfxSourceProxyME::sourceRectChanged
void sourceRectChanged()
QGfxSourceProxyME::updatePolish
void updatePolish() override
This function should perform any layout as required for this item.
Definition
qgfxsourceproxy.cpp:97
QGfxSourceProxyME::activeChanged
void activeChanged()
QGfxSourceProxyME::~QGfxSourceProxyME
~QGfxSourceProxyME()
Definition
qgfxsourceproxy.cpp:18
QGfxSourceProxyME::interpolationChanged
void interpolationChanged()
QGfxSourceProxyME::setInput
void setInput(QQuickItem *input)
Definition
qgfxsourceproxy.cpp:23
QGfxSourceProxyME::setSourceRect
void setSourceRect(const QRectF &sourceRect)
Definition
qgfxsourceproxy.cpp:51
QGfxSourceProxyME::resetInput
void resetInput()
Definition
qgfxsourceproxy_p.h:49
QGfxSourceProxyME::outputChanged
void outputChanged()
QGfxSourceProxyME::interpolation
Interpolation interpolation() const
Definition
qgfxsourceproxy_p.h:59
QGfxSourceProxyME::sourceRect
QRectF sourceRect() const
Definition
qgfxsourceproxy_p.h:53
QGfxSourceProxyME::input
QQuickItem * input() const
Definition
qgfxsourceproxy_p.h:47
QQuickItem
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition
qquickitem.h:64
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
effects
qgfxsourceproxy_p.h
Generated on
for Qt by
1.18.0