summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.h
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.h60
1 files changed, 31 insertions, 29 deletions
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h
index c8cb26b..3e44364 100644
--- a/core/pim/datebook/datebookday.h
+++ b/core/pim/datebook/datebookday.h
@@ -39,20 +39,20 @@ class QPaintEvent;
class QResizeEvent;
class DateBookDayViewQuickLineEdit : public QLineEdit
{
- Q_OBJECT
+ Q_OBJECT
public:
- DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name=0);
+ DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name=0);
protected:
- Event quickEvent;
- int active;
- void focusOutEvent( QFocusEvent *e );
+ Event quickEvent;
+ int active;
+ void focusOutEvent( QFocusEvent *e );
protected slots:
- void slotReturnPressed(void);
+ void slotReturnPressed(void);
void finallyCallClose();
signals:
- void insertEvent(const Event &e);
+ void insertEvent(const Event &e);
};
class DateBookDayView : public QTable
@@ -66,15 +66,15 @@ public:
public slots:
void moveUp();
void moveDown();
- void slotDateChanged( int year, int month, int day );
+ void slotDateChanged( int year, int month, int day );
signals:
void sigColWidthChanged();
void sigCapturedKey( const QString &txt );
protected slots:
- void slotChangeClock( bool );
+ 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 );
@@ -83,10 +83,10 @@ protected:
void contentsMouseReleaseEvent( QMouseEvent *e );
void initHeader();
private:
bool ampm;
- QDate currDate;
- DateBookDayViewQuickLineEdit *quickLineEdit;
+ QDate currDate;
+ DateBookDayViewQuickLineEdit *quickLineEdit;
};
class DateBookDay;
class DateBookDayWidget : public QWidget
@@ -156,21 +156,21 @@ private:
//reimplemented the compareItems function so that it sorts DayWidgets by geometry heights
class WidgetListClass : public QList<DateBookDayWidget>
{
- private:
+ private:
- 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;
- }
- }
+ 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;
+ }
+ }
};
@@ -179,11 +179,12 @@ class DateBookDay : public QVBox
Q_OBJECT
friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB
public:
- DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb,
- QWidget *parent, const char *name );
+ DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb,DateBookHoliday*newHdb,
+ QWidget *parent, const char *name );
void selectedDates( QDateTime &start, QDateTime &end );
+
QDate date() const;
DateBookDayView *dayView() const { return view; }
void setStartViewTime( int startHere );
int startViewTime() const;
@@ -198,9 +199,9 @@ public slots:
void setDate( int y, int m, int d );
void setDate( QDate );
void redraw();
void slotWeekChanged( bool bStartOnMonday );
- void updateView(); //updates TimeMarker and DayWidget-colors
+ void updateView(); //updates TimeMarker and DayWidget-colors
signals:
void removeEvent( const Event& );
void editEvent( const Event& );
@@ -224,13 +225,14 @@ private:
DateBookDayView *view;
DateBookDayHeader *header;
DatebookdayAllday *m_allDays;
DateBookDB *db;
- WidgetListClass widgetList; //reimplemented QList for sorting widgets by height
+ WidgetListClass widgetList; //reimplemented QList for sorting widgets by height
int startTime;
- bool jumpToCurTime; //should we jump to current time in dayview?
+ bool jumpToCurTime; //should we jump to current time in dayview?
int rowStyle;
DateBookDayWidget *selectedWidget; //actual selected widget (obviously)
- DateBookDayTimeMarker *timeMarker; //marker for current time
+ DateBookDayTimeMarker *timeMarker; //marker for current time
+ DateBookHoliday*_holiday_db;
};
#endif