Flexible models

This commit is contained in:
Eelke Klein 2018-09-02 10:30:30 +00:00
parent 50cb21b6f9
commit 8b7bbec807
24 changed files with 333 additions and 51 deletions

View file

@ -3,6 +3,7 @@
#include "PgIndexContainer.h"
#include "Pgsql_oids.h"
#include "ScopeGuard.h"
#include "CustomDataRole.h"
void IndexModel::setData(std::shared_ptr<const PgDatabaseCatalog> cat, const PgClass &table)
{
@ -96,7 +97,7 @@ QVariant IndexModel::data(const QModelIndex &index, int role) const
QVariant v;
if (role == Qt::DisplayRole)
v = getData(index);
else if (role == Qt::UserRole)
else if (role == CustomDataTypeRole)
v = getType(index.column());
return v;
}