00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SUMMARYVIEW_PART_H
00025 #define SUMMARYVIEW_PART_H
00026
00027 #include <tqdatetime.h>
00028 #include <tqmap.h>
00029
00030 #include <tdeparts/part.h>
00031
00032 #include "core.h"
00033 #include "dropwidget.h"
00034
00035 namespace Kontact
00036 {
00037 class Plugin;
00038 class Summary;
00039 }
00040
00041 namespace KParts
00042 {
00043 class PartActivateEvent;
00044 }
00045
00046 class TQFrame;
00047 class TQLabel;
00048 class TQGridLayout;
00049 class TDEAction;
00050 class KCMultiDialog;
00051
00052 class SummaryViewPart : public KParts::ReadOnlyPart
00053 {
00054 Q_OBJECT
00055
00056
00057 public:
00058 SummaryViewPart( Kontact::Core *core, const char *widgetName,
00059 const TDEAboutData *aboutData,
00060 TQObject *parent = 0, const char *name = 0 );
00061 ~SummaryViewPart();
00062
00063 public slots:
00064 void slotTextChanged();
00065 void slotAdjustPalette();
00066 void setDate( const TQDate& newDate );
00067 void updateSummaries();
00068
00069 signals:
00070 void textChanged( const TQString& );
00071
00072 protected:
00073 virtual bool openFile();
00074 virtual void partActivateEvent( KParts::PartActivateEvent *event );
00075
00076 protected slots:
00077 void slotConfigure();
00078 void updateWidgets();
00079 void summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment );
00080
00081 private:
00082 void initGUI( Kontact::Core *core );
00083 void loadLayout();
00084 void saveLayout();
00085 TQString widgetName( TQWidget* ) const;
00086
00087 TQStringList configModules() const;
00088
00089 TQMap<TQString, Kontact::Summary*> mSummaries;
00090 Kontact::Core *mCore;
00091 DropWidget *mFrame;
00092 TQFrame *mMainWidget;
00093 TQVBoxLayout *mMainLayout;
00094 TQVBoxLayout *mLeftColumn;
00095 TQVBoxLayout *mRightColumn;
00096 TQLabel *mUsernameLabel;
00097 TQLabel *mDateLabel;
00098 TDEAction *mConfigAction;
00099
00100 TQStringList mLeftColumnSummaries;
00101 TQStringList mRightColumnSummaries;
00102 };
00103
00104 #endif