author | zecke <zecke> | 2003-02-23 21:27:08 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-23 21:27:08 (UTC) |
commit | 041eda0d7482d60cd67731b81fd36104fcd3120f (patch) (unidiff) | |
tree | c7bc7730b9e76e22f828291d404821f7bd922d6f /core/pim/datebook2/view.h | |
parent | a195865dfdb03b4c7c972acfc8cfd87743ab3e6f (diff) | |
download | opie-041eda0d7482d60cd67731b81fd36104fcd3120f.zip opie-041eda0d7482d60cd67731b81fd36104fcd3120f.tar.gz opie-041eda0d7482d60cd67731b81fd36104fcd3120f.tar.bz2 |
Implement some of the new framework
-rw-r--r-- | core/pim/datebook2/view.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/core/pim/datebook2/view.h b/core/pim/datebook2/view.h index a7bc1d8..e2312a3 100644 --- a/core/pim/datebook2/view.h +++ b/core/pim/datebook2/view.h | |||
@@ -13,7 +13,7 @@ namespace Datebook { | |||
13 | class View { | 13 | class View { |
14 | public: | 14 | public: |
15 | View( MainWindow* window, QWidget* parent ); | 15 | View( MainWindow* window, QWidget* parent ); |
16 | virtual ~View() = 0; | 16 | virtual ~View(); |
17 | 17 | ||
18 | static QDate dateFromWeek( int week, int year, bool startOnMonda ); | 18 | static QDate dateFromWeek( int week, int year, bool startOnMonda ); |
19 | static bool calcWeek( const QDate& d, int &week, int &year, bool startOnMonday = false ); | 19 | static bool calcWeek( const QDate& d, int &week, int &year, bool startOnMonday = false ); |
@@ -22,6 +22,11 @@ namespace Datebook { | |||
22 | virtual QString description()const = 0; | 22 | virtual QString description()const = 0; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * return the uid of the current item or 0 | ||
26 | */ | ||
27 | virtual int currentItem()const = 0; | ||
28 | |||
29 | /** | ||
25 | * loadConfig | 30 | * loadConfig |
26 | * saveConfig | 31 | * saveConfig |
27 | */ | 32 | */ |
@@ -30,8 +35,10 @@ namespace Datebook { | |||
30 | 35 | ||
31 | /** | 36 | /** |
32 | * the current range | 37 | * the current range |
38 | * @param src Where to write the start datetime | ||
39 | * @param dest Where to write the end datetime | ||
33 | */ | 40 | */ |
34 | void currentRange( const QDateTime& src, const QDateTime& from); | 41 | virtual void currentRange( const QDateTime& src, const QDateTime& from) = 0; |
35 | 42 | ||
36 | /** | 43 | /** |
37 | * the clock format changed | 44 | * the clock format changed |
@@ -46,20 +53,21 @@ namespace Datebook { | |||
46 | 53 | ||
47 | /** | 54 | /** |
48 | * show date in your view!! | 55 | * show date in your view!! |
56 | * make the date visible in the current view | ||
49 | */ | 57 | */ |
50 | virtual void showDay( const QDate& date ) = 0; | 58 | virtual void showDay( const QDate& date ) = 0; |
51 | 59 | ||
52 | /** | 60 | /** |
53 | * return the widget | 61 | * return the widget |
54 | */ | 62 | */ |
55 | virtual QWidget* widget(); | 63 | virtual QWidget* widget() = 0; |
56 | 64 | ||
57 | /** | 65 | /** |
58 | * the view needs an update! | 66 | * the view needs an update! |
59 | */ | 67 | */ |
60 | virtual void reschedule() = 0 | 68 | virtual void reschedule() = 0; |
61 | protected: | 69 | protected: |
62 | void popup( int ); | 70 | void popup( int uid); |
63 | QString toShortText(const OEffectiveEvent& eff)const; | 71 | QString toShortText(const OEffectiveEvent& eff)const; |
64 | QString toText(const OEffectiveEvent& eff)const; | 72 | QString toText(const OEffectiveEvent& eff)const; |
65 | virtual void doLoadConfig( Config* ) = 0; | 73 | virtual void doLoadConfig( Config* ) = 0; |
@@ -114,8 +122,11 @@ namespace Datebook { | |||
114 | /** | 122 | /** |
115 | * return related records for days | 123 | * return related records for days |
116 | */ | 124 | */ |
117 | QPtrList<OPimRecord> records( const QDate& on ); | 125 | QList<OPimRecord> records( const QDate& on ); |
118 | QPtrList<OPimRecord> records( const QDate& start, const QDate& to ); | 126 | QList<OPimRecord> records( const QDate& start, const QDate& to ); |
127 | |||
128 | private: | ||
129 | MainWindow* m_win; | ||
119 | }; | 130 | }; |
120 | } | 131 | } |
121 | 132 | ||