refs #525, specialized model class for DB entities and improved funtions in view base class

* will allow to highlight entities
* nested custom menus
* moved displayAutomatically() menus in view base class
* fixed which menus are displayed for aircraft models
* also changed to QStandardItem model to see if this is causing any trouble (the real bigger changes will follow in #530)
This commit is contained in:
Klaus Basan
2015-12-02 01:29:20 +01:00
parent 88f14f150d
commit 8e852b19ae
11 changed files with 362 additions and 108 deletions

View File

@@ -21,7 +21,7 @@ namespace BlackGui
namespace Models
{
CAircraftModelListModel::CAircraftModelListModel(AircraftModelMode mode, QObject *parent) :
CListModelBase("CAircraftModelListModel", parent)
CModelsWithDbKeysBase("CAircraftModelListModel", parent)
{
this->setAircraftModelMode(mode);
@@ -40,6 +40,7 @@ namespace BlackGui
{
case NotSet:
case OwnSimulatorModel:
case StashModel:
this->m_columns.addColumn(CColumn::standardString("model", { CAircraftModel::IndexModelString}));
this->m_columns.addColumn(CColumn::standardString("description", { CAircraftModel::IndexDescription}));
this->m_columns.addColumn(CColumn::standardString("name", { CAircraftModel::IndexName}));