Merge remote-tracking branch 'origin/QetGraphicsTableItem'

This commit is contained in:
Laurent Trinques
2020-04-12 18:51:38 +02:00
parent 41541dde2c
commit 73149973e3
38 changed files with 3232 additions and 528 deletions

View File

@@ -45,7 +45,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)
{
setDefaultTitleBlockProperties(TitleBlockProperties::defaultProperties());
@@ -61,7 +62,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);
@@ -79,7 +81,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
@@ -113,6 +116,22 @@ 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
*/
QUuid QETProject::uuid() const {
return m_uuid;
}
/**
* @brief QETProject::init
*/