00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef KDATENAVIGATOR_H
00025
#define KDATENAVIGATOR_H
00026
00027
#include <qframe.h>
00028
#include <qdatetime.h>
00029
00030
#include <libkcal/incidencebase.h>
00031
00032
class QPushButton;
00033
class QLabel;
00034
00035
class KCalendarSystem;
00036
namespace KCal {
00037
class Calendar;
00038
class Incidence;
00039 }
00040
class NavigatorBar;
00041
using namespace KCal;
00042
00043
class KODayMatrix;
00044
00045
class KDateNavigator:
public QFrame
00046 {
00047 Q_OBJECT
00048
public:
00049 KDateNavigator(
QWidget *parent = 0,
const char *name = 0 );
00050 ~KDateNavigator();
00051
00055
void setCalendar( Calendar * );
00056
00057
void setBaseDate(
const QDate & );
00058
00059 KCal::DateList selectedDates()
const {
return mSelectedDates; }
00060
00061
QSizePolicy sizePolicy () const;
00062
00063 NavigatorBar *navigatorBar()
const {
return mNavigatorBar; }
00064
00065
public slots:
00066
void selectDates(
const KCal::DateList & );
00067
void updateView();
00068
void updateConfig();
00069
void updateDayMatrix();
00070
void updateToday();
00071
00072 signals:
00073
void datesSelected(
const KCal::DateList & );
00074
void incidenceDropped( Incidence * );
00075
void incidenceDroppedMove( Incidence *, Incidence * );
00076
void weekClicked(
const QDate &);
00077
00078
void goPrevious();
00079
void goNext();
00080
00081
void goNextMonth();
00082
void goPrevMonth();
00083
void goNextYear();
00084
void goPrevYear();
00085
00086
void goMonth(
int month );
00087
00088
protected:
00089
void updateDates();
00090
00091
void wheelEvent(
QWheelEvent * );
00092
00093
bool eventFilter(
QObject *,
QEvent * );
00094
00095
void setShowWeekNums(
bool enabled );
00096
00097
private:
00098 NavigatorBar *mNavigatorBar;
00099
00100
QFrame *headingSep;
00101
QFrame *weeknumSep;
00102
QLabel *headings[ 7 ];
00103
QLabel *weeknos[ 7 ];
00104
00105
KODayMatrix *mDayMatrix;
00106
00107 KCal::DateList mSelectedDates;
00108
QDate mBaseDate;
00109
00110 KCalendarSystem *mCalendarSystem;
00111
00112
const QString *curHeaders;
00113
00114
00115 KDateNavigator(
const KDateNavigator & );
00116 KDateNavigator &operator=(
const KDateNavigator & );
00117 };
00118
00119
#endif