TerminalStripLayoutPattern is now shared

TerminalStripLayoutPattern class is now a shared pointer between all
terminal strip item.
QETProject have now a new class : ProjectPropertiesHandler
the goal of this class is to manage every kind of properties used in the
project, this class will be strongly used in future.
This commit is contained in:
joshua
2023-01-04 22:40:18 +01:00
parent c6739b5bec
commit 4da7f6cd13
13 changed files with 278 additions and 52 deletions

View File

@@ -51,12 +51,18 @@ static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min
QETProject::QETProject(QObject *parent) :
QObject (parent),
m_titleblocks_collection(this),
m_data_base(this, this)
m_data_base(this, this),
m_project_properties_handler{this}
{
setDefaultTitleBlockProperties(TitleBlockProperties::defaultProperties());
m_elements_collection = new XmlElementCollection(this);
init();
init();
}
ProjectPropertiesHandler &QETProject::projectPropertiesHandler()
{
return m_project_properties_handler;
}
/**
@@ -68,7 +74,8 @@ QETProject::QETProject(QObject *parent) :
QETProject::QETProject(const QString &path, QObject *parent) :
QObject (parent),
m_titleblocks_collection(this),
m_data_base(this, this)
m_data_base(this, this),
m_project_properties_handler{this}
{
QFile file(path);
m_state = openFile(&file);
@@ -89,7 +96,8 @@ QETProject::QETProject(const QString &path, QObject *parent) :
QETProject::QETProject(KAutoSaveFile *backup, QObject *parent) :
QObject (parent),
m_titleblocks_collection(this),
m_data_base(this, this)
m_data_base(this, this),
m_project_properties_handler{this}
{
m_state = openFile(backup);
//Failed to open from the backup, try to open the crashed