Switching to linux for development of pglab.

Switched from qmake to cmake. Code changes to make it compile.
This commit is contained in:
Eelke Klein 2017-08-23 08:10:01 +02:00
parent dd9906dbd8
commit 04723a289b
142 changed files with 124 additions and 83 deletions

23
pglab/QueryResultModel.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef QUERYRESULTMODEL_H
#define QUERYRESULTMODEL_H
#include <QAbstractTableModel>
#include "PgsqlConn.h"
class QueryResultModel : public QAbstractTableModel
{
Q_OBJECT
public:
QueryResultModel(QObject *parent, std::shared_ptr<Pgsql::Result> r);
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;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
// virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
private:
std::shared_ptr<Pgsql::Result> result;
};
#endif // QUERYRESULTMODEL_H