summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.h
authorzecke <zecke>2002-06-25 19:55:53 (UTC)
committer zecke <zecke>2002-06-25 19:55:53 (UTC)
commitaf4a3940dd672423da28b54e5d955cc5d33cecda (patch) (unidiff)
treecb5fcfe4835c86353e9d54b1050c7dfb23898bf1 /core/pim/datebook/datebookday.h
parent8635f264c15b05152fc1a44f798c154472a4b227 (diff)
downloadopie-af4a3940dd672423da28b54e5d955cc5d33cecda.zip
opie-af4a3940dd672423da28b54e5d955cc5d33cecda.tar.gz
opie-af4a3940dd672423da28b54e5d955cc5d33cecda.tar.bz2
All day events are not from 00:00 to 23:59 they're all day now.
Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h
index be7cc45..db1cd04 100644
--- a/core/pim/datebook/datebookday.h
+++ b/core/pim/datebook/datebookday.h
@@ -40,7 +40,7 @@ class DateBookDayView : public QTable
40public: 40public:
41 DateBookDayView( bool hourClock, QWidget *parent, const char *name ); 41 DateBookDayView( bool hourClock, QWidget *parent, const char *name );
42 bool whichClock() const; 42 bool whichClock() const;
43 43
44 void setRowStyle( int style ); 44 void setRowStyle( int style );
45 45
46public slots: 46public slots:
@@ -55,7 +55,7 @@ protected slots:
55protected: 55protected:
56 virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); 56 virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected );
57 virtual void paintFocus( QPainter *p, const QRect &cr ); 57 virtual void paintFocus( QPainter *p, const QRect &cr );
58 58
59 virtual void resizeEvent( QResizeEvent *e ); 59 virtual void resizeEvent( QResizeEvent *e );
60 void keyPressEvent( QKeyEvent *e ); 60 void keyPressEvent( QKeyEvent *e );
61 void initHeader(); 61 void initHeader();
@@ -76,7 +76,7 @@ public:
76 void setGeometry( const QRect &r ); 76 void setGeometry( const QRect &r );
77 77
78 const EffectiveEvent &event() const { return ev; } 78 const EffectiveEvent &event() const { return ev; }
79 79
80signals: 80signals:
81 void deleteMe( const Event &e ); 81 void deleteMe( const Event &e );
82 void editMe( const Event &e ); 82 void editMe( const Event &e );
@@ -87,6 +87,17 @@ protected:
87 void mousePressEvent( QMouseEvent *e ); 87 void mousePressEvent( QMouseEvent *e );
88 88
89private: 89private:
90 /**
91 * Sets the text for an all day Event
92 * All day events have no time associated
93 */
94 void setAllDayText( QString& text );
95
96 /**
97 * Sets the EventText
98 * it got a start and an end Time
99 */
100 void setEventText( QString& text );
90 const EffectiveEvent ev; 101 const EffectiveEvent ev;
91 DateBookDay *dateBook; 102 DateBookDay *dateBook;
92 QString text; 103 QString text;
@@ -106,7 +117,7 @@ public:
106 void setGeometry( const QRect &r ); 117 void setGeometry( const QRect &r );
107 void setTime( const QTime &t ); 118 void setTime( const QTime &t );
108 119
109signals: 120signals:
110 121
111protected: 122protected:
112 void paintEvent( QPaintEvent *e ); 123 void paintEvent( QPaintEvent *e );
@@ -119,21 +130,21 @@ private:
119 130
120//reimplemented the compareItems function so that it sorts DayWidgets by geometry heights 131//reimplemented the compareItems function so that it sorts DayWidgets by geometry heights
121class WidgetListClass : public QList<DateBookDayWidget> 132class WidgetListClass : public QList<DateBookDayWidget>
122 { 133{
123 private: 134 private:
124 135
125 int compareItems( QCollection::Item s1, QCollection::Item s2 ) 136 int compareItems( QCollection::Item s1, QCollection::Item s2 )
126 { 137 {
127 //hmm, don't punish me for that ;) 138 //hmm, don't punish me for that ;)
128 if (reinterpret_cast<DateBookDayWidget*>(s1)->geometry().height() > reinterpret_cast<DateBookDayWidget*>(s2)->geometry().height()) 139 if (reinterpret_cast<DateBookDayWidget*>(s1)->geometry().height() > reinterpret_cast<DateBookDayWidget*>(s2)->geometry().height())
129 { 140 {
130 return -1; 141 return -1;
131 } else 142 } else
132 { 143 {
133 return 1; 144 return 1;
134 } 145 }
135 } 146 }
136 147
137 148
138}; 149};
139 150