kontact
todosummarywidget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef TODO_SUMMARYWIDGET_H
00025 #define TODO_SUMMARYWIDGET_H
00026
00027 #include <qptrlist.h>
00028 #include <qwidget.h>
00029
00030 #include <libkcal/calendarresources.h>
00031
00032 #include "summary.h"
00033
00034 class QGridLayout;
00035 class QLabel;
00036
00037 class TodoPlugin;
00038
00039 class TodoSummaryWidget : public Kontact::Summary
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 TodoSummaryWidget( TodoPlugin *plugin, QWidget *parent,
00045 const char *name = 0 );
00046 ~TodoSummaryWidget();
00047
00048 int summaryHeight() const { return 3; }
00049 QStringList configModules() const;
00050
00051 public slots:
00052 void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
00053
00054 protected:
00055 virtual bool eventFilter( QObject *obj, QEvent* e );
00056
00057 private slots:
00058 void updateView();
00059 void popupMenu( const QString &uid );
00060 void viewTodo( const QString &uid );
00061 void removeTodo( const QString &uid );
00062 void completeTodo( const QString &uid );
00063
00064 private:
00065 TodoPlugin *mPlugin;
00066 QGridLayout *mLayout;
00067
00068 QPtrList<QLabel> mLabels;
00069 KCal::CalendarResources *mCalendar;
00070 };
00071
00072 #endif
|