Framework for looking up contacts directly in nepomuk in addition to going through...
[kdepim.git] / mailcommon / collectiongeneralpage.h
blob57c0d0c9edd87046c568a0856e31cccfd06ee26a
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2 Copyright (c) 2009 Montel Laurent <montel@kde.org>
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.
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.
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
18 #ifndef MAILCOMMON_COLLECTIONGENERALPAGE_H
19 #define MAILCOMMON_COLLECTIONGENERALPAGE_H
21 #include "mailcommon_export.h"
23 #include <Akonadi/CollectionPropertiesPage>
25 class KComboBox;
26 class KLineEdit;
28 class QCheckBox;
30 template <typename T> class QSharedPointer;
32 namespace KPIMIdentities {
33 class IdentityCombo;
36 namespace MailCommon {
38 class FolderCollection;
40 class MAILCOMMON_EXPORT CollectionGeneralPage : public Akonadi::CollectionPropertiesPage
42 Q_OBJECT
44 public:
45 explicit CollectionGeneralPage( QWidget *parent = 0 );
46 ~CollectionGeneralPage();
48 void load( const Akonadi::Collection &collection );
49 void save( Akonadi::Collection &collection );
51 enum FolderContentsType {
52 ContentsTypeMail = 0,
53 ContentsTypeCalendar,
54 ContentsTypeContact,
55 ContentsTypeNote,
56 ContentsTypeTask,
57 ContentsTypeJournal,
58 ContentsTypeLast = ContentsTypeJournal
61 enum IncidencesFor {
62 IncForNobody,
63 IncForAdmins,
64 IncForReaders
67 protected:
68 void init( const Akonadi::Collection & );
70 private Q_SLOTS:
71 void slotIdentityCheckboxChanged();
72 void slotFolderContentsSelectionChanged( int );
73 void slotNameChanged( const QString &name );
75 private:
76 KComboBox *mContentsComboBox;
77 KComboBox *mIncidencesForComboBox;
78 QCheckBox *mSharedSeenFlagsCheckBox;
79 #if 0
80 QCheckBox *mNewMailCheckBox;
81 #endif
82 QCheckBox *mNotifyOnNewMailCheckBox;
83 QCheckBox *mKeepRepliesInSameFolderCheckBox;
84 QCheckBox *mHideInSelectionDialogCheckBox;
85 QCheckBox *mUseDefaultIdentityCheckBox;
86 KLineEdit *mNameEdit;
87 KPIMIdentities::IdentityCombo *mIdentityComboBox;
88 QSharedPointer<MailCommon::FolderCollection> mFolderCollection;
89 bool mIsLocalSystemFolder;
90 bool mIsResourceFolder;
93 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY( CollectionGeneralPageFactory, CollectionGeneralPage )
97 #endif