QETProject have is own database + add widget to edit nomenclature model

QETProject have is own ProjectDataBase, then when the database is
updated, everything that need the database is also updated trough the
signal emitted by the database.
Begin a widget to edit the NomenclatureModel
This commit is contained in:
Claveau Joshua
2020-03-29 18:17:27 +02:00
parent 66abfbe180
commit 8819146a01
16 changed files with 764 additions and 423 deletions

View File

@@ -75,6 +75,20 @@ QVector<QStringList> projectDataBase::elementsInfoFromQuery(const QString &query
return result_;
}
/**
* @brief projectDataBase::updateDB
* Up to date the content of the data base.
* Except at the creation of this class,
* call this method each time you want to query the data base
* to be sure that the content reflect the current state of the project.
* Emit the singal dataBaseUpdated
*/
void projectDataBase::updateDB()
{
populateElementsTable();
emit dataBaseUpdated();
}
/**
* @brief projectDataBase::createDataBase
* Create the data base
@@ -114,8 +128,7 @@ bool projectDataBase::createDataBase()
query_.exec();
}
populateElementsTable();
updateDB();
return true;
}