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 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 // Disabling copy constructor and assignment operator 00115 KDateNavigator( const KDateNavigator & ); 00116 KDateNavigator &operator=( const KDateNavigator & ); 00117 }; 00118 00119 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:56 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003