WIP: Added page showing list of functions.
Only list is shown, still working on details.
This commit is contained in:
parent
7db859737a
commit
840af1e0a9
19 changed files with 635 additions and 92 deletions
|
|
@ -92,32 +92,19 @@ void TablesTableModel::doSort(int )
|
|||
|
||||
QVariant TablesTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
QVariant v;
|
||||
if (orientation == Qt::Horizontal) {
|
||||
if (role == Qt::DisplayRole) {
|
||||
switch (section) {
|
||||
case NameCol:
|
||||
v = tr("Name");
|
||||
break;
|
||||
case NamespaceCol:
|
||||
v = tr("Schema");
|
||||
break;
|
||||
case OwnerCol:
|
||||
v = tr("Owner");
|
||||
break;
|
||||
case TablespaceCol:
|
||||
v = tr("Tablespace");
|
||||
break;
|
||||
case OptionsCol:
|
||||
v = tr("Options");
|
||||
break;
|
||||
// case AclCol:
|
||||
// v = tr("ACL");
|
||||
// break;
|
||||
case NameCol: return tr("Name");
|
||||
case NamespaceCol: return tr("Schema");
|
||||
case OwnerCol: return tr("Owner");
|
||||
case TablespaceCol: return tr("Tablespace");
|
||||
case OptionsCol: return tr("Options");
|
||||
case AclCol: return tr("ACL");
|
||||
}
|
||||
}
|
||||
}
|
||||
return v;
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
// Basic functionality:
|
||||
|
|
@ -140,7 +127,7 @@ Oid TablesTableModel::getType(int column) const
|
|||
case NameCol:
|
||||
case NamespaceCol:
|
||||
case OptionsCol:
|
||||
// case AclCol:
|
||||
case AclCol:
|
||||
default:
|
||||
oid = Pgsql::varchar_oid;
|
||||
}
|
||||
|
|
@ -149,30 +136,17 @@ Oid TablesTableModel::getType(int column) const
|
|||
|
||||
QVariant TablesTableModel::getData(const QModelIndex &index) const
|
||||
{
|
||||
QVariant v;
|
||||
const auto &t = m_tables[index.row()];
|
||||
switch (index.column()) {
|
||||
case NameCol:
|
||||
v = t.name; //formatTableName(t);
|
||||
break;
|
||||
case NamespaceCol:
|
||||
v = getNamespaceDisplayString(*m_catalog, t.relnamespace);
|
||||
break;
|
||||
case OwnerCol:
|
||||
v = getRoleDisplayString(*m_catalog, t.owner);
|
||||
break;
|
||||
case TablespaceCol:
|
||||
v = getTablespaceDisplayString(*m_catalog, t.tablespace);
|
||||
break;
|
||||
case OptionsCol:
|
||||
//v = t.options;
|
||||
break;
|
||||
// case AclCol:
|
||||
// v = t.acl;
|
||||
// break;
|
||||
case NameCol: return t.name; //formatTableName(t);
|
||||
case NamespaceCol: return getNamespaceDisplayString(*m_catalog, t.relnamespace);
|
||||
case OwnerCol: return getRoleDisplayString(*m_catalog, t.owner);
|
||||
case TablespaceCol: return getTablespaceDisplayString(*m_catalog, t.tablespace);
|
||||
case OptionsCol: break;
|
||||
case AclCol: return t.acl;
|
||||
}
|
||||
|
||||
return v;
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
PgClass TablesTableModel::getTable(int row) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue