knode
knnntpaccount.h
Go to the documentation of this file.00001 /* 00002 KNode, the KDE newsreader 00003 Copyright (c) 1999-2005 the KNode authors. 00004 See file AUTHORS for details 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 You should have received a copy of the GNU General Public License 00011 along with this program; if not, write to the Free Software Foundation, 00012 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US 00013 */ 00014 00015 #ifndef KNNNTPACCOUNT_H 00016 #define KNNNTPACCOUNT_H 00017 00018 00019 #include "kncollection.h" 00020 #include "knserverinfo.h" 00021 #include <QObject> 00022 #include <QTimer> 00023 #include <QDate> 00024 00025 class KNNntpAccount; 00026 00027 namespace KNode { 00028 class Identity; 00029 class Cleanup; 00030 } 00031 00032 00034 class KNNntpAccountIntervalChecking : public QObject { 00035 00036 Q_OBJECT 00037 00038 public: 00039 KNNntpAccountIntervalChecking(KNNntpAccount *account); 00040 ~KNNntpAccountIntervalChecking(); 00041 void installTimer(); 00042 void deinstallTimer(); 00043 00044 protected: 00045 QTimer *t_imer; 00046 KNNntpAccount *a_ccount; 00047 00048 protected slots: 00049 void slotCheckNews(); 00050 00051 }; 00052 00053 00055 class KNNntpAccount : public KNCollection , public KNServerInfo { 00056 00057 public: 00058 KNNntpAccount(); 00059 ~KNNntpAccount(); 00060 00061 collectionType type() { return CTnntpAccount; } 00062 00064 bool readInfo(const QString &confPath); 00065 void saveInfo(); 00066 //void syncInfo(); 00067 QString path(); 00069 bool editProperties(QWidget *parent); 00070 00071 // news interval checking 00072 void startTimer(); 00073 00074 //get 00075 bool fetchDescriptions() const { return f_etchDescriptions; } 00076 QDate lastNewFetch() const { return l_astNewFetch; } 00077 bool wasOpen() const { return w_asOpen; } 00078 bool useDiskCache() const { return u_seDiskCache; } 00079 KNode::Identity* identity() const { return i_dentity; } 00080 bool intervalChecking() const { return i_ntervalChecking; } 00081 int checkInterval() const { return c_heckInterval; } 00082 KNode::Cleanup *cleanupConfig() const { return mCleanupConf; } 00083 00085 KNode::Cleanup *activeCleanupConfig() const; 00086 00087 //set 00088 void setFetchDescriptions(bool b) { f_etchDescriptions = b; } 00089 void setLastNewFetch(QDate date) { l_astNewFetch = date; } 00090 void setUseDiskCache(bool b) { u_seDiskCache=b; } 00091 void setCheckInterval(int c); 00092 void setIntervalChecking(bool b) { i_ntervalChecking=b; } 00093 00094 protected: 00096 KNode::Identity *i_dentity; 00098 KNode::Cleanup *mCleanupConf; 00100 bool f_etchDescriptions; 00102 QDate l_astNewFetch; 00104 bool w_asOpen; 00106 bool u_seDiskCache; 00108 bool i_ntervalChecking; 00109 int c_heckInterval; 00110 00112 KNNntpAccountIntervalChecking *a_ccountIntervalChecking; 00113 00114 }; 00115 00116 #endif
KDE 4.2 API Reference