kontact
sdsummarywidget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SDSUMMARYWIDGET_H
00026 #define SDSUMMARYWIDGET_H
00027
00028 #include <tqptrlist.h>
00029 #include <tqwidget.h>
00030
00031 #include <libkcal/calendarresources.h>
00032 #include <libkholidays/kholidays.h>
00033
00034 #include "summary.h"
00035
00036 namespace Kontact {
00037 class Plugin;
00038 }
00039
00040 class TQGridLayout;
00041 class TQLabel;
00042
00043 class SDSummaryWidget : public Kontact::Summary
00044 {
00045 Q_OBJECT
00046 TQ_OBJECT
00047
00048 public:
00049 SDSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent,
00050 const char *name = 0 );
00051
00052 TQStringList configModules() const;
00053 void configUpdated();
00054 void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
00055
00056 protected:
00057 virtual bool eventFilter( TQObject *obj, TQEvent* e );
00058
00059 private slots:
00060 void updateView();
00061 void popupMenu( const TQString &uid );
00062 void mailContact( const TQString &uid );
00063 void viewContact( const TQString &uid );
00064
00065 private:
00066 int span( KCal::Event *event );
00067 int dayof( KCal::Event *event, const TQDate &date );
00068 bool initHolidays();
00069 void dateDiff( const TQDate &date, int &days, int &years );
00070 TQGridLayout *mLayout;
00071 TQPtrList<TQLabel> mLabels;
00072 Kontact::Plugin *mPlugin;
00073 KCal::CalendarResources *mCalendar;
00074 int mDaysAhead;
00075 bool mShowBirthdaysFromKAB;
00076 bool mShowBirthdaysFromCal;
00077 bool mShowAnniversariesFromKAB;
00078 bool mShowAnniversariesFromCal;
00079 bool mShowHolidays;
00080 bool mShowSpecialsFromCal;
00081
00082 KHolidays *mHolidays;
00083 };
00084
00085 #endif
|