The QKnxGroupAddressInfos class provides access to information about group addresses used inside a KNX project. 更多...
头: | #include <QKnxGroupAddressInfos> |
qmake: | QT += knx |
enum class | 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 & description , const QString & projectId , const QString & installation = {}) |
void | add (const QString & name , const QKnxAddress & address , const QString & datapointType , const QString & description , 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 , description 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 , description 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.