kmailicalifaceimpl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KMAILICALIFACEIMPL_H
00024 #define KMAILICALIFACEIMPL_H
00025
00026 #include "kmailicalIface.h"
00027
00028 #include <kfoldertree.h>
00029
00030 #include "kmfoldertype.h"
00031
00032 class KMFolder;
00033 class KMMessage;
00034 class KMFolderDir;
00035 class KMFolderTreeItem;
00036
00037
00038 class KMailICalIfaceImpl : public QObject, virtual public KMailICalIface {
00039 Q_OBJECT
00040 public:
00041 KMailICalIfaceImpl();
00042
00043 virtual bool addIncidence( const QString& folder, const QString& uid,
00044 const QString& ical );
00045 virtual bool deleteIncidence( const QString& folder, const QString& uid );
00046 virtual QStringList incidences( const QString& folder );
00047
00048
00049
00050 virtual bool update( const QString& folder, const QStringList& entries );
00051
00052
00053 virtual bool update( const QString& folder, const QString& uid,
00054 const QString& entry );
00055
00056
00057 void msgRemoved( KMFolder*, KMMessage* );
00058
00060 void initFolders();
00061
00063 void cleanup();
00064
00069 bool isResourceImapFolder( KMFolder* folder ) const;
00070
00075 KFolderTreeItem::Type folderType( KMFolder* folder ) const;
00076
00081 QString folderPixmap( KFolderTreeItem::Type type ) const;
00082
00085 QString folderName( KFolderTreeItem::Type type, int language = -1 ) const;
00086
00088 KMFolder* folderFromType( const QString& type );
00089
00091 QString icalFolderType( KMFolder* folder ) const;
00092
00093
00094 void readConfig();
00095
00097 static KMMessage* findMessageByUID( const QString& uid, KMFolder* folder );
00098
00100 static void deleteMsg( KMMessage* msg );
00101
00102 bool isEnabled() const { return mUseResourceIMAP; }
00103
00104 public slots:
00105 void slotIncidenceAdded( KMFolder* folder, Q_UINT32 sernum );
00106 void slotIncidenceDeleted( KMFolder* folder, Q_UINT32 sernum );
00107 void slotRefresh( const QString& type);
00108
00109 private slots:
00110 void slotRefreshCalendar();
00111 void slotRefreshTasks();
00112 void slotRefreshJournals();
00113 void slotRefreshContacts();
00114 void slotRefreshNotes();
00115
00116 private:
00118 KMFolder* initFolder( KFolderTreeItem::Type itemType, const char* typeString );
00119
00120 void loadPixmaps() const;
00121
00122 KMFolder* mContacts;
00123 KMFolder* mCalendar;
00124 KMFolder* mNotes;
00125 KMFolder* mTasks;
00126 KMFolder* mJournals;
00127
00128 unsigned int mFolderLanguage;
00129
00130 KMFolderDir* mFolderParent;
00131 KMFolderType mFolderType;
00132
00133
00134 static QPixmap *pixContacts, *pixCalendar, *pixNotes, *pixTasks;
00135
00136 bool mUseResourceIMAP;
00137 bool mResourceQuiet;
00138 };
00139
00140 #endif // KMAILICALIFACEIMPL_H
This file is part of the documentation for kmail Library Version 3.2.2.