akregator/src

progressmanager.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 TQt, and distribute the resulting executable,
00022     without including the source code for TQt in the source distribution.
00023 */
00024 
00025 #ifndef AKREGATOR_PROGRESSMANAGER_H
00026 #define AKREGATOR_PROGRESSMANAGER_H
00027 
00028 namespace Akregator
00029 {
00030 
00031 class Feed;
00032 class TreeNode;
00033 class ProgressItemHandler;
00036 class ProgressManager : public TQObject
00037 {
00038     Q_OBJECT
00039   TQ_OBJECT
00040     public:
00041         
00042         static ProgressManager* self();
00043 
00044         ProgressManager();
00045         virtual ~ProgressManager();
00046 
00048         void setFeedList(FeedList* feedList);
00049 
00050     protected slots:
00051 
00052         void slotNodeAdded(TreeNode* node);
00053         void slotNodeRemoved(TreeNode* node);
00054         void slotNodeDestroyed(TreeNode* node);
00055 
00056     private:
00057 
00058         static ProgressManager* m_self;
00059 
00060         class ProgressManagerPrivate; 
00061         ProgressManagerPrivate* d;
00062 };
00063 
00067 class ProgressItemHandler : public TQObject
00068 {
00069     Q_OBJECT
00070   TQ_OBJECT
00071     public:
00072         ProgressItemHandler(Feed* feed);
00073         virtual ~ProgressItemHandler();
00074 
00075     public slots:
00076 
00077         void slotFetchStarted();
00078         void slotFetchCompleted();
00079         void slotFetchAborted();
00080         void slotFetchError();
00081         
00082     private:
00083         class ProgressItemHandlerPrivate;
00084         ProgressItemHandlerPrivate* d;
00085 };
00086 
00087 } // namespace Akregator
00088 
00089 #endif // AKREGATOR_PROGRESSMANAGER_H