kmail

kmail_part.h
1 /*
2  This file is part of KMail.
3  Copyright (c) 2002-2003 Don Sanders <sanders@kde.org>,
4  Copyright (c) 2003 Zack Rusin <zack@kde.org>,
5  Based on the work of Cornelius Schumacher <schumacher@kde.org>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, permission is given to link this program
22  with any edition of TQt, and distribute the resulting executable,
23  without including the source code for TQt in the source distribution.
24 */
25 #ifndef KMail_PART_H
26 #define KMail_PART_H
27 
28 #include "kmailpartIface.h"
29 
30 #include <tdeversion.h>
31 #include <tdeparts/browserextension.h>
32 #include <tdeparts/statusbarextension.h>
33 #include <tdeparts/factory.h>
34 #include <tdeparts/event.h>
35 #include <tdeparts/part.h>
36 
37 #include <tqwidget.h>
38 #include <tdemacros.h>
39 
40 class TDEInstance;
41 class TDEAboutData;
42 class KMailStatusBarExtension;
43 class KMKernel;
44 class KMMainWidget;
45 namespace KPIM { class StatusbarProgressWidget; }
46 using KPIM::StatusbarProgressWidget;
47 class KMFolder;
48 class KMFolderTreeItem;
49 
50 class ActionManager;
51 
52 class TDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPartIface
53 {
54  TQ_OBJECT
55 
56  public:
57  KMailPart(TQWidget *parentWidget, const char *widgetName,
58  TQObject *parent, const char *name, const TQStringList &);
59  virtual ~KMailPart();
60 
61  TQWidget* parentWidget() const;
62 
63  static TDEAboutData *createAboutData();
64 
65  public slots:
66  virtual void save() { /*TODO*/ }
67  virtual void exit();
68  virtual void updateEditMenu() {}
69  void exportFolder( KMFolder* folder );
70  void slotIconChanged( KMFolderTreeItem *fti );
71  void slotNameChanged( KMFolderTreeItem *fti );
72 
73  signals:
74  void textChanged( const TQString& );
75  void iconChanged( const TQPixmap& );
76 
77  protected:
78  virtual bool openFile();
79  virtual void guiActivateEvent(KParts::GUIActivateEvent *e);
80 
81  private:
82  KMKernel *mKMailKernel;
83  KMMainWidget *mainWidget;
84  ActionManager *mActionManager;
85  KMailStatusBarExtension *mStatusBar;
86  TQWidget *mParentWidget;
87 };
88 
89 class KMailStatusBarExtension : public KParts::StatusBarExtension
90 {
91 public:
92  KMailStatusBarExtension( KMailPart *parent );
93 
94  TDEMainWindow *mainWindow() const;
95 
96 private:
97  KMailPart *mParent;
98  StatusbarProgressWidget *mLittleProgress;
99 };
100 
101 #endif
Mail folder.
Definition: kmfolder.h:69
Central point of coordination in KMail.
Definition: kmkernel.h:92