korganizer

koeventview.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 1999 Preston Brown <pbrown@kde.org>
00004     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00005     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020 
00021     As a special exception, permission is given to link this program
00022     with any edition of Qt, and distribute the resulting executable,
00023     without including the source code for Qt in the source distribution.
00024 */
00025 #ifndef _KOEVENTVIEW_H
00026 #define _KOEVENTVIEW_H
00027 
00028 #include <libkcal/incidencebase.h>
00029 
00030 #include <korganizer/baseview.h>
00031 
00032 
00033 namespace KCal {
00034 class Incidence;
00035 }
00036 using namespace KCal;
00037 
00038 class KOEventPopupMenu;
00039 class QPopupMenu;
00040 
00055 class KOEventView : public KOrg::BaseView
00056 {
00057     Q_OBJECT
00058 
00059   public:
00067     KOEventView(Calendar *cal,QWidget *parent=0,const char *name=0);
00068 
00072     virtual ~KOEventView();
00073 
00078     virtual int maxDatesHint() = 0;
00079 
00083     KOEventPopupMenu *eventPopup();
00084 
00088     QPopupMenu *newEventPopup();
00089 
00091     bool isEventView() { return true; }
00092 
00093     bool supportsDateNavigation() const { return true; }
00094 
00095     QMap<QDate, KCal::Event::List >  busyDays() const { return mBusyDays; }
00096     void setBusyDays( const QMap<QDate, KCal::Event::List > &days ) { mBusyDays = days; }
00097 
00098   public slots:
00099 
00104     void defaultAction( Incidence * );
00105 
00106   signals:
00114     void datesSelected(const DateList);
00115 
00116     //ET CVS MERGE !
00121     void shiftedEvent(const QDate& olddate, const QDate& newdate);
00122 
00123 
00124   protected slots:
00125     void popupShow();
00126     void popupEdit();
00127     void popupDelete();
00128     void popupCut();
00129     void popupCopy();
00130     virtual void showNewEventPopup();
00131 
00132   protected:
00133     static bool makesWholeDayBusy( Incidence *incidence );
00134     Incidence *mCurrentIncidence;  // Incidence selected e.g. for a context menu
00135 
00136     // Contains days that have at least one all-day Event with TRANSP: OPAQUE ( busy )
00137     // that has you as organizer or attendee so we can color background with a different
00138     // color
00139     QMap<QDate, KCal::Event::List > mBusyDays;
00140 };
00141 
00142 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys