mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user