The QKnxGroupAddressInfos class provides access to information about group addresses used inside a KNX project. 更多...
| 頭: | #include <QKnxGroupAddressInfos> |
| qmake: | QT += knx |
| 枚舉類 | Status { NoError, FileError, ProjectError, ParseError } |
| QKnxGroupAddressInfos (QKnxGroupAddressInfos && other ) | |
| QKnxGroupAddressInfos (const QKnxGroupAddressInfos & other ) | |
| QKnxGroupAddressInfos (const QString & projectFile ) | |
| QKnxGroupAddressInfos () | |
| QKnxGroupAddressInfos & | operator= (QKnxGroupAddressInfos && other ) |
| QKnxGroupAddressInfos & | operator= (const QKnxGroupAddressInfos & other ) |
| ~QKnxGroupAddressInfos () | |
| void | add (const QKnxGroupAddressInfo & info , const QString & projectId ) |
| void | add (const QString & name , const QKnxAddress & address , QKnxDatapointType::Type type , const QString & 描述 , const QString & projectId , const QString & installation = {}) |
| void | add (const QString & name , const QKnxAddress & address , const QString & datapointType , const QString & 描述 , const QString & projectId , const QString & installation = {}) |
| QVector<QKnxGroupAddressInfo> | addressInfos (const QString & projectId , const QString & installation = {}) const |
| QVector<QKnxGroupAddressInfo> | addressInfos (const QKnxAddress & address , const QString & projectId , const QString & installation = {}) const |
| QVector<QKnxGroupAddressInfo> | addressInfos (QKnxDatapointType::Type type , const QString & projectId , const QString & installation = {}) const |
| void | clear () |
| QString | errorString () const |
| qint32 | infoCount (const QString & projectId , const QString & installation = {}) const |
| QVector<QString> | installations (const QString & projectId ) const |
| bool | parse () |
| QString | projectFile () const |
| QVector<QString> | projectIds () const |
| QString | projectName (const QString & projectId ) const |
| void | remove (const QKnxAddress & address , const QString & projectId , const QString & installation = {}) |
| void | remove (const QKnxGroupAddressInfo & info , const QString & projectId ) |
| void | setProjectFile (const QString & projectFile ) |
| QKnxGroupAddressInfos::Status | status () const |
| void | swap (QKnxGroupAddressInfos & other ) |
| bool | operator!= (const QKnxGroupAddressInfos & other ) const |
| bool | operator== (const QKnxGroupAddressInfos & other ) const |
| QDebug | operator<< (QDebug debug , const QKnxGroupAddressInfos & infos ) |
This class parses the KNX project information specified via the setProjectFile () method and provides access to the information defined within the file through an API. You can:
This enum holds the status of parsing the KNX project information.
| 常量 | 值 |
|---|---|
QKnxGroupAddressInfos::Status::NoError
|
0
|
QKnxGroupAddressInfos::Status::FileError
|
1
|
QKnxGroupAddressInfos::Status::ProjectError
|
2
|
QKnxGroupAddressInfos::Status::ParseError
|
3
|
另請參閱 parse ().
Move-constructs an object instance, making it point to the same object that other 所指嚮的。
構造副本為 other .
Creates a new empty group address infos object and sets the current project file to projectFile . Creating the object does not automatically trigger parsing the given projectFile .
The function argument can be either a valid KNX
0.xml
或
.knxproj
project file.
另請參閱 parse ().
Creates a new empty group address infos object.
移動賦值 other to this object instance.
賦值指定 other 到此對象。
銷毀對象並釋放任何分配資源。
Adds a group address info object of a KNX project identified by projectId . The group address info QKnxGroupAddressInfo::installation ID is used to associate the group address info with an existing KNX project.
注意: 值 projectId must not be empty.
注意: The function does not prevent multiple identical entries.
Creates a group address info object with values set to name , address , type , 描述 and installation . The created object is associated with the given KNX projectId ID, and installation .
注意: 值 projectId must not be empty.
注意: The function does not prevent multiple identical entries.
Creates a group address info object with values set to name , address , datapointType , 描述 and installation . The created object is associated with the given KNX projectId ID, and installation .
注意: 值 projectId must not be empty.
注意: The function does not prevent multiple identical entries.
Returns a vector of all available group address infos from a KNX project identified by projectId and installation .
Returns a vector of all available group address infos from a KNX project identified by address , projectId ,和 installation .
Returns a vector of all available group address infos from a KNX project identified by datapoint type , projectId and installation .
Clears all existing information including the KNX project file name.
Returns the human-readable message appropriate to the reported read status.
Returns the number of group address info objects contained in this class; identified by projectId and installation .
Returns a vector of all installation ids for the given KNX projectId ID.
Clears all existing information and parses the KNX project file.
返迴
true
if parsing was successful; otherwise returns
false
. If an error occurs, sets the
Status
, and fills the
errorString
().
Returns the current project file from where the group address information was collected.
另請參閱 setProjectFile ().
Returns a vector of all KNX project ids found in the KNX project file.
Returns the project name associated with the given KNX projectId ID. Since the project name is an optional field in a KNX project, it can be empty.
Removes all the group address info objects from a KNX project identified by projectId and installation ID and with the same KNX group address .
注意: 值 projectId must not be empty.
Removes all the objects equal to group address info from a KNX project identified by projectId . The group address info QKnxGroupAddressInfo::installation ID is used to associate the group address info with an existing KNX project.
注意: 值 projectId must not be empty.
Sets the current project file to projectFile and clears all existing information. Calling this function does not automatically trigger parsing the given projectFile .
The function argument can be either a valid KNX
0.xml
或
.knxproj
project file.
另請參閱 projectFile () 和 parse ().
Returns the read status of the current KNX project file.
交換 other 與此對象。此操作很快且從不失敗。
返迴
true
if this object and the given
other
不相等;則返迴
false
.
返迴
true
if this object and the given
other
相等;否則返迴
false
.
寫入 infos 對象到 debug stream and returns a reference to the stream.