Added column number to list of columns of table.
This commit is contained in:
parent
31afc6fcbf
commit
f5e9c4b74e
2 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ QVariant ColumnTableModel::headerData(int section, Qt::Orientation orientation,
|
|||
}
|
||||
else {
|
||||
switch (section) {
|
||||
case AttnumCol:
|
||||
c = tr("#");
|
||||
break;
|
||||
case NameCol:
|
||||
c = tr("Name");
|
||||
break;
|
||||
|
|
@ -174,6 +177,9 @@ QVariant ColumnTableModel::getData(const QModelIndex &index) const
|
|||
else {
|
||||
QString s;
|
||||
switch (col) {
|
||||
case AttnumCol:
|
||||
s = QString::asprintf("%d", (int) t.num);
|
||||
break;
|
||||
case NameCol:
|
||||
s = t.name;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class PgAttribute;
|
|||
class ColumnTableModel: public BaseTableModel {
|
||||
public:
|
||||
enum e_Columns : int {
|
||||
AttnumCol,
|
||||
NameCol, ///
|
||||
TypeCol,
|
||||
NullCol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue