Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.h | 31 |
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 @@ -39,9 +39,9 @@ class DateBookDayView : public QTable Q_OBJECT public: DateBookDayView( bool hourClock, QWidget *parent, const char *name ); bool whichClock() const; - + void setRowStyle( int style ); public slots: void moveUp(); @@ -54,9 +54,9 @@ protected slots: void slotChangeClock( bool ); protected: virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); virtual void paintFocus( QPainter *p, const QRect &cr ); - + virtual void resizeEvent( QResizeEvent *e ); void keyPressEvent( QKeyEvent *e ); void initHeader(); private: @@ -75,9 +75,9 @@ public: const QRect &geometry() { return geom; } void setGeometry( const QRect &r ); const EffectiveEvent &event() const { return ev; } - + signals: void deleteMe( const Event &e ); void editMe( const Event &e ); void beamMe( const Event &e ); @@ -86,8 +86,19 @@ protected: void paintEvent( QPaintEvent *e ); void mousePressEvent( QMouseEvent *e ); private: + /** + * Sets the text for an all day Event + * All day events have no time associated + */ + void setAllDayText( QString& text ); + + /** + * Sets the EventText + * it got a start and an end Time + */ + void setEventText( QString& text ); const EffectiveEvent ev; DateBookDay *dateBook; QString text; QRect geom; @@ -105,9 +116,9 @@ public: const QRect &geometry() { return geom; } void setGeometry( const QRect &r ); void setTime( const QTime &t ); -signals: +signals: protected: void paintEvent( QPaintEvent *e ); @@ -118,23 +129,23 @@ private: }; //reimplemented the compareItems function so that it sorts DayWidgets by geometry heights class WidgetListClass : public QList<DateBookDayWidget> -{ +{ private: - - int compareItems( QCollection::Item s1, QCollection::Item s2 ) - { + + int compareItems( QCollection::Item s1, QCollection::Item s2 ) + { //hmm, don't punish me for that ;) if (reinterpret_cast<DateBookDayWidget*>(s1)->geometry().height() > reinterpret_cast<DateBookDayWidget*>(s2)->geometry().height()) - { + { return -1; } else { return 1; } } - + }; class DateBookDay : public QVBox |