2023-06-29 15:06:11 +03:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
|
|
|
|
#include "effectmakermodel.h"
|
|
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
EffectMakerModel::EffectMakerModel(QObject *parent)
|
|
|
|
|
: QAbstractListModel{parent}
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QHash<int, QByteArray> EffectMakerModel::roleNames() const
|
|
|
|
|
{
|
|
|
|
|
QHash<int, QByteArray> roles;
|
|
|
|
|
roles[CategoryRole] = "categoryName";
|
|
|
|
|
roles[EffectsRole] = "effectNames";
|
|
|
|
|
return roles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int EffectMakerModel::rowCount(const QModelIndex &parent) const
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(parent)
|
|
|
|
|
|
|
|
|
|
return m_categories.count();
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-11 17:18:01 +03:00
|
|
|
QVariant EffectMakerModel::data(const QModelIndex &index, int /*role*/) const
|
2023-06-29 15:06:11 +03:00
|
|
|
{
|
|
|
|
|
if (index.row() < 0 || index.row() >= m_categories.count())
|
|
|
|
|
return {};
|
|
|
|
|
|
2023-08-11 17:18:01 +03:00
|
|
|
// TODO
|
2023-06-29 15:06:11 +03:00
|
|
|
|
|
|
|
|
return {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EffectMakerModel::resetModel()
|
|
|
|
|
{
|
|
|
|
|
beginResetModel();
|
|
|
|
|
endResetModel();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EffectMakerModel::selectEffect(int idx, bool force)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(idx)
|
|
|
|
|
Q_UNUSED(force)
|
|
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EffectMakerModel::applyToSelected(qint64 internalId, bool add)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(internalId)
|
|
|
|
|
Q_UNUSED(add)
|
|
|
|
|
|
|
|
|
|
// TODO: remove?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace QmlDesigner
|