Show more information on the fields of a table in the DB Structure view

In the Database Structure tab of the main window and the DB Schema
pane, show more information in the field nodes of the tree view. This
commit puts the field definition in the Schema column which has been
unsused until now. It also changes the icon of the field row when the
field is a primary key. This hopefully makes the Schema view a bit more
useful, especially in the pane.
This commit is contained in:
Martin Kleusberg
2014-10-17 15:24:13 +02:00
parent 9304b4013f
commit 7b6bee11e5
3 changed files with 6 additions and 1 deletions

View File

@@ -175,7 +175,11 @@ void DbStructureModel::reloadData(DBBrowserDB* db)
fldItem->setText(0, (*it).table.fields().at(i)->name());
fldItem->setText(1, "field");
fldItem->setText(2, (*it).table.fields().at(i)->type());
fldItem->setIcon(0, QIcon(":/icons/field"));
fldItem->setText(3, (*it).table.fields().at(i)->toString(" ", " "));
if((*it).table.fields().at(i)->primaryKey())
fldItem->setIcon(0, QIcon(":/icons/field_key"));
else
fldItem->setIcon(0, QIcon(":/icons/field"));
}
}
}