Fix Bug 359872 - Big icon when trying to drag a attached pdf file
[kdepim.git] / kmail / kmail_part.h
blob0aeccc4c98a3a593050cc127095a5fbd01d5ec8c
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 <kparts/part.h>
29 #include <kparts/readonlypart.h>
30 #include <AkonadiCore/collection.h>
32 #include <QWidget>
33 #include <QPixmap>
35 class KMMainWidget;
37 class KMailPart: public KParts::ReadOnlyPart
39 Q_OBJECT
40 Q_CLASSINFO("D-Bus Interface", "org.kde.kmail.kmailpart")
42 public:
43 KMailPart(QWidget *parentWidget, QObject *parent, const QVariantList &);
44 virtual ~KMailPart();
46 QWidget *parentWidget() const;
48 public Q_SLOTS:
49 Q_SCRIPTABLE void save();
50 Q_SCRIPTABLE void exit();
51 void updateQuickSearchText();
53 protected:
54 bool openFile() Q_DECL_OVERRIDE;
55 void guiActivateEvent(KParts::GUIActivateEvent *e) Q_DECL_OVERRIDE;
57 private:
58 KMMainWidget *mainWidget;
59 QWidget *mParentWidget;
62 #endif