akregator/src

tag.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2005 Frank Osterfeld <frank.osterfeld at kdemail.net>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef AKREGATOR_TAG_H
00026 #define AKREGATOR_TAG_H
00027 
00028 #include <qstring.h>
00029 
00030 namespace Akregator {
00031 
00032 class TagSet;
00033 
00044 class Tag
00045 {
00046     friend class TagSet;
00047     
00048     public:
00049 
00051     Tag(const QString& id, const QString& name=QString::null, const QString& scheme=QString::null);
00052 
00054     Tag();
00055    
00056     Tag(const Tag& other);
00057 
00076     static Tag fromCategory(const QString& term, const QString& scheme=QString::null, const QString& name=QString::null);
00077 
00078     virtual ~Tag();
00079 
00082     bool isNull() const;
00083     
00085     QString id() const;
00086 
00088     QString name() const;
00089 
00091     QString scheme() const;
00092 
00093     void setName(const QString& name);
00094 
00095     QString icon() const;
00096     void setIcon(const QString& icon);
00097 
00098     Tag& operator=(const Tag& other);
00099 
00102     bool operator<(const Tag& other) const;
00103 
00105     bool operator==(const Tag& other) const;
00106 
00107 
00108     protected:
00110     void addedToTagSet(TagSet* tagSet) const;
00111 
00113     void removedFromTagSet(TagSet* tagSet) const;
00114     private:
00115 
00116     class TagPrivate;
00117     TagPrivate* d;
00118 };
00119 
00120 
00121 } // namespace Akregator
00122 
00123 #endif // AKREGATOR_TAG_H
KDE Home | KDE Accessibility Home | Description of Access Keys