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

View file

@ -0,0 +1,41 @@
#ifndef DATABASESTABLEMODEL_H
#define DATABASESTABLEMODEL_H
#include <QAbstractTableModel>
class PgDatabaseContainer;
class PgsqlDatabaseCatalogue;
/** Class for displaying the list of databases of a server in a QTableView
*
*/
class DatabasesTableModel : public QAbstractTableModel
{
Q_OBJECT
public:
enum e_Columns : int { NameCol, DbaCol, EncodingCol, CollateCol,
CTypeCol, IsTemplateCol, AllowConnCol, ConnLimitCol,
TablespaceCol, AclCol };
explicit DatabasesTableModel(QObject *parent);
void setDatabaseList(const PgsqlDatabaseCatalogue* cat);
// Header:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
// Basic functionality:
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:
const PgsqlDatabaseCatalogue *m_catalog = nullptr;
const PgDatabaseContainer *m_databases = nullptr;
};
#endif // DATABASESTABLEMODEL_H