![]() |
Carousel
|
The XmlDefinitionParser class parses component definition using xml format. More...
#include <XmlDefinitionParser.h>
Inherits QObject, and IDefinitionParser.
Public Member Functions | |
| XmlDefinitionParser (QObject *parent=nullptr) | |
| const QString & | componentLocation () const |
| const QString & | componentName () const |
| const QString & | componentShortName () const |
| const QString & | description () const |
| const QString & | error () const |
| const ParentsList & | parents () const |
| const QString & | productName () const |
| const QString & | provider () const |
| bool | read (const QString &text) |
| bool | read (const QByteArray &data) |
| bool | read (QIODevice *dev) |
| const QString & | version () const |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QObject (QObject *parent, const char *name) | |
| bool | blockSignals (bool block) |
| QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
| const QObjectList & | children () const |
| const char * | className () const |
| bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const QObject *receiver, const char *method) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name) const |
| QList< T > | findChildren (const QRegExp ®Exp) const |
| QList< T > | findChildren (const QString &name) const |
| bool | inherits (const char *className) const |
| void | insertChild (QObject *object) |
| void | installEventFilter (QObject *filterObj) |
| bool | isA (const char *className) const |
| bool | isWidgetType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| const char * | name () const |
| const char * | name (const char *defaultName) const |
| QString | objectName () const |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeChild (QObject *object) |
| void | removeEventFilter (QObject *obj) |
| void | setName (const char *name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval) |
| QThread * | thread () const |
Protected Member Functions | |
| void | clear () |
| virtual bool | parseXml (QDomDocument &document) |
Protected Member Functions inherited from QObject | |
| bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const char *signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const char *signal) |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
| QString | m_componentLocation |
| QString | m_componentName |
| QString | m_description |
| QString | m_error |
| ParentsList | m_parents |
| QString | m_productName |
| QString | m_provider |
| QString | m_shortName |
| QString | m_version |
Additional Inherited Members | |
Public Types inherited from IDefinitionParser | |
| typedef QMap< QString, QString > | ParentsList |
Static Public Member Functions inherited from QObject | |
| bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
| QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
| objectName | |
The XmlDefinitionParser class parses component definition using xml format.
The XML should be like such one:
Where name attribute is a componentName(), productName tag is a productName(), and so on.
The XmlDefinitionParser expects that root element is named component and has non-empty attribute name. All other tags are optional, so minimalistic xml-definition is like
If version was not set, a default one (1.0.0) will be set during a ComponentDefinition creation.
|
virtual |
Gets the error occurred during reading (method read()). Returns empty string if error was not occurred.
Implements IDefinitionParser.
|
virtual |
Gets the component Id.
Implements IDefinitionParser.
|
virtual |
Gets the parsed component name.
Implements IDefinitionParser.
|
virtual |
Gets the parsed component location (relative or absolyte) without library extension.
Implements IDefinitionParser.
|
virtual |
Gets the parsed component description. Optional, can be empty string.
Implements IDefinitionParser.
|
virtual |
Gets the parsed component parents names. Optional, can be empty list.
Implements IDefinitionParser.
|
virtual |
Gets the parsed product name. Optional, can be empty string.
Implements IDefinitionParser.
|
virtual |
Gets the name of component's provider - the person or company, who created this component.
Implements IDefinitionParser.
|
virtual |
Gets the string representation of version of a component.
Implements IDefinitionParser.
|
virtual |
This function parses the xml string text and sets component meta information.
If a parse error occurs (incorrect format, missing xml tags or attributes, etc), this function returns false. The error message could be got through error() method.
Implements IDefinitionParser.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements IDefinitionParser.
|
protectedvirtual |
Sets up component information using ready-to-use document.
If a parse error occurs (missing xml tags or attributes, etc), this function returns false.
1.8.5