pgLab/pglab/HorizontalProxyModel.h
eelke 3080523b0d First step in using HorizontalProxyModel to show selected row in properties table.
HorizontalProxyModel now inherits from QIdentityProxyModel which provides a more complete base implementation (maybe to much?)
for now it seems to do what we want, forward relevant signals which the abstract base didn't.
Issues: Properties table needs formatting and shows all rows as columns instead of values of a single row.
2018-08-26 07:11:46 +02:00

18 lines
711 B
C++

#ifndef HORIZONTALPROXYMODEL_H
#define HORIZONTALPROXYMODEL_H
#include <QIdentityProxyModel>
class HorizontalProxyModel : public QIdentityProxyModel {
public:
HorizontalProxyModel(QObject * parent = nullptr);
QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
};
#endif // HORIZONTALPROXYMODEL_H