• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

knode

  • sources
  • kde-4.14
  • kdepim
  • knode
knnntpaccount.h
Go to the documentation of this file.
1 /*
2  KNode, the KDE newsreader
3  Copyright (c) 1999-2005 the KNode authors.
4  See file AUTHORS for details
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  You should have received a copy of the GNU General Public License
11  along with this program; if not, write to the Free Software Foundation,
12  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
13 */
14 
15 #ifndef KNNNTPACCOUNT_H
16 #define KNNNTPACCOUNT_H
17 
18 #include "configuration/settings_container_interface.h"
19 #include "kncollection.h"
20 #include "knserverinfo.h"
21 
22 #include <QObject>
23 #include <QDate>
24 
25 class QTimer;
26 class KNNntpAccount;
27 namespace KNode {
28  class Cleanup;
29 }
30 namespace KPIMIdentities {
31  class Identity;
32 }
33 
35 class KNNntpAccountIntervalChecking : public QObject {
36 
37  Q_OBJECT
38 
39  public:
40  explicit KNNntpAccountIntervalChecking(KNNntpAccount *account);
41  ~KNNntpAccountIntervalChecking();
42  void installTimer();
43  void deinstallTimer();
44 
45  protected:
46  QTimer *t_imer;
47  KNNntpAccount *a_ccount;
48 
49  protected slots:
50  void slotCheckNews();
51 
52 };
53 
54 
56 class KNNntpAccount : public KNCollection , public KNServerInfo, public KNode::SettingsContainerInterface
57 {
58  public:
62  typedef boost::shared_ptr<KNNntpAccount> Ptr;
66  typedef QList<KNNntpAccount::Ptr> List;
67 
68  KNNntpAccount();
69  ~KNNntpAccount();
70 
71  collectionType type() { return CTnntpAccount; }
72 
74  bool readInfo(const QString &confPath);
75  void writeConfig();
76  //void syncInfo();
77  QString path();
79  bool editProperties(QWidget *parent);
80 
81  // news interval checking
82  void startTimer();
83 
84  //get
85  bool fetchDescriptions() const { return f_etchDescriptions; }
86  QDate lastNewFetch() const { return l_astNewFetch; }
87  bool wasOpen() const { return w_asOpen; }
88  bool useDiskCache() const { return u_seDiskCache; }
89 
94  virtual const KPIMIdentities::Identity & identity() const;
99  virtual void setIdentity( const KPIMIdentities::Identity &identity );
100 
101  bool intervalChecking() const { return i_ntervalChecking; }
102  int checkInterval() const { return c_heckInterval; }
103  KNode::Cleanup *cleanupConfig() const { return mCleanupConf; }
104 
106  KNode::Cleanup *activeCleanupConfig() const;
107 
108  //set
109  void setFetchDescriptions(bool b) { f_etchDescriptions = b; }
110  void setLastNewFetch(QDate date) { l_astNewFetch = date; }
111  void setUseDiskCache(bool b) { u_seDiskCache=b; }
112  void setCheckInterval(int c);
113  void setIntervalChecking(bool b) { i_ntervalChecking=b; }
114 
115  protected:
121  int mIdentityUoid;
123  KNode::Cleanup *mCleanupConf;
125  bool f_etchDescriptions;
127  QDate l_astNewFetch;
129  bool w_asOpen;
131  bool u_seDiskCache;
133  bool i_ntervalChecking;
134  int c_heckInterval;
135 
137  KNNntpAccountIntervalChecking *a_ccountIntervalChecking;
138 
142  virtual KNCollection::Ptr selfPtr();
143 };
144 
145 #endif
KNNntpAccount::useDiskCache
bool useDiskCache() const
Definition: knnntpaccount.h:88
KNNntpAccount
Represents an account on a news server.
Definition: knnntpaccount.h:56
KNNntpAccount::setIntervalChecking
void setIntervalChecking(bool b)
Definition: knnntpaccount.h:113
QWidget
KNCollection::parent
KNCollection::Ptr parent() const
Returns the parent collection.
Definition: kncollection.h:73
KNNntpAccountIntervalChecking::KNNntpAccountIntervalChecking
KNNntpAccountIntervalChecking(KNNntpAccount *account)
Definition: knnntpaccount.cpp:33
KNNntpAccount::activeCleanupConfig
KNode::Cleanup * activeCleanupConfig() const
Returns the cleanup configuration that should be used for this account.
Definition: knnntpaccount.cpp:205
date
time_t date() const
KNNntpAccount::c_heckInterval
int c_heckInterval
Definition: knnntpaccount.h:134
KNNntpAccount::w_asOpen
bool w_asOpen
was the server open in the listview on the last shutdown?
Definition: knnntpaccount.h:129
KNNntpAccountIntervalChecking::~KNNntpAccountIntervalChecking
~KNNntpAccountIntervalChecking()
Definition: knnntpaccount.cpp:39
KNNntpAccount::writeConfig
void writeConfig()
Save the configuration to disk.
Definition: knnntpaccount.cpp:125
KNode::Cleanup
Expirery/cleaup settings (globally or per account/group/folder).
Definition: knconfig.h:132
KNNntpAccount::path
QString path()
Definition: knnntpaccount.cpp:160
KNNntpAccount::Ptr
boost::shared_ptr< KNNntpAccount > Ptr
Shared pointer to a KNNntpAccount.
Definition: knnntpaccount.h:62
KNNntpAccount::l_astNewFetch
QDate l_astNewFetch
last use of "newgroups"
Definition: knnntpaccount.h:127
KNode::SettingsContainerInterface
Interface for object (global settings, account and group) that contains common settings (like identit...
Definition: settings_container_interface.h:40
KNNntpAccount::i_ntervalChecking
bool i_ntervalChecking
is interval checking enabled
Definition: knnntpaccount.h:133
KNNntpAccountIntervalChecking::a_ccount
KNNntpAccount * a_ccount
Definition: knnntpaccount.h:47
QTimer
QObject
KNNntpAccountIntervalChecking
Handles the interval checking of an news server account.
Definition: knnntpaccount.h:35
KNNntpAccount::mIdentityUoid
int mIdentityUoid
Unique object identifier of the identity of this server.
Definition: knnntpaccount.h:121
KNNntpAccountIntervalChecking::installTimer
void installTimer()
Definition: knnntpaccount.cpp:47
settings_container_interface.h
KNCollection
Abstract base class for everything that is visible in the folder tree.
Definition: kncollection.h:32
KNNntpAccount::identity
virtual const KPIMIdentities::Identity & identity() const
Returns this server's specific identity or the null identity if there is none.
Definition: knnntpaccount.cpp:213
KNNntpAccount::setFetchDescriptions
void setFetchDescriptions(bool b)
Definition: knnntpaccount.h:109
KNNntpAccount::checkInterval
int checkInterval() const
Definition: knnntpaccount.h:102
KNNntpAccount::wasOpen
bool wasOpen() const
Definition: knnntpaccount.h:87
KNNntpAccountIntervalChecking::slotCheckNews
void slotCheckNews()
Definition: knnntpaccount.cpp:72
KNNntpAccount::mCleanupConf
KNode::Cleanup * mCleanupConf
account specific cleanup configuration
Definition: knnntpaccount.h:123
KNNntpAccount::fetchDescriptions
bool fetchDescriptions() const
Definition: knnntpaccount.h:85
QDate
KNNntpAccount::editProperties
bool editProperties(QWidget *parent)
returns true when the user accepted
Definition: knnntpaccount.cpp:173
KNNntpAccount::a_ccountIntervalChecking
KNNntpAccountIntervalChecking * a_ccountIntervalChecking
helper class for news interval checking, manages the QTimer
Definition: knnntpaccount.h:137
QString
QList< KNNntpAccount::Ptr >
KNServerInfo
Represents an account on a news server.
Definition: knserverinfo.h:31
KNNntpAccount::setIdentity
virtual void setIdentity(const KPIMIdentities::Identity &identity)
Sets this server's specific identity.
Definition: knnntpaccount.cpp:221
KNNntpAccount::intervalChecking
bool intervalChecking() const
Definition: knnntpaccount.h:101
KNNntpAccount::readInfo
bool readInfo(const QString &confPath)
tries to read information, returns false if it fails to do so
Definition: knnntpaccount.cpp:98
KNNntpAccount::KNNntpAccount
KNNntpAccount()
Definition: knnntpaccount.cpp:79
KNNntpAccount::List
QList< KNNntpAccount::Ptr > List
List of accounts.
Definition: knnntpaccount.h:66
KNCollection::Ptr
boost::shared_ptr< KNCollection > Ptr
Shared pointer to a KNCollection.
Definition: kncollection.h:42
KNNntpAccount::setLastNewFetch
void setLastNewFetch(QDate date)
Definition: knnntpaccount.h:110
KNNntpAccountIntervalChecking::t_imer
QTimer * t_imer
Definition: knnntpaccount.h:46
KNNntpAccountIntervalChecking::deinstallTimer
void deinstallTimer()
Definition: knnntpaccount.cpp:64
KNNntpAccount::cleanupConfig
KNode::Cleanup * cleanupConfig() const
Definition: knnntpaccount.h:103
KNNntpAccount::setCheckInterval
void setCheckInterval(int c)
Definition: knnntpaccount.cpp:199
KNNntpAccount::~KNNntpAccount
~KNNntpAccount()
Definition: knnntpaccount.cpp:90
KNNntpAccount::startTimer
void startTimer()
Definition: knnntpaccount.cpp:187
kncollection.h
KNNntpAccount::f_etchDescriptions
bool f_etchDescriptions
use an additional "list newsgroups" command to fetch the newsgroup descriptions
Definition: knnntpaccount.h:125
KNCollection::collectionType
collectionType
Definition: kncollection.h:35
KNCollection::CTnntpAccount
Definition: kncollection.h:35
KNNntpAccount::u_seDiskCache
bool u_seDiskCache
cache fetched articles on disk
Definition: knnntpaccount.h:131
KNNntpAccount::type
collectionType type()
Returns the collection type.
Definition: knnntpaccount.h:71
KNNntpAccount::selfPtr
virtual KNCollection::Ptr selfPtr()
Reimplemented from KNArticleCollection::selfPtr().
Definition: knnntpaccount.cpp:227
KNNntpAccount::setUseDiskCache
void setUseDiskCache(bool b)
Definition: knnntpaccount.h:111
knserverinfo.h
KNNntpAccount::lastNewFetch
QDate lastNewFetch() const
Definition: knnntpaccount.h:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knode

Skip menu "knode"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal