mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +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:
@@ -46,7 +46,8 @@ static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
|
||||
*/
|
||||
QETProject::QETProject(QObject *parent) :
|
||||
QObject (parent),
|
||||
m_titleblocks_collection(this)
|
||||
m_titleblocks_collection(this),
|
||||
m_data_base(this, this)
|
||||
{
|
||||
m_elements_collection = new XmlElementCollection(this);
|
||||
init();
|
||||
@@ -60,7 +61,8 @@ QETProject::QETProject(QObject *parent) :
|
||||
*/
|
||||
QETProject::QETProject(const QString &path, QObject *parent) :
|
||||
QObject (parent),
|
||||
m_titleblocks_collection(this)
|
||||
m_titleblocks_collection(this),
|
||||
m_data_base(this, this)
|
||||
{
|
||||
QFile file(path);
|
||||
m_state = openFile(&file);
|
||||
@@ -78,7 +80,8 @@ QETProject::QETProject(const QString &path, QObject *parent) :
|
||||
*/
|
||||
QETProject::QETProject(KAutoSaveFile *backup, QObject *parent) :
|
||||
QObject (parent),
|
||||
m_titleblocks_collection(this)
|
||||
m_titleblocks_collection(this),
|
||||
m_data_base(this, this)
|
||||
{
|
||||
m_state = openFile(backup);
|
||||
//Failed to open from the backup, try to open the crashed
|
||||
@@ -112,6 +115,14 @@ QETProject::~QETProject() {
|
||||
qDeleteAll(m_diagrams_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETProject::dataBase
|
||||
* @return The data base of this project
|
||||
*/
|
||||
projectDataBase *QETProject::dataBase() {
|
||||
return &m_data_base;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETProject::uuid
|
||||
* @return the uuid of this project
|
||||
|
||||
Reference in New Issue
Block a user