Implementing default Radar Product Model methods

This commit is contained in:
Dan Paulat 2022-09-17 00:31:22 -05:00
parent 8abee4cda1
commit b917e1a818
4 changed files with 33 additions and 4 deletions

View file

@ -15,8 +15,7 @@ class RadarProductModelImpl
{
public:
explicit RadarProductModelImpl() {}
~RadarProductModelImpl() {}
~RadarProductModelImpl() = default;
};
RadarProductModel::RadarProductModel(QObject* parent) :
@ -25,6 +24,22 @@ RadarProductModel::RadarProductModel(QObject* parent) :
}
RadarProductModel::~RadarProductModel() = default;
int RadarProductModel::rowCount(const QModelIndex& /*parent*/) const
{
return 0;
}
int RadarProductModel::columnCount(const QModelIndex& /*parent*/) const
{
return 0;
}
QVariant RadarProductModel::data(const QModelIndex& /*index*/,
int /*role*/) const
{
return QVariant();
}
} // namespace model
} // namespace qt
} // namespace scwx

View file

@ -13,12 +13,17 @@ namespace model
class RadarProductModelImpl;
class RadarProductModel : QAbstractTableModel
class RadarProductModel : public QAbstractTableModel
{
public:
explicit RadarProductModel(QObject* parent = nullptr);
~RadarProductModel();
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index,
int role = Qt::DisplayRole) const override;
private:
std::unique_ptr<RadarProductModelImpl> p;
};