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
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
23
25
27{
32 Q_PROPERTY(bool active READ isActive NOTIFY activeChanged FINAL)
34
35public:
36 enum class Interpolation {
37 Any,
38 Nearest,
39 Linear
40 };
42
45
46 QQuickItem *input() const { return m_input; }
48 void resetInput() { setInput(nullptr); }
49
50 QQuickItem *output() const { return m_output; }
51
52 QRectF sourceRect() const { return m_sourceRect; }
53 void setSourceRect(const QRectF &sourceRect);
54
55 bool isActive() const { return m_output && m_output != m_input; }
56
58 Interpolation interpolation() const { return m_interpolation; }
59
60protected:
61 void updatePolish() override;
62
69
70private Q_SLOTS:
71 void repolish();
72
73private:
74 void setOutput(QQuickItem *output);
75 void useProxy();
76 static QObject *findLayer(QQuickItem *);
77
78 QRectF m_sourceRect;
79 QQuickItem *m_input = nullptr;
80 QQuickItem *m_output = nullptr;
81 QQuickShaderEffectSource *m_proxy = nullptr;
82
83 Interpolation m_interpolation = Interpolation::Any;
84};
85
87
88#endif // QGFXSOURCEPROXY_P_H
void setSourceRect(const QRectF &sourceRect)
Interpolation interpolation
QQuickItem * output() const
Interpolation interpolation() const
void setInput(QQuickItem *input)
bool isActive() const
QRectF sourceRect() const
void sourceRectChanged()
QGfxSourceProxy(QQuickItem *parentItem=nullptr)
void interpolationChanged()
QQuickItem * input() const
QQuickItem * output
void activeChanged()
void setInterpolation(Interpolation i)
void outputChanged()
void updatePolish() override
This function should perform any layout as required for this item.
\inmodule QtCore
Definition qobject.h:103
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
QQuickItem * parentItem() const
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
GLenum GLenum GLenum input
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS