akregator/src

Akregator::TagSet Class Reference

#include <tagset.h>

List of all members.


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

Author:
Frank Osterfeld

Definition at line 47 of file tagset.h.


Signals

void signalTagAdded (const Tag &)
void signalTagRemoved (const Tag &)
void signalTagUpdated (const Tag &)

Public Member Functions

 TagSet (QObject *parent=0)
virtual ~TagSet ()
void insert (const Tag &tag)
void remove (const Tag &tag)
QMap< QString, Tag > toMap () const
bool contains (const Tag &tag) const
bool containsID (const QString &id) const
Tag findByID (const QString &id) const
void readFromXML (const QDomDocument &doc)
QDomDocument toXML () const

Protected Member Functions

void tagUpdated (const Tag &tag)

Friends

class Tag

Member Function Documentation

bool Akregator::TagSet::contains const Tag &  tag  )  const
 

returns true if this set contains tag

Definition at line 80 of file tagset.cpp.

bool Akregator::TagSet::containsID const QString &  id  )  const
 

returns true if this set contains a tag with a given ID

Definition at line 75 of file tagset.cpp.

Tag Akregator::TagSet::findByID const QString &  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.

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.

void Akregator::TagSet::readFromXML const QDomDocument &  doc  ) 
 

reads tag set from XML see toXML() for an explanation of the format

Definition at line 95 of file tagset.cpp.

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.

void Akregator::TagSet::signalTagAdded const Tag &   )  [signal]
 

emitted when a tag was added to this tag set

void Akregator::TagSet::signalTagRemoved const Tag &   )  [signal]
 

emitted when a tag was removed from this set

void Akregator::TagSet::signalTagUpdated const Tag &   )  [signal]
 

emitted when a tag in this set was changed (e.g.

renamed)

void Akregator::TagSet::tagUpdated const Tag &  tag  )  [protected]
 

called by the tag (Tag is friend class) after a change

Definition at line 127 of file tagset.cpp.

QMap< QString, Tag > Akregator::TagSet::toMap  )  const
 

returns the tag set as map ((id, Tag) pairs)

Definition at line 90 of file tagset.cpp.

QDomDocument Akregator::TagSet::toXML  )  const
 

returns an XML representation of the tag set.

The root element is

, a tag ("someID", "someName") is represented as

 <tag id="someID">someName</tag> 
Full example:
            <?xml version="1.0" encoding="UTF-8"?>
            <tagSet version="0.1" >
            <tag id="http://akregator.sf.net/tags/Interesting" >Interesting</tag>
            <tag id="AFs3SdaD" >Pretty boring</tag>
            </tagSet>

Definition at line 132 of file tagset.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys