Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

datebooktypes.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003 
00004                              Copyright (C) Opie Team <opie-devel@handhelds.org>
00005               =.
00006             .=l.
00007            .>+-=
00008  _;:,     .>    :=|.         This program is free software; you can
00009 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00010 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00011 .="- .-=="i,     .._         License as published by the Free Software
00012  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00013      ._= =}       :          or (at your option) any later version.
00014     .%`+i>       _;_.
00015     .i_,=:_.      -<s.       This program is distributed in the hope that
00016      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00017     : ..    .:,     . . .    without even the implied warranty of
00018     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00019   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00020 ..}^=.=       =       ;      Library General Public License for more
00021 ++=   -.     .`     .:       details.
00022 :     =  ...= . :.=-
00023  -.   .:....=;==+<;          You should have received a copy of the GNU
00024   -_. . .   )=.  =           Library General Public License along with
00025     --        :-=`           this library; see the file COPYING.LIB.
00026                              If not, write to the Free Software Foundation,
00027                              Inc., 59 Temple Place - Suite 330,
00028                              Boston, MA 02111-1307, USA.
00029 */
00030 
00031 #ifndef _DATEBOOK_TYPES_H
00032 #define _DATEBOOK_TYPES_H
00033 
00034 #include <qpe/datebookdb.h>
00035 
00036 #include <qvaluelist.h>
00037 #include <qstringlist.h>
00038 
00039 namespace Opie {
00040 namespace Datebook {
00041     class HolidayPlugin;
00042     class HolidayPluginIf;
00043 }
00044 namespace Core {
00045     class OPluginLoader;
00046     class OPluginManager;
00047 }
00048 }
00049 
00050 class QLibrary;
00051 
00052 enum { DAY=1,WEEK,WEEKLST,MONTH };  // defaultView values
00053 enum { NONE=0,NORMAL,EXTENDED };    // WeekLstView's modes.
00054 
00055 class DateBookDBHack : virtual public DateBookDB {
00056  public:
00057   virtual ~DateBookDBHack(){}
00058   Event eventByUID(int id);
00059 };
00060 
00061 class DateBookHoliday
00062 {
00063 public:
00064     DateBookHoliday();
00065     virtual ~DateBookHoliday();
00066 
00067     QStringList holidaylist(const QDate&);
00068     QStringList holidaylist(unsigned year, unsigned month, unsigned day);
00069     virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDate &from,const QDate &to );
00070     virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDateTime &start);
00071 
00072     void reloadPlugins();
00073 
00074     Opie::Core::OPluginLoader*pluginLoader(){return m_pluginLoader;}
00075     Opie::Core::OPluginManager*pluginManager(){return m_pluginManager;}
00076 
00077 protected:
00078     void init();
00079     void deinit();
00080 
00081     struct HPlugin {
00082         Opie::Datebook::HolidayPlugin*_plugin;
00083         //QLibrary*_lib;
00084         //Opie::Datebook::HolidayPluginIf*_if;
00085     };
00086     QValueList<HPlugin*>_pluginlist;
00087     Opie::Core::OPluginLoader*m_pluginLoader;
00088     Opie::Core::OPluginManager*m_pluginManager;
00089 };
00090 
00091 class DateBookDBHoliday:virtual public DateBookDBHack {
00092 public:
00093     DateBookDBHoliday():DateBookDBHack(){db_holiday=0;}
00094     virtual ~DateBookDBHoliday(){}
00095     virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDate &from,const QDate &to );
00096     virtual QValueList<EffectiveEvent> getEffectiveEvents(const QDateTime &start);
00097     virtual QValueList<EffectiveEvent> getEffectiveEventsNoHoliday(const QDate &from,const QDate &to );
00098     virtual QValueList<EffectiveEvent> getEffectiveEventsNoHoliday(const QDateTime &start);
00099 
00100     DateBookHoliday*db_holiday;
00101 };
00102 
00103 #endif

Generated on Sat Nov 5 16:15:48 2005 for OPIE by  doxygen 1.4.2