summaryview_part.h
00001 /* 00002 This file is part of KDE Kontact. 00003 00004 Copyright (C) 2003 Sven Lüppken <sven@kde.org> 00005 Copyright (C) 2003 Tobias König <tokoe@kde.org> 00006 Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. 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