Better wording
[kdepim.git] / kmail / kmail_part.h
blobe785491d1d84f79e93a31713c563d26d70caba1e
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>
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.
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.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution.
25 #ifndef KMail_PART_H
26 #define KMail_PART_H
28 #include "kmail_export.h"
29 #include <kparts/browserextension.h>
30 #include <kparts/statusbarextension.h>
31 #include <kparts/event.h>
32 #include <kparts/part.h>
33 #include <akonadi/collection.h>
35 #include <QWidget>
36 #include <QPixmap>
38 class KMailStatusBarExtension;
39 class KMKernel;
40 class KMMainWidget;
41 namespace KPIM { class StatusbarProgressWidget; }
42 using KPIM::StatusbarProgressWidget;
44 class ActionManager;
47 class KMailPart: public KParts::ReadOnlyPart
49 Q_OBJECT
50 Q_CLASSINFO("D-Bus Interface", "org.kde.kmail.kmailpart")
52 public:
53 KMailPart(QWidget *parentWidget, QObject *parent, const QVariantList &);
54 virtual ~KMailPart();
56 QWidget* parentWidget() const;
58 public slots:
59 Q_SCRIPTABLE void save() { /*TODO*/ }
60 Q_SCRIPTABLE void exit();
61 void updateEditMenu() {}
62 void slotCollectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames );
64 void slotFolderChanged( const Akonadi::Collection& );
65 signals:
66 void textChanged( const QString& );
67 void iconChanged( const QPixmap& );
69 protected:
70 virtual bool openFile();
71 virtual void guiActivateEvent(KParts::GUIActivateEvent *e);
73 private:
74 KMKernel *mKMailKernel;
75 KMMainWidget *mainWidget;
76 ActionManager *mActionManager;
77 KMailStatusBarExtension *mStatusBar;
78 QWidget *mParentWidget;
81 class KMailStatusBarExtension : public KParts::StatusBarExtension
83 public:
84 KMailStatusBarExtension( KMailPart *parent );
86 KMainWindow *mainWindow() const;
88 private:
89 KMailPart *mParent;
90 StatusbarProgressWidget *mLittleProgress;
93 #endif