36 #include <QStandardPaths> 38 #include <KAutoSaveFile> 49 m_titleblocks_collection(this)
63 m_titleblocks_collection(this)
67 if (
m_state != ProjectState::Ok) {
81 m_titleblocks_collection(this)
85 if (
m_state != ProjectState::Ok)
87 QFile file(backup->managedFile().path());
91 backup->open(QIODevice::ReadWrite);
132 int autosave_interval = settings.value(
"diagrameditor/autosave-interval", 0).toInt();
133 if(autosave_interval > 0)
135 int ms = autosave_interval*60*1000;
153 bool opened_here = file->isOpen() ? false :
true;
154 if (!file->isOpen() && !file->open(QIODevice::ReadOnly | QIODevice::Text)) {
161 QDomDocument xml_project;
162 if (!xml_project.setContent(file))
173 if (!fi.isWritable()) {
179 return ProjectState::Ok;
267 m_backup_file =
new KAutoSaveFile(QUrl::fromLocalFile(filepath),
this);
275 if (fi.isWritable()) {
298 QString current_directory;
300 current_directory = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
302 current_directory = QFileInfo(
m_file_path).absoluteDir().absolutePath();
304 return(current_directory);
320 final_title = QString(
323 "displayed title for a ProjectView - %1 is the project title, -%2 is the project path" 327 final_title = QString(
330 "displayed title for a title-less project - %1 is the file name" 334 final_title = QString(
337 "displayed title for a project-less, file-less project" 343 final_title = QString(
345 "%1 [lecture seule]",
346 "displayed title for a read-only project - %1 is a displayable title" 351 final_title = QString(
354 "displayed title for a modified project - %1 is a displayable title" 685 for (
int i = from; i <= to; i++) {
697 for (
int i = from; i <= to; i++) {
725 for (
int i = from; i <= to; i++) {
737 for (
int i = from; i <= to; i++) {
797 for (
int i=from; i<=to; i++) {
813 QDomDocument xml_doc;
814 QDomElement project_root = xml_doc.createElement(
"project");
820 xml_doc.appendChild(project_root);
824 QDomElement titleblocktemplates_elmt = xml_doc.createElement(
"titleblocktemplates");
827 titleblocktemplates_elmt.appendChild(xml_doc.importNode(e,
true));
829 project_root.appendChild(titleblocktemplates_elmt);
833 QDomElement project_properties = xml_doc.createElement(
"properties");
835 project_root.appendChild(project_properties);
838 QDomElement new_diagrams_properties = xml_doc.createElement(
"newdiagrams");
840 project_root.appendChild(new_diagrams_properties);
847 for(
Diagram *diagram : diagrams_list)
853 qDebug() << qPrintable(QString(
"QETProject::toXml() : exporting diagram \"%1\"").arg(diagram ->
title())) <<
"[" << diagram <<
"]";
854 QDomElement xml_diagram = diagram->
toXml().documentElement();
855 QDomNode xml_node = xml_doc.importNode(xml_diagram,
true);
857 QDomNode appended_diagram = project_root.appendChild(xml_node);
858 appended_diagram.toElement().setAttribute(
"order", order_num ++);
886 return(QString(
"unable to save project to file: no filepath was specified"));
890 return(QString(
"the file %1 was opened read-only and thus will not be written").arg(
m_file_path));
893 QDomDocument xml_project;
894 xml_project.appendChild(xml_project.importNode(
toXml().documentElement(),
true));
896 QString error_message;
948 int pertinent_diagrams = 0;
950 if (!diagram ->
isEmpty()) ++ pertinent_diagrams;
953 return(pertinent_diagrams > 0);
975 if (location.
project() ==
this) {
987 if (existing_location.
uuid() == location.
uuid()) {
988 return existing_location;
992 if (ied.exec() == QDialog::Accepted) {
997 return existing_location;
1008 QString name_ = existing_location.
fileName();
1009 name_.remove(
".elmt");
1015 QString new_path = parent_path +
"/" + name_ + QString::number(a) +
".elmt";
1017 }
while (loc.
exist());
1035 qDebug() <<
"QETProject::importElement : failed to import location. " << location;
1056 QString target_name = dst_tbt.
name();
1059 QET::Action action = handler -> templateAlreadyExists(src_tbt, dst_tbt);
1067 target_name = handler -> nameForRenamingOperation();
1069 return(target_name);
1075 handler -> errorWithATemplate(src_tbt,
tr(
"Une erreur s'est produite durant l'intégration du modèle.",
"error message"));
1076 target_name = QString();
1078 return(target_name);
1106 QList <ElementsLocation> unused_list;
1110 unused_list << location;
1159 QList <Diagram *> diagram_list;
1167 for (
int i = 0; i <= diagCount/29; i++) {
1177 diagram_folio_list -> border_and_titleblock.setTitle(
tr(
"Liste des Folios"));
1179 diagram_folio_list -> border_and_titleblock.displayRows(
false);
1180 diagram_folio_list -> border_and_titleblock.displayColumns(
false);
1185 diagram_list << diagram_folio_list;
1190 return(diagram_list);
1219 if (old_index < 0 || new_index < 0)
return;
1222 if (old_index > diagram_max_index || new_index > diagram_max_index)
return;
1248 QDomElement root_elmt = xml_project.documentElement();
1252 if (root_elmt.tagName() ==
"project")
1255 if (root_elmt.hasAttribute(
"version"))
1264 tr(
"Avertissement",
"message box title"),
1266 "Ce document semble avoir été enregistré avec " 1267 "une version ultérieure de QElectroTech. Il est " 1268 "possible que l'ouverture de tout ou partie de ce " 1269 "document échoue.\n" 1270 "Que désirez vous faire ?",
1271 "message box content" 1283 setTitle(root_elmt.attribute(
"title"));
1303 if (root_elmt.attribute(
"folioSheetQuantity",
"0").toInt())
1317 QMultiMap<int, Diagram *> loaded_diagrams;
1325 dlgWaiting -> setModal(
true);
1326 dlgWaiting -> show();
1327 dlgWaiting ->
setTitle(
tr(
"<p align=\"center\">" 1328 "<b>Ouverture du projet en cours...</b><br/>" 1329 "Création des folios" 1334 QDomNodeList diagram_nodes = xml_project.elementsByTagName(
"diagram");
1339 for (
int i = 0 ; i < diagram_nodes.length() ; ++ i)
1344 if (diagram_nodes.at(i).isElement())
1346 QDomElement diagram_xml_element = diagram_nodes.at(i).toElement();
1348 bool diagram_loading = diagram -> initFromXml(diagram_xml_element);
1349 if (diagram_loading)
1355 int diagram_order = -1;
1357 loaded_diagrams.insert(diagram_order, diagram);
1367 foreach(
Diagram *diagram, loaded_diagrams.values())
1374 dlgWaiting->
setTitle(
tr(
"<p align=\"center\">" 1375 "<b>Ouverture du projet en cours...</b><br/>" 1376 "Mise en place des références croisées" 1386 d->refreshContents();
1398 QDomNodeList collection_roots = xml_project.elementsByTagName(
"collection");
1399 QDomElement collection_root;
1401 if (!collection_roots.isEmpty())
1404 collection_root = collection_roots.at(0).toElement();
1407 if (collection_root.isNull()) {
1436 QDomNodeList newdiagrams_nodes = xml_project.elementsByTagName(
"newdiagrams");
1437 if (newdiagrams_nodes.isEmpty())
return;
1439 QDomElement newdiagrams_elmt = newdiagrams_nodes.at(0).toElement();
1449 QDomElement border_elmt, titleblock_elmt, conductors_elmt, report_elmt, xref_elmt, conds_autonums, folio_autonums, element_autonums;
1451 for (QDomNode child = newdiagrams_elmt.firstChild() ; !child.isNull() ; child = child.nextSibling())
1453 QDomElement child_elmt = child.toElement();
1454 if (child_elmt.isNull())
continue;
1456 if (child_elmt.tagName() ==
"border")
1457 border_elmt = child_elmt;
1458 else if (child_elmt.tagName() ==
"inset")
1459 titleblock_elmt = child_elmt;
1460 else if (child_elmt.tagName() ==
"conductors")
1461 conductors_elmt = child_elmt;
1462 else if (child_elmt.tagName() ==
"report")
1463 report_elmt = child_elmt;
1464 else if (child_elmt.tagName() ==
"xrefs")
1465 xref_elmt = child_elmt;
1466 else if (child_elmt.tagName() ==
"conductors_autonums")
1467 conds_autonums = child_elmt;
1468 else if (child_elmt.tagName()==
"folio_autonums")
1469 folio_autonums = child_elmt;
1470 else if (child_elmt.tagName()==
"element_autonums")
1471 element_autonums = child_elmt;
1479 if (!xref_elmt.isNull())
1488 if (!conds_autonums.isNull())
1499 if (!folio_autonums.isNull())
1508 if (!element_autonums.isNull())
1539 QDomDocument xml_document = xml_element.ownerDocument();
1542 QDomElement border_elmt = xml_document.createElement(
"border");
1544 xml_element.appendChild(border_elmt);
1547 QDomElement titleblock_elmt = xml_document.createElement(
"inset");
1549 xml_element.appendChild(titleblock_elmt);
1552 QDomElement conductor_elmt = xml_document.createElement(
"conductors");
1554 xml_element.appendChild(conductor_elmt);
1557 QDomElement report_elmt = xml_document.createElement(
"report");
1559 xml_element.appendChild(report_elmt);
1562 QDomElement xrefs_elmt = xml_document.createElement(
"xrefs");
1564 QDomElement xref_elmt = xml_document.createElement(
"xref");
1565 xref_elmt.setAttribute(
"type", key);
1567 xrefs_elmt.appendChild(xref_elmt);
1569 xml_element.appendChild(xrefs_elmt);
1572 QDomElement conductor_autonums = xml_document.createElement(
"conductors_autonums");
1576 QDomElement conductor_autonum =
conductorAutoNum(key).toXml(xml_document,
"conductor_autonum");
1578 conductor_autonum.setAttribute(
"title", key);
1580 conductor_autonums.appendChild(conductor_autonum);
1583 xml_element.appendChild(conductor_autonums);
1586 QDomElement folio_autonums = xml_document.createElement(
"folio_autonums");
1588 QDomElement folio_autonum =
folioAutoNum(key).toXml(xml_document,
"folio_autonum");
1589 folio_autonum.setAttribute(
"title", key);
1590 folio_autonums.appendChild(folio_autonum);
1592 xml_element.appendChild(folio_autonums);
1595 QDomElement element_autonums = xml_document.createElement(
"element_autonums");
1599 QDomElement element_autonum =
elementAutoNum(key).toXml(xml_document,
"element_autonum");
1601 element_autonum.setAttribute(
"title", key);
1603 element_autonums.appendChild(element_autonum);
1606 xml_element.appendChild(element_autonums);
1620 if (!diagram)
return;
1623 diagram -> setProject(
this);
1626 &(diagram -> border_and_titleblock),
1627 SIGNAL(needFolioData()),
1650 const QChar russian_data[24] = { 0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440, 0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020, 0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B };
1651 const QChar greek_data[18] = { 0x0395, 0x03b9, 0x03c3, 0x03b7, 0x03b3, 0x03bc, 0x03ad, 0x03bd, 0x03b1, 0x0020, 0x03c3, 0x03c4, 0x03bf, 0x03b9, 0x03c7, 0x03b5, 0x03af, 0x03b1 };
1653 names.
addName(
"fr",
"Éléments importés");
1654 names.
addName(
"en",
"Imported elements");
1655 names.
addName(
"de",
"Importierte elemente");
1656 names.
addName(
"es",
"Elementos importados");
1657 names.
addName(
"ru", QString(russian_data, 24));
1658 names.
addName(
"cs",
"Zavedené prvky");
1659 names.
addName(
"pl",
"Elementy importowane");
1660 names.
addName(
"pt",
"elementos importados");
1661 names.
addName(
"it",
"Elementi importati");
1662 names.
addName(
"el", QString(greek_data, 18));
1663 names.
addName(
"nl",
"Elementen geïmporteerd");
1664 names.
addName(
"hr",
"Uvezeni elementi");
1665 names.
addName(
"ca",
"Elements importats");
1666 names.
addName(
"ro",
"Elemente importate");
1682 QDomDocument xml_project;
1683 xml_project.appendChild(xml_project.importNode(
toXml().documentElement(),
true));
1743 project_wide_properties.
addValue(
"projectfilename", QFileInfo(
filePath()).baseName());
1745 for (
int i = 0 ; i < total_folio ; ++ i)
1747 QString autopagenum =
m_diagrams_list[i]->border_and_titleblock.autoPageNum();
1751 if ((
m_diagrams_list[i]->border_and_titleblock.folio().contains(
"%autonum")) &&
1752 (!autopagenum.isNull()))
1758 m_diagrams_list[i] -> border_and_titleblock.setFolioData(i + 1, total_folio,
nullptr, project_wide_properties);
1766 if (i == total_folio-1) {
1767 m_diagrams_list.at(i)->border_and_titleblock.setNextFolioNum(QString());
1771 m_diagrams_list.at(i)->border_and_titleblock.setPreviousFolioNum(QString());
1786 Q_UNUSED(collection)
1789 diagram -> titleBlockTemplateChanged(template_name);
1799 Q_UNUSED(collection)
1803 diagram -> titleBlockTemplateRemoved(template_name);
abort the whole operation, ignoring the curent item
static TitleBlockTemplatesFilesCollection * commonTitleBlockTemplatesCollection()
ProjectState m_state
Current state of the project.
bool autoConductor() const
void setProgressBar(int val)
DialogWaiting::setProgressBar.
ElementsLocation importElement(ElementsLocation &location)
QETProject::importElement Import the element represented by to the embbeded collection of this proje...
void setTitle(const QString &val)
DialogWaiting::setTitle of action.
static ConductorProperties defaultProperties()
ConductorProperties::defaultProperties.
QString conductorCurrentAutoNum() const
QETProject::conductorCurrentAutoNum.
bool m_freeze_new_elements
bool attributeIsAnInteger(const QDomElement &, const QString &, int *=nullptr)
void setTitle(const QString &)
QString projectCollectionPath() const
ElementsLocation::projectCollectionPath.
static int BACKUP_INTERVAL
QList< Diagram * > m_diagrams_list
Diagrams carried by the project.
bool m_read_only
Whether the project is read only.
QList< Diagram * > diagrams() const
TitleBlockProperties defaultTitleBlockProperties() const
int m_folio_sheets_quantity
Folio List Sheets quantity for this project.
void usedTitleBlockTemplateChanged(const QString &)
ConductorProperties defaultConductorProperties() const
QList< ElementsLocation > unusedElements() const
QETProject::unusedElements.
bool isProject() const
ElementsLocation::isProject.
void addFolioAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addFolioAutoNum Add a new folio numerotation context. If key already exist, replace old context by the new context.
void removeDiagramsTitleBlockTemplate(TitleBlockTemplatesCollection *, const QString &)
void setDefaultTitleBlockProperties(const TitleBlockProperties &)
QETProject::setDefaultTitleBlockProperties Specify the title block to be used at the creation of a ne...
ElementsLocation copy(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString(), bool deep_copy=true)
XmlElementCollection::copy Copy the content represented by source (an element or a directory) to dest...
void changed(TitleBlockTemplatesCollection *, const QString &=QString())
From an embedded collection (a project for exemple)
void setDetail(const QString &val)
DialogWaiting::setDetail of action.
void removeConductorAutoNum(const QString &key)
QETProject::removeConductorAutoNum Remove Conductor Numerotation Context stored with key...
void autoFolioNumberingSelectedFolios(int, int, const QString &)
QETProject::autoFolioNumberingNewFolios.
void writeDefaultPropertiesXml(QDomElement &)
QETProject::writeDefaultPropertiesXml Export all defaults properties used by a new diagram and his co...
QHash< QString, NumerotationContext > conductorAutoNum() const
QETProject::conductorAutoNum.
bool isFreezeNewConductors()
QETProject::isFreezeNewConductors.
void setCurrrentElementAutonum(QString autoNum)
QETProject::setCurrrentElementAutonum.
QString m_file_path
File path this project is saved to.
The XRefProperties class this class store properties used by XrefItem.
bool isFileSystem() const
ElementsLocation::isFileSystem.
void diagramUsedTemplate(TitleBlockTemplatesCollection *, const QString &)
void freezeNewElementLabel(bool freeze, int from, int to)
QETProject::freezeNewElementLabel Freeze New Elements in the selected folios.
NumerotationContext next()
NumerotationContextCommands::next.
QHash< QString, NumerotationContext > m_folio_autonum
Folio auto numbering.
void projectInformationsChanged(QETProject *)
void fromXml(QDomElement &)
NumerotationContext::fromXml load numerotation context from .
void removeElementAutoNum(const QString &key)
QETProject::removeElementAutonum Remove Element Numerotation Context stored with key.
KAutoSaveFile * m_backup_file
void toXml(QDomElement &) const
ConductorProperties::toXml Export conductor propertie, in the XML element 'e'.
void setDefaultReportProperties(const QString &properties)
void undoStackChanged(bool a)
void writeProjectPropertiesXml(QDomElement &)
void autoFolioNumberingNewFolios()
QETProject::autoFolioNumberingNewFolios emit Signal to add new Diagram with autonum properties...
void toXml(QDomElement &) const
void addDiagram(Diagram *)
QETProject::addDiagram Add a diagram in this project.
void setProjectProperties(const DiagramContext &)
QDomElement getTemplateXmlDescription() const
QString fileName() const
ElementLocation::fileName.
void toXml(QDomElement &) const
TitleBlockProperties default_titleblock_properties_
Default title block properties for new diagrams created within the project.
static bool hasInstance()
QString m_current_conductor_autonum
void readProjectPropertiesXml(QDomDocument &xml_project)
QETProject::readProjectPropertiesXml Load project properties from the XML description of the project...
QHash< QString, NumerotationContext > folioAutoNum() const
QETProject::folioAutoNum.
void removeFolioAutoNum(const QString &key)
QETProject::removeFolioAutonum Remove Folio Numerotation Context stored with key. ...
QETResult write()
QETProject::write Save the project in a file.
QDomElement root() const
XmlElementCollection::root The root is the first DOM-Element the xml collection, the tag name of the ...
void setFilePath(const QString &)
QETProject::setFilePath Set the filepath of this project file Set a file path also create a backup fi...
void updateDiagramsTitleBlockTemplate(TitleBlockTemplatesCollection *, const QString &)
void fromXml(QDomElement &)
ConductorProperties::fromXml Import conductor propertie, from the attribute of the xml element 'e'...
void setCurrentConductorAutoNum(QString autoNum)
QETProject::setCurrentConductorAutoNum.
QString numerotationContextToFormula(const NumerotationContext &nc)
numerotationContextToFormula
void reportPropertiesChanged(const QString &old_str, const QString &new_str)
~QETProject() override
QETProject::~QETProject Destructor.
bool addValue(const QString &, const QVariant &, bool show=true)
QET::Action action() const
int folioIndex(const Diagram *) const
set the folio sheets quantity for this project
void addName(const QString &, const QString &)
XmlElementCollection * m_elements_collection
void aboutToRemove(TitleBlockTemplatesCollection *, const QString &)
int getFolioSheetsQuantity() const
ConductorProperties default_conductor_properties_
Default conductor properties for new diagrams created within the project.
QDomDocument toXml(bool=true)
the target has to be renamed
void diagramAdded(QETProject *, Diagram *)
XmlElementCollection * embeddedElementCollection() const
QETProject::embeddedCollection.
Erase the target content.
const QString version
QElectroTech version (as string, used to mark projects and elements XML documents) ...
void readProjectXml(QDomDocument &xml_project)
QETProject::readProjectXml Read and make the project from an xml description.
static QHash< QString, XRefProperties > defaultProperties()
XRefProperties::defaultProperties.
bool m_freeze_new_conductors
void setDefaultBorderProperties(const BorderProperties &)
bool exist(const QString &path) const
XmlElementCollection::exist Return true if the path exist in this collection.
QString pathNameTitle() const
QString read_only_file_path_
Filepath for which this project is considered read only.
void setFolioSheetsQuantity(int)
get the folio sheets quantity for this project
void fromXml(const QDomElement &)
static TitleBlockTemplatesFilesCollection * customTitleBlockTemplatesCollection()
qreal m_project_qet_version
QElectroTech version declared in the XML document at opening time.
void diagramOrderChanged(int, int)
void fromXml(const QDomElement &, const QString &="property")
void projectFilePathChanged(QETProject *, const QString &)
DiagramContext projectProperties()
QUuid uuid() const
ElementsLocation::uuid.
QList< ElementsLocation > elementsLocation(QDomElement dom_element=QDomElement(), bool childs=true) const
XmlElementCollection::elementsLocation Return all locations stored in dom_element (element and direct...
BorderProperties defaultBorderProperties() const
DEFAULT PROPERTIES.
QString defaultReportProperties() const
QString elementAutoNumCurrentFormula() const
QETProject::elementAutoNumCurrentFormula.
QHash< QString, XRefProperties > defaultXRefProperties() const
void setFreezeNewElements(bool)
QETProject::setfreezeNewElements Set Project Wide freeze new elements.
QString conductorAutoNumFormula(const QString &key) const
QETProject::conductorAutoNumFormula.
void projectModified(QETProject *, bool)
void addConductorAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addConductorAutoNum Add a new conductor numerotation context. If key already exist...
void setProgressBarRange(int min, int max)
DialogWaiting::setProgressBarRange.
void freezeNewConductorLabel(bool freeze, int from, int to)
QETProject::freezeNewConductorLabel Freeze New Conductors in the selected folios. ...
QString m_current_element_autonum
QETProject * project() const
bool usesElement(const ElementsLocation &) const
ProjectState state() const
void updateDiagramsFolioData()
bool writeToFile(QDomDocument &xml_doc, QFile *file, QString *error_message=nullptr)
void setFreezeNewConductors(bool)
QETProject::setfreezeNewConductors Set Project Wide freeze new conductors.
QString collectionPath(bool protocol=true) const
QList< QDomElement > findInDomElement(const QDomElement &, const QString &)
void elementAutoNumRemoved(QString name)
void elementAutoNumAdded(QString name)
bool writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString *error_message=nullptr)
QUndoStack * m_undo_stack
undo stack for this project
void readElementsCollectionXml(QDomDocument &xml_project)
QETProject::readElementsCollectionXml Load the diagrams from the xml description of the project...
QString elementAutoNumFormula(const QString &key) const
QETProject::elementAutoNumFormula.
int progressBarValue() const
DialogWaiting::progressBarValue.
static DialogWaiting * instance(QWidget *parent=nullptr)
void readDefaultPropertiesXml(QDomDocument &xml_project)
QETProject::readDefaultPropertiesXml load default properties for new diagram, found in the xml of thi...
static BorderProperties defaultProperties()
BorderProperties::defaultProperties.
void freezeExistentConductorLabel(bool freeze, int from, int to)
QETProject::freezeExistentConductorLabel Freeze Existent Conductors in the selected folios...
DiagramContext m_project_properties
project-wide variables that will be made available to child diagrams
qreal declaredQElectroTechVersion()
void writeBackup()
QETProject::writeBackup Write a backup file of this project, in the case that QET crash...
bool exist() const
ElementsLocation::exist.
void readDiagramsXml(QDomDocument &xml_project)
QETProject::readDiagramsXml Load the diagrams from the xml description of the project. Note a project can have 0 diagram.
QString integrateTitleBlockTemplate(const TitleBlockTemplateLocation &, MoveTitleBlockTemplatesHandler *handler)
void toXml(QDomElement &, const QString &="property") const
void projectDiagramsOrderChanged(QETProject *, int, int)
QString addElement(ElementsLocation &location)
XmlElementCollection::addElement Add the element at location to this collection. The element is copie...
QString elementCurrentAutoNum() const
QETProject::elementCurrentAutoNum.
void setReadOnly(bool)
QETProject::setReadOnly Set this project to read only if = true.
void freezeExistentElementLabel(bool freeze, int from, int to)
QETProject::freezeExistentElementLabel Freeze Existent Elements in the selected folios.
bool projectOptionsWereModified()
NamesList namesListForIntegrationCategory()
bool m_modified
Whether options were modified.
QETProject * parentProject() const
QHash< QString, NumerotationContext > m_element_autonum
Element Auto Numbering.
void fromXml(const QDomElement &xml_element) override
XRefProperties::fromXml Load from xml.
QETProject(QObject *parent=nullptr)
QETProject::QETProject Create a empty project.
void setAutoConductor(bool ac)
QETProject::setAutoConductor.
the XML content is currently being processed
QDomElement getTemplateXmlDescription(const QString &) override
void readOnlyChanged(QETProject *, bool)
QString m_default_report_properties
Default report properties.
QHash< QString, XRefProperties > m_default_xref_properties
Default xref properties.
void setDefaultXRefProperties(const QString &type, const XRefProperties &properties)
BorderProperties default_border_properties_
Default dimensions and properties for new diagrams created within the project.
void removeDiagram(Diagram *)
QString project_title_
Project title.
bool usesTitleBlockTemplate(const TitleBlockTemplateLocation &)
void addElementAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addElementAutoNum Add a new element numerotation context. If key already exist...
the parsing of the XML content failed
QET::QetCollection collection
Specify the location of the title block.
QTimer m_save_backup_timer
bool isElement() const
ElementsLocation::isElement.
bool setTemplateXmlDescription(const QString &, const QDomElement &) override
QString currentDir() const
bool projectWasModified()
void setDefaultConductorProperties(const ConductorProperties &)
the current item was handled by the Strategy object: do not treat it and continue ...
bool isFreezeNewElements()
QETProject::freezeNewElements.
void XRefPropertiesChanged()
QHash< QString, NumerotationContext > elementAutoNum() const
QETProject::elementAutoNum.
TitleBlockTemplatesProjectCollection * embeddedTitleBlockTemplatesCollection()
QStringList templates() override
ProjectState openFile(QFile *file)
QETProject::openFile.
QList< Diagram * > addNewDiagramFolioList()
QETProject::addNewDiagramFolioList Add new diagram folio list.
void fromXml(QDomElement &)
void defaultTitleBlockPropertiesChanged()
static QString defaultProperties()
ReportProperties::defaultProperties.
static TitleBlockProperties defaultProperties()
TitleBlockProperties::defaultProperties Return the default properties stored in the setting file...
ElementsLocation parent() const
QHash< QString, NumerotationContext > m_conductor_autonum
Conductor auto numerotation.
TitleBlockTemplatesProjectCollection m_titleblocks_collection
Embedded title block templates collection.
void diagramRemoved(QETProject *, Diagram *)
QString template_name
Name of the template used to render the title block - an empty string means "the default template pro...
void projectTitleChanged(QETProject *, const QString &)
void init()
QETProject::init.
The operation must be tried again.
QString toRepresentedString()
NumerotationContextCommands::toFinalString.
Diagram * addNewDiagram()
QMessageBox::StandardButton warning(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
The XmlElementCollection class This class represent a collection of elements stored to xml...
virtual void fromXml(const QDomElement &)