File indexing completed on 2024-12-15 03:45:00

0001 /*
0002     SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: MIT
0005 */
0006 
0007 #ifndef KUSERFEEDBACK_CONSOLE_AGGREGATIONEDITORMODEL_H
0008 #define KUSERFEEDBACK_CONSOLE_AGGREGATIONEDITORMODEL_H
0009 
0010 #include <core/product.h>
0011 
0012 #include <QAbstractTableModel>
0013 
0014 namespace KUserFeedback {
0015 namespace Console {
0016 
0017 class AggregationEditorModel : public QAbstractTableModel
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit AggregationEditorModel(QObject *parent = nullptr);
0022     ~AggregationEditorModel() override;
0023 
0024     Product product() const;
0025     void setProduct(const Product &product);
0026 
0027     int columnCount(const QModelIndex & parent) const override;
0028     int rowCount(const QModelIndex & parent) const override;
0029     QVariant data(const QModelIndex & index, int role) const override;
0030     QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
0031     Qt::ItemFlags flags(const QModelIndex & index) const override;
0032     bool setData(const QModelIndex & index, const QVariant & value, int role) override;
0033 
0034 private:
0035     Product m_product;
0036 };
0037 }
0038 }
0039 
0040 #endif // KUSERFEEDBACK_CONSOLE_AGGREGATIONEDITORMODEL_H