00001 #ifndef OPIE_DATE_BOOK_MANAGER_H 00002 #define OPIE_DATE_BOOK_MANAGER_H 00003 00004 #include <qlist.h> 00005 00006 #include <opie/opimrecord.h> 00007 #include <opie/odatebookaccess.h> 00008 00009 namespace Datebook { 00016 class BookManager { 00017 public: 00018 BookManager(); 00019 ~BookManager(); 00020 00021 bool isLoaded()const; 00022 bool load(); 00023 void reload(); 00024 bool save(); 00025 00026 OEvent event( int uid ); 00027 OEffectiveEvent::ValueList list( const QDate& from, 00028 const QDate& to ); 00029 ODateBookAccess::List allRecords()const; 00030 00031 void add( const OEvent& ); 00032 void add( const OPimRecord& ); 00033 void update( const OEvent& ); 00034 void remove( int uid ); 00035 void remove( const QArray<int>& ); 00036 00037 QList<OPimRecord> records( const QDate& from, 00038 const QDate& to ); 00039 00040 private: 00041 ODateBookAccess* m_db; 00042 }; 00043 } 00044 00045 #endif
1.4.2