Kirigami2

shadowedtexturenode.h
1/*
2 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include <QPointer>
10#include <QSGTextureProvider>
11
12#include "shadowedrectanglenode.h"
13#include "shadowedtexturematerial.h"
14
15/**
16 * Scene graph node for a shadowed texture source.
17 *
18 * This node will set up the geometry and materials for a shadowed rectangle,
19 * optionally with rounded corners, using a supplied texture source as the color
20 * for the rectangle.
21 *
22 * \note You must call updateGeometry() after setting properties of this node,
23 * otherwise the node's state will not correctly reflect all the properties.
24 *
25 * \sa ShadowedTexture
26 */
28{
29public:
32
33 void setTextureSource(QSGTextureProvider *source);
34 void preprocess() override;
35
36private:
37 ShadowedRectangleMaterial *createBorderlessMaterial() override;
38 ShadowedBorderRectangleMaterial *createBorderMaterial() override;
39 QSGMaterialType *borderlessMaterialType() override;
40 QSGMaterialType *borderMaterialType() override;
41
42 QPointer<QSGTextureProvider> m_textureSource;
43 QMetaObject::Connection m_textureChangeConnectionHandle;
44};
A material rendering a rectangle with a shadow and a border.
A material rendering a rectangle with a shadow.
Scene graph node for a shadowed rectangle.
Scene graph node for a shadowed texture source.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:52:23 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.