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

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • folder
foldercollection.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2009 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef MAILCOMMON_FOLDERCOLLECTION_H
19 #define MAILCOMMON_FOLDERCOLLECTION_H
20 
21 #include "mailcommon_export.h"
22 
23 #include <messagecore/misc/mailinglist.h>
24 using MessageCore::MailingList;
25 
26 #include <Akonadi/Collection>
27 #include <Akonadi/CollectionStatistics>
28 
29 #include <KSharedConfig>
30 #include <KShortcut>
31 #include <KIO/Job>
32 
33 namespace MailCommon {
34 
35 class MAILCOMMON_EXPORT FolderCollection : public QObject
36 {
37  Q_OBJECT
38 
39  public:
40  static QSharedPointer<FolderCollection> forCollection(
41  const Akonadi::Collection &coll, bool writeConfig = true );
42 
43  ~FolderCollection();
44 
45  Akonadi::Collection collection() const;
46  void setCollection( const Akonadi::Collection &collection );
47 
48  static QString configGroupName( const Akonadi::Collection &col );
49  static void clearCache();
50 
51  bool isWriteConfig() const;
52  void setWriteConfig( bool writeConfig );
53 
54  void writeConfig() const;
55  void readConfig();
56 
57  QString name() const;
58 
59  bool isReadOnly() const;
60 
61  bool isStructural() const;
62 
63  bool isSystemFolder() const;
64 
65  qint64 count() const;
66 
67  bool canDeleteMessages() const;
68 
69  bool canCreateMessages() const;
70 
71  bool isValid() const;
72 
73  Akonadi::Collection::Rights rights() const;
74 
75  Akonadi::CollectionStatistics statistics() const;
76 
77  void setShortcut( const KShortcut & );
78  const KShortcut &shortcut() const
79  {
80  return mShortcut;
81  }
82 
87  void setUseDefaultIdentity( bool useDefaultIdentity );
88  bool useDefaultIdentity() const
89  {
90  return mUseDefaultIdentity;
91  }
92 
93  void setIdentity( uint identity );
94  uint identity() const;
95 
99  void setMailingListEnabled( bool enabled );
100  bool isMailingListEnabled() const
101  {
102  return mMailingListEnabled;
103  }
104 
105  void setMailingList( const MailingList &mlist );
106 
107  MailingList mailingList() const
108  {
109  return mMailingList;
110  }
111 
116  bool putRepliesInSameFolder() const
117  {
118  return mPutRepliesInSameFolder;
119  }
120  void setPutRepliesInSameFolder( bool b )
121  {
122  mPutRepliesInSameFolder = b;
123  }
124 
128  bool hideInSelectionDialog() const
129  {
130  return mHideInSelectionDialog;
131  }
132  void setHideInSelectionDialog( bool hide )
133  {
134  mHideInSelectionDialog = hide;
135  }
136 
137  QString mailingListPostAddress() const;
138 
139  protected slots:
140  void slotIdentitiesChanged();
141 
142  private:
143  explicit FolderCollection( const Akonadi::Collection &col, bool writeconfig );
144 
145  Akonadi::Collection mCollection;
146 
148  bool mMailingListEnabled;
149  MailingList mMailingList;
150 
151  bool mUseDefaultIdentity;
152  uint mIdentity;
153 
155  bool mPutRepliesInSameFolder;
156 
158  bool mHideInSelectionDialog;
159 
161  KShortcut mShortcut;
162  bool mWriteConfig;
163 };
164 
165 }
166 
167 #endif
QSharedPointer
Definition: collectiongeneralpage.h:30
MailCommon::FolderCollection::setHideInSelectionDialog
void setHideInSelectionDialog(bool hide)
Definition: foldercollection.h:132
MailCommon::FolderCollection::useDefaultIdentity
bool useDefaultIdentity() const
Definition: foldercollection.h:88
QObject
MailCommon::FolderCollection::isMailingListEnabled
bool isMailingListEnabled() const
Definition: foldercollection.h:100
MailCommon::FolderCollection::putRepliesInSameFolder
bool putRepliesInSameFolder() const
Returns true if the replies to mails from this folder should be put in the same folder.
Definition: foldercollection.h:116
MailCommon::FolderCollection::mailingList
MailingList mailingList() const
Definition: foldercollection.h:107
mailcommon_export.h
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
MailCommon::FolderCollection::shortcut
const KShortcut & shortcut() const
Definition: foldercollection.h:78
MailCommon::FolderCollection::hideInSelectionDialog
bool hideInSelectionDialog() const
Returns true if this folder should be hidden from all folder selection dialogs.
Definition: foldercollection.h:128
MailCommon::FolderCollection
Definition: foldercollection.h:35
MailCommon::FolderCollection::setPutRepliesInSameFolder
void setPutRepliesInSameFolder(bool b)
Definition: foldercollection.h:120
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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

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