kima2/src/gui/sellermodel.h

30 lines
1.1 KiB
C
Raw Normal View History

2018-07-16 12:00:17 +02:00
#ifndef SELLER_MODEL_H
#define SELLER_MODEL_H
#include <marketplace.h>
#include <QAbstractTableModel>
class SellerModel : public QAbstractTableModel
{
Q_OBJECT
2018-07-16 12:00:17 +02:00
public:
2018-07-16 18:04:25 +02:00
explicit SellerModel(Marketplace* market, QObject* parent = nullptr);
2018-07-16 12:00:17 +02:00
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;
2018-07-16 15:30:24 +02:00
virtual Qt::ItemFlags flags(const QModelIndex& index) const override;
2018-07-20 11:52:26 +02:00
virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
2018-07-16 18:04:25 +02:00
virtual bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
2018-07-17 15:32:16 +02:00
virtual bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
2018-07-16 12:00:17 +02:00
signals:
void duplicateSellerNo(const QString& message);
2018-07-16 12:00:17 +02:00
private:
2018-07-16 18:04:25 +02:00
Marketplace* marketplace_;
2018-07-16 12:00:17 +02:00
};
#endif