akregator/src

tagnodelist.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_TAGNODELIST_H
00026 #define AKREGATOR_TAGNODELIST_H
00027 
00028 #include "tagfolder.h"
00029 
00030 class QDomDocument;
00031 template <class T> class QValueList;
00032 
00033 namespace Akregator {
00034 
00035    class FeedList;
00036    class Folder;
00037    class TagFolder;
00038    class TagNode;
00039    class TreeNode;
00040    class Tag;
00041    class TagSet;
00042    
00043    
00044    class TagNodeList : public NodeList
00045    {
00046        Q_OBJECT
00047        public:
00048 
00049 
00050        TagNodeList(FeedList* feedList, TagSet* tagSet);
00051        virtual ~TagNodeList();
00052        
00053        FeedList* feedList() const;
00054        bool insert(TagNode* tagNode);
00055        bool remove(TagNode* tagNode);
00056        bool containsTagId(const QString& tagId);
00057        QValueList<TagNode*> toList() const;
00058        
00059        TagNode* findByTagID(const QString& tagID);
00060 
00061        virtual bool readFromXML(const QDomDocument& doc);
00062        virtual QDomDocument toXML() const;
00063 
00064        virtual TagFolder* rootNode() const;
00065        
00066        public slots:
00067 
00068        void slotTagAdded(const Tag& tag);
00069        void slotTagUpdated(const Tag& tag);
00070        void slotTagRemoved(const Tag& tag);
00071        
00072        signals:
00073 
00074        void signalDestroyed(TagNodeList*);
00075        void signalTagNodeAdded(TagNode* node);
00076        void signalTagNodeRemoved(TagNode* node);
00077 
00078        protected slots:
00079 
00080        virtual void slotNodeDestroyed(TreeNode* node);
00081        virtual void slotNodeAdded(TreeNode* node);
00082        virtual void slotNodeRemoved(Folder* parent, TreeNode* node);
00083 
00084        private:
00085        
00086        class TagNodeListPrivate;
00087        TagNodeListPrivate* d;
00088    };
00089 
00090 } // namespace Akregator
00091 
00092 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys