kima2/src/gui/sellermodel.h
2018-07-20 11:52:26 +02:00

30 lines
No EOL
1.1 KiB
C++

#ifndef SELLER_MODEL_H
#define SELLER_MODEL_H
#include <marketplace.h>
#include <QAbstractTableModel>
class SellerModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit SellerModel(Marketplace* market, QObject* parent = nullptr);
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override;
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
virtual Qt::ItemFlags flags(const QModelIndex& index) const override;
virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
virtual bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
virtual bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
signals:
void duplicateSellerNo(const QString& message);
private:
Marketplace* marketplace_;
};
#endif