kmail Library API Documentation

kmailicalifaceimpl.h

00001 /* 00002 This file is part of KMail. 00003 00004 Copyright (c) 2003 Steffen Hansen <steffen@klaralvdalens-datakonsult.se> 00005 Copyright (c) 2003 - 2004 Bo Thorsen <bo@klaralvdalens-datakonsult.se> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 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 // This saves the iCals/vCards in the entries in the folder. 00049 // The format in the string list is uid, entry, uid, entry... 00050 virtual bool update( const QString& folder, const QStringList& entries ); 00051 00052 // Update a single entry in the storage layer 00053 virtual bool update( const QString& folder, const QString& uid, 00054 const QString& entry ); 00055 00056 // tell KOrganizer about messages to be deleted 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 /* (Re-)Read configuration file */ 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 // groupware folder icons: 00134 static QPixmap *pixContacts, *pixCalendar, *pixNotes, *pixTasks; 00135 00136 bool mUseResourceIMAP; 00137 bool mResourceQuiet; 00138 }; 00139 00140 #endif // KMAILICALIFACEIMPL_H
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:57:58 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003