Minor improvement and remove some use of ElementsCollectionItem and ElementsDefinition

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4407 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-03-29 17:23:58 +00:00
parent dd5d9c9504
commit 95e309ff18
8 changed files with 44 additions and 128 deletions

View File

@@ -45,7 +45,6 @@ class CustomElement : public FixedElement
// attributes
protected:
int elmt_state; // hold the error code in case the instanciation fails, or 0 if everything went well
NamesList names;
ElementsLocation location_;
QPicture drawing;
@@ -75,8 +74,6 @@ class CustomElement : public FixedElement
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *);
QString typeId() const;
ElementsLocation location() const;
bool isNull() const;
int state() const;
QString name() const;
ElementTextItem* taggedText(const QString &tagg) const;
@@ -114,30 +111,6 @@ inline ElementsLocation CustomElement::location() const {
return(location_);
}
/**
@return true if this element is null, i.e. if its XML description could not
be loaded.
*/
inline bool CustomElement::isNull() const {
return(elmt_state);
}
/**
@return An integer representing the state of this element:
- 0: instantiation succeeded
- 1: the file does not exist
- 2: the file could not be opened
- 3: The file is not a valid XML document
- 4: The XML document does not have a "definition" root element.
- 5: The definition attributes are missing or invalid
- 6: The definition is empty
- 7: The parsing of an XML element describing an element drawing primitive failed
- 8: No primitive could be loadedAucune partie du dessin n'a pu etre chargee
*/
inline int CustomElement::state() const {
return(elmt_state);
}
/**
@return The name of this element.
*/