kontact
apptsummarywidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SUMMARYWIDGET_H
00027 #define SUMMARYWIDGET_H
00028
00029 #include <kontactinterfaces/summary.h>
00030 #include <QList>
00031
00032 namespace KCal {
00033 class CalendarResources;
00034 class Event;
00035 }
00036
00037 class KOrganizerPlugin;
00038
00039 class QDate;
00040 class QEvent;
00041 class QGridLayout;
00042 class QLabel;
00043 class QWidget;
00044
00045 class ApptSummaryWidget : public Kontact::Summary
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 ApptSummaryWidget( KOrganizerPlugin *plugin, QWidget *parent );
00051 ~ApptSummaryWidget();
00052
00053 int summaryHeight() const { return 3; }
00054 QStringList configModules() const;
00055 void configUpdated();
00056 void updateSummary( bool force = false )
00057 {
00058 Q_UNUSED( force );
00059 updateView();
00060 }
00061
00062 protected:
00063 virtual bool eventFilter( QObject *obj, QEvent *e );
00064
00065 private slots:
00066 void updateView();
00067 void popupMenu( const QString &uid );
00068 void viewEvent( const QString &uid );
00069 void removeEvent( const QString &uid );
00070
00071 private:
00072 void dateDiff( const QDate &date, int &days );
00073 bool skip( KCal::Event *event );
00074
00075 QGridLayout *mLayout;
00076 QList<QLabel *> mLabels;
00077 KOrganizerPlugin *mPlugin;
00078 KCal::CalendarResources *mCalendar;
00079 int mDaysAhead;
00080 bool mShowBirthdaysFromCal;
00081 bool mShowAnniversariesFromCal;
00082 };
00083
00084 #endif