summaryview_part.h
1/*
2 This file is part of KDE Kontact.
3
4 Copyright (C) 2003 Sven Lüppken <sven@kde.org>
5 Copyright (C) 2003 Tobias König <tokoe@kde.org>
6 Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22*/
23
24#ifndef SUMMARYVIEW_PART_H
25#define SUMMARYVIEW_PART_H
26
27#include <tqdatetime.h>
28#include <tqmap.h>
29
30#include <tdeparts/part.h>
31
32#include "core.h"
33#include "dropwidget.h"
34
35namespace Kontact
36{
37 class Plugin;
38 class Summary;
39}
40
41namespace KParts
42{
43 class PartActivateEvent;
44}
45
46class TQFrame;
47class TQLabel;
48class TQGridLayout;
49class TDEAction;
50class KCMultiDialog;
51
52class SummaryViewPart : public KParts::ReadOnlyPart
53{
54 TQ_OBJECT
55
56
57 public:
58 SummaryViewPart( Kontact::Core *core, const char *widgetName,
59 const TDEAboutData *aboutData,
60 TQObject *parent = 0, const char *name = 0 );
61 ~SummaryViewPart();
62
63 public slots:
64 void slotTextChanged();
65 void slotAdjustPalette();
66 void setDate( const TQDate& newDate );
67 void updateSummaries();
68
69 signals:
70 void textChanged( const TQString& );
71
72 protected:
73 virtual bool openFile();
74 virtual void partActivateEvent( KParts::PartActivateEvent *event );
75
76 protected slots:
77 void slotConfigure();
78 void updateWidgets();
79 void summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment );
80
81 private:
82 void initGUI( Kontact::Core *core );
83 void loadLayout();
84 void saveLayout();
85 TQString widgetName( TQWidget* ) const;
86
87 TQStringList configModules() const;
88
89 TQMap<TQString, Kontact::Summary*> mSummaries;
90 Kontact::Core *mCore;
91 DropWidget *mFrame;
92 TQFrame *mMainWidget;
93 TQVBoxLayout *mMainLayout;
94 TQVBoxLayout *mLeftColumn;
95 TQVBoxLayout *mRightColumn;
96 TQLabel *mUsernameLabel;
97 TQLabel *mDateLabel;
98 TDEAction *mConfigAction;
99
100 TQStringList mLeftColumnSummaries;
101 TQStringList mRightColumnSummaries;
102};
103
104#endif
This class provides the interface to the Kontact core for the plugins.
Definition: core.h:42