korganizer Library API Documentation

kdatenavigator.h

00001 /* 00002 This file is part of KOrganizer. 00003 00004 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 #ifndef KDATENAVIGATOR_H 00025 #define KDATENAVIGATOR_H 00026 00027 #include <qframe.h> 00028 #include <qdatetime.h> 00029 #include <qlabel.h> 00030 00031 #include <libkcal/calendar.h> 00032 00033 #include "kodaymatrix.h" 00034 00035 class QPushButton; 00036 class QTimer; 00037 00038 class KCalendarSystem; 00039 00040 class NavigatorBar; 00041 00042 class KDateNavigator: public QFrame 00043 { 00044 Q_OBJECT 00045 public: 00046 KDateNavigator( QWidget *parent = 0, 00047 bool show_week_numbers = false, const char *name = 0, 00048 QDate date = QDate::currentDate() ); 00049 ~KDateNavigator(); 00050 00054 void setCalendar( Calendar * ); 00055 00066 enum RolloverType { None, FollowDay, FollowMonth } ; 00067 void enableRollover( RolloverType ); 00068 00069 void setShowWeekNums( bool enabled ); 00070 00071 public slots: 00072 void selectDates( const KCal::DateList & ); 00073 void updateView(); 00074 void updateConfig(); 00075 void updateDayMatrix(); 00076 00077 signals: 00078 void datesSelected( const KCal::DateList & ); 00079 void eventDropped( Event * ); 00080 void eventDroppedMove( Event *, Event * ); 00081 void todoDropped( Todo * ); 00082 void todoDroppedMove( Todo *, Todo * ); 00083 void weekClicked( const QDate &); 00084 00085 void goPrevious(); 00086 void goNext(); 00087 00088 void goNextMonth(); 00089 void goPrevMonth(); 00090 void goNextYear(); 00091 void goPrevYear(); 00092 00093 void goMonth( int month ); 00094 00095 // Signals emitted at midnight carrying the new date. 00096 void dayPassed( QDate ); 00097 void monthPassed( QDate ); 00098 00099 protected slots: 00109 void possiblyPastMidnight(); 00110 00114 void passedMidnight(); 00115 00116 protected: 00117 void updateDates(); 00118 00119 void wheelEvent( QWheelEvent * ); 00120 00121 bool eventFilter( QObject *,QEvent * ); 00122 00123 private: 00124 int dayNum( int row, int col ); 00125 int dayToIndex( int dayNum ); 00126 00127 NavigatorBar *mNavigatorBar; 00128 00129 QFrame *headingSep; 00130 QFrame *weeknumSep; 00131 QLabel *headings[ 7 ]; 00132 QLabel *weeknos[ 7 ]; 00133 00134 KODayMatrix *mDayMatrix; 00135 00136 KCal::DateList mSelectedDates; 00137 QDate m_MthYr; 00138 int m_fstDayOfWk; 00139 bool m_bShowWeekNums; 00140 00141 KCalendarSystem *mCalendarSystem; 00142 00143 const QString *curHeaders; 00144 00148 QTimer *updateTimer; 00149 QDate lastDayChecked; 00150 RolloverType updateRollover; 00151 00152 // Disabling copy constructor and assignment operator 00153 KDateNavigator( const KDateNavigator & ); 00154 KDateNavigator &operator=( const KDateNavigator & ); 00155 }; 00156 00157 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:12 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003