korganizer
kdatenavigator.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KDATENAVIGATOR_H
00026 #define KDATENAVIGATOR_H
00027
00028 #include <qframe.h>
00029 #include <qdatetime.h>
00030
00031 #include <libkcal/incidencebase.h>
00032
00033 class QPushButton;
00034 class QLabel;
00035
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 QDate startDate() const;
00065 QDate endDate() const;
00066 void setUpdateNeeded();
00067 public slots:
00068 void selectDates( const KCal::DateList & );
00069 void updateView();
00070 void updateConfig();
00071 void updateDayMatrix();
00072 void updateToday();
00073
00074 signals:
00075 void datesSelected( const KCal::DateList & );
00076 void incidenceDropped( Incidence *, const QDate & );
00077 void incidenceDroppedMove( Incidence *, const QDate & );
00078 void weekClicked( const QDate &);
00079
00080 void goPrevious();
00081 void goNext();
00082
00083 void goNextMonth();
00084 void goPrevMonth();
00085 void goNextYear();
00086 void goPrevYear();
00087
00088 void goMonth( int month );
00089 void goYear( int year );
00090
00091 protected:
00092 void updateDates();
00093
00094 void wheelEvent( QWheelEvent * );
00095
00096 bool eventFilter( QObject *,QEvent * );
00097
00098 void setShowWeekNums( bool enabled );
00099
00100 private:
00101 NavigatorBar *mNavigatorBar;
00102
00103 QLabel *mHeadings[ 7 ];
00104 QLabel *mWeeknos[ 7 ];
00105
00106 KODayMatrix *mDayMatrix;
00107
00108 KCal::DateList mSelectedDates;
00109 QDate mBaseDate;
00110
00111
00112 KDateNavigator( const KDateNavigator & );
00113 KDateNavigator &operator=( const KDateNavigator & );
00114 };
00115
00116 #endif
|