knode
knarticlemanager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef KNARTICLEMANAGER_H
00016 #define KNARTICLEMANAGER_H
00017
00018 #include <QList>
00019
00020 #include "knjobdata.h"
00021 #include "knarticle.h"
00022
00023 class Q3ListViewItem;
00024
00025 class KTemporaryFile;
00026
00027 class KNArticle;
00028 class KNHeaderView;
00029 class KNArticleCollection;
00030 class KNGroup;
00031 class KNFolder;
00032 class KNArticleFilter;
00033 class KNFilterManager;
00034 class KNJobData;
00035
00036 namespace KNode {
00037 class SearchDialog;
00038 }
00039
00040
00042 class KNArticleManager : public QObject, public KNJobConsumer {
00043
00044 Q_OBJECT
00045
00046 public:
00047 KNArticleManager();
00048 virtual ~KNArticleManager();
00049
00050
00051 void deleteTempFiles();
00052 void saveContentToFile(KMime::Content *c, QWidget *parent);
00053 void saveArticleToFile(KNArticle *a, QWidget *parent);
00054 QString saveContentToTemp(KMime::Content *c);
00055 void openContent(KMime::Content *c);
00056
00057
00058 void showHdrs(bool clear=true);
00059 void updateViewForCollection(KNArticleCollection *c);
00060 void updateListViewItems();
00061 void setAllThreadsOpen(bool b=true);
00062
00063 void updateStatusString();
00064
00065
00066 KNArticleFilter* filter() const { return f_ilter; }
00067 void search();
00068
00069
00070 void setGroup(KNGroup *g);
00071 void setFolder(KNFolder *f);
00072 KNArticleCollection* collection();
00073
00074
00075 bool loadArticle(KNArticle *a);
00076 bool unloadArticle(KNArticle *a, bool force=true);
00077
00078
00079 void copyIntoFolder(KNArticle::List &l, KNFolder *f);
00080 void moveIntoFolder(KNLocalArticle::List &l, KNFolder *f);
00081 bool deleteArticles(KNLocalArticle::List &l, bool ask=true);
00082
00083
00084 void setAllRead( bool read = true, int lastcount = -1 );
00085 void setRead(KNRemoteArticle::List &l, bool r=true, bool handleXPosts=true);
00087 void setAllNotNew();
00088
00089
00090 bool toggleWatched(KNRemoteArticle::List &l);
00091 bool toggleIgnored(KNRemoteArticle::List &l);
00092
00093 void rescoreArticles(KNRemoteArticle::List &l);
00094
00098 void setView(KNHeaderView* v);
00099
00100 signals:
00104 void aboutToShowGroup();
00108 void aboutToShowFolder();
00109
00110 protected:
00111 void processJob(KNJobData *j);
00112 void createThread(KNRemoteArticle *a);
00113 void createCompleteThread(KNRemoteArticle *a);
00114
00115 KNHeaderView *v_iew;
00116 KNGroup *g_roup;
00117 KNFolder *f_older;
00118 KNArticleFilter *f_ilter;
00119 KNFilterManager *f_ilterMgr;
00120 KNode::SearchDialog *s_earchDlg;
00121 QList<KTemporaryFile*> mTempFiles;
00122 bool d_isableExpander;
00123
00124 public slots:
00125 void slotFilterChanged(KNArticleFilter *f);
00126 void slotSearchDialogDone();
00127 void slotItemExpanded(Q3ListViewItem *p);
00128
00129 };
00130
00131 #endif