kontact
summaryview_part.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 SUMMARYVIEW_PART_H
00025 #define SUMMARYVIEW_PART_H
00026
00027 #include <tqdatetime.h>
00028 #include <tqmap.h>
00029
00030 #include <kparts/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 KAction;
00050 class KCMultiDialog;
00051
00052 class SummaryViewPart : public KParts::ReadOnlyPart
00053 {
00054 Q_OBJECT
00055
00056 public:
00057 SummaryViewPart( Kontact::Core *core, const char *widgetName,
00058 const KAboutData *aboutData,
00059 TQObject *parent = 0, const char *name = 0 );
00060 ~SummaryViewPart();
00061
00062 public slots:
00063 void slotTextChanged();
00064 void slotAdjustPalette();
00065 void setDate( const TQDate& newDate );
00066 void updateSummaries();
00067
00068 signals:
00069 void textChanged( const TQString& );
00070
00071 protected:
00072 virtual bool openFile();
00073 virtual void partActivateEvent( KParts::PartActivateEvent *event );
00074
00075 protected slots:
00076 void slotConfigure();
00077 void updateWidgets();
00078 void summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment );
00079
00080 private:
00081 void initGUI( Kontact::Core *core );
00082 void loadLayout();
00083 void saveLayout();
00084 TQString widgetName( TQWidget* ) const;
00085
00086 TQStringList configModules() const;
00087
00088 TQMap<TQString, Kontact::Summary*> mSummaries;
00089 Kontact::Core *mCore;
00090 DropWidget *mFrame;
00091 TQFrame *mMainWidget;
00092 TQVBoxLayout *mMainLayout;
00093 TQVBoxLayout *mLeftColumn;
00094 TQVBoxLayout *mRightColumn;
00095 TQLabel *mUsernameLabel;
00096 TQLabel *mDateLabel;
00097 KAction *mConfigAction;
00098
00099 TQStringList mLeftColumnSummaries;
00100 TQStringList mRightColumnSummaries;
00101 };
00102
00103 #endif
|