blob: c33acb8fc1be608c562d3f2fb422e09668f776f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QSGFLATCOLORMATERIAL_H
#define QSGFLATCOLORMATERIAL_H
#include <QtQuick/qsgmaterial.h>
#include <QtGui/qcolor.h>
QT_BEGIN_NAMESPACE
class Q_QUICK_EXPORT QSGFlatColorMaterial : public QSGMaterial
{
public:
QSGFlatColorMaterial();
QSGMaterialType *type() const override;
QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override;
void setColor(const QColor &color);
const QColor &color() const { return m_color; }
int compare(const QSGMaterial *other) const override;
private:
QColor m_color;
};
QT_END_NAMESPACE
#endif // FLATCOLORMATERIAL_H
|