mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 17:44:13 +02:00
Answer numbering, searches and unused symbols from the database (stage D5)
The project database's element table now holds each symbol's definition (the path its file names it by) and its sequential numbers, filled from the document and from built folios alike. Numbering, the searches for symbols of a kind (a link tab's candidates) and the list of unused symbols read them for the folios not built, instead of reading those folios' files. Saving looks up a folio's tables in the index it was opened from. A .qetz asked its numbering, searches and unused symbols reads only the files of the folios it builds (tst_lazyfolios, which fails when the unused symbols are read from the folio files: 50 read, 22 built). ctest 96/96 eager and lazy; 342 corpus projects save the same in all four arms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "../diagramcontext.h"
|
||||
#include "../titleblockproperties.h"
|
||||
#include "../conductorproperties.h"
|
||||
#include "../autoNum/assignvariables.h"
|
||||
|
||||
class Element;
|
||||
class QETProject;
|
||||
@@ -180,6 +181,18 @@ class projectDataBase : public QObject
|
||||
QSet<QUuid> foliosWithUnjoinedWires() const;
|
||||
QSet<QUuid> folioUuidsOfElements(const QSet<QUuid> &elements) const;
|
||||
QHash<QUuid, QString> elementTypesOnFolios(const QSet<QUuid> &folios) const;
|
||||
/// A symbol placed on a folio, as the element table has it
|
||||
struct FolioSymbol {
|
||||
QUuid uuid;
|
||||
QUuid folio;
|
||||
QString kind; ///< ElementData::typeToString()
|
||||
QString location; ///< its definition, ElementsLocation::path()
|
||||
autonum::sequentialNumbers sequence;
|
||||
};
|
||||
QList<FolioSymbol> symbolsOnFolios(const QList<QUuid> &folios) const;
|
||||
QList<QUuid> linkedSymbols(const QUuid &element) const;
|
||||
static QVariant sequenceValue(const autonum::sequentialNumbers &sequence);
|
||||
static autonum::sequentialNumbers sequenceFromValue(const QVariant &value);
|
||||
|
||||
void addElement (Element *element);
|
||||
void removeElement (Element *element);
|
||||
|
||||
Reference in New Issue
Block a user