#include <tagset.h>
Inherits TQObject.
Signals | |
void | signalTagAdded (const Tag &) |
void | signalTagRemoved (const Tag &) |
void | signalTagUpdated (const Tag &) |
Public Member Functions | |
TagSet (TQObject *parent=0) | |
void | insert (const Tag &tag) |
void | remove (const Tag &tag) |
TQMap< TQString, Tag > | toMap () const |
bool | contains (const Tag &tag) const |
bool | containsID (const TQString &id) const |
Tag | findByID (const TQString &id) const |
void | readFromXML (const TQDomDocument &doc) |
TQDomDocument | toXML () const |
Protected Member Functions | |
void | tagUpdated (const Tag &tag) |
Friends | |
class | Tag |
Detailed Description
represents a set of tags (see Tag) In an application, there is usually one central tag set that is used.
The tag set is not necessarily managed by the application itself, it might also be part of a desktop-wide framework (like Tenor) managing a common tag set for all applications
Member Function Documentation
◆ contains()
bool Akregator::TagSet::contains | ( | const Tag & | tag | ) | const |
returns true
if this set contains tag
Definition at line 80 of file tagset.cpp.
◆ containsID()
bool Akregator::TagSet::containsID | ( | const TQString & | id | ) | const |
returns true
if this set contains a tag with a given ID
Definition at line 75 of file tagset.cpp.
◆ findByID()
Tag Akregator::TagSet::findByID | ( | const TQString & | id | ) | const |
returns the tag with the given ID if the tag is element of the set, or a null tag if not
Definition at line 85 of file tagset.cpp.
◆ insert()
void Akregator::TagSet::insert | ( | const Tag & | tag | ) |
adds a tag to the tag set.
The tag set will emit signalTagAdded
Definition at line 55 of file tagset.cpp.
◆ readFromXML()
void Akregator::TagSet::readFromXML | ( | const TQDomDocument & | doc | ) |
reads tag set from XML see toXML() for an explanation of the format
Definition at line 95 of file tagset.cpp.
◆ remove()
void Akregator::TagSet::remove | ( | const Tag & | tag | ) |
removes a tag from the tag set.
The tag set will emit signalTagRemoved
Definition at line 65 of file tagset.cpp.
◆ signalTagAdded
|
signal |
emitted when a tag was added to this tag set
◆ signalTagRemoved
|
signal |
emitted when a tag was removed from this set
◆ signalTagUpdated
|
signal |
emitted when a tag in this set was changed (e.g.
renamed)
◆ tagUpdated()
|
protected |
called by the tag (Tag is friend class) after a change
Definition at line 127 of file tagset.cpp.
◆ toMap()
TQMap< TQString, Tag > Akregator::TagSet::toMap | ( | ) | const |
returns the tag set as map ((id, Tag) pairs)
Definition at line 90 of file tagset.cpp.
◆ toXML()
TQDomDocument Akregator::TagSet::toXML | ( | ) | const |
returns an XML representation of the tag set.
The root element is <tagSet>, a tag ("someID", "someName") is represented as
Full example:
Definition at line 132 of file tagset.cpp.
The documentation for this class was generated from the following files: