baseview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KORG_BASEVIEW_H
00022 #define KORG_BASEVIEW_H
00023
00024
00025
00026 #include <qwidget.h>
00027 #include <qptrlist.h>
00028 #include <qvaluelist.h>
00029
00030 #include <klocale.h>
00031 #include <kdebug.h>
00032 #include <kmessagebox.h>
00033
00034 #include <libkcal/event.h>
00035 #include <libkcal/calendar.h>
00036
00037 using namespace KCal;
00038
00039 class CalPrinter;
00040
00041 namespace KOrg {
00042
00054 class BaseView : public QWidget
00055 {
00056 Q_OBJECT
00057 public:
00066 BaseView(Calendar *cal, QWidget *parent = 0, const char *name = 0) :
00067 QWidget(parent, name), mCalendar(cal) {}
00068
00072 virtual ~BaseView() {}
00073
00077 Calendar *calendar() { return mCalendar; }
00078
00084 virtual QPtrList<Incidence> selectedIncidences() = 0;
00085
00091 virtual DateList selectedDates() = 0;
00092
00100
00101
00102
00103
00104
00105 virtual void printPreview(CalPrinter *,
00106 const QDate &, const QDate &)
00107 {
00108 KMessageBox::sorry(this, i18n("Unfortunately, we don't handle printing for\n"
00109 "that view yet.\n"));
00110 }
00111
00117 virtual void print(CalPrinter *)
00118 {
00119 KMessageBox::sorry(this, i18n("Unfortunately, we don't handle printing for\n"
00120 "that view yet.\n"));
00121 }
00122
00126 virtual int currentDateCount() = 0;
00127
00129 virtual bool isEventView() { return false; }
00130
00131 public slots:
00140 virtual void showDates( const QDate &start, const QDate &end ) = 0;
00141
00148 virtual void showEvents(QPtrList<Event> eventList) = 0;
00149
00154 virtual void updateView() = 0;
00155
00159 virtual void flushView() {}
00160
00164 virtual void changeEventDisplay(Event *, int) = 0;
00165
00170 virtual void updateConfig() {}
00171
00175 virtual void clearSelection() {}
00176
00177 signals:
00178 void incidenceSelected( Incidence * );
00179
00180 private:
00181 Calendar *mCalendar;
00182 };
00183
00184 }
00185 #endif
This file is part of the documentation for kdelibs Version 3.1.5.