Files
qt-creator/src/plugins/qmldesigner/components/effectmaker/effectmakeruniformsmodel.h

42 lines
917 B
C
Raw Normal View History

// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <QStandardItemModel>
namespace QmlDesigner {
class Uniform;
class EffectMakerUniformsModel : public QAbstractListModel
{
Q_OBJECT
public:
EffectMakerUniformsModel(QObject *parent = nullptr);
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void resetModel();
void addUniform(Uniform *uniform);
private:
enum Roles {
NameRole = Qt::UserRole + 1,
DescriptionRole,
ValueRole,
DefaultValueRole,
MaxValueRole,
MinValueRole,
TypeRole,
};
QList<Uniform *> m_uniforms;
};
} // namespace QmlDesigner