Backport r950340 | aacid | 2009-04-06 23:21:18 +0200 (Mon, 06 Apr 2009) | 4 lines
[kdepim.git] / kmail / attachmentlistview.h
blobc1166baaee736d4fae09ede0837fae546a8aa2b7
1 /* -*- c++ -*-
2 attachmentlistview.h
4 KMail, the KDE mail client.
5 Copyright (c) 2003 Ingo Kloecker <kloecker@kde.org>
6 Copyright (c) 2007 Thomas McGuire <Thomas.McGuire@gmx.net>
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License,
10 version 2.0, as published by the Free Software Foundation.
11 You should have received a copy of the GNU General Public License
12 along with this program; if not, write to the Free Software Foundation,
13 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
17 #ifndef _KMAIL_ATTACHMENTLISTVIEW_H_
18 #define _KMAIL_ATTACHMENTLISTVIEW_H_
20 #include <QTreeWidget>
22 class QKeyEvent;
25 namespace KMail {
27 class Composer;
29 class AttachmentListView : public QTreeWidget
31 Q_OBJECT
32 public:
33 explicit AttachmentListView( KMail::Composer * composer = 0, QWidget* parent = 0 );
34 virtual ~AttachmentListView();
36 void enableCryptoCBs( bool enable );
37 bool areCryptoCBsEnabled();
39 virtual void dragEnterEvent( QDragEnterEvent* );
40 virtual void dragMoveEvent( QDragMoveEvent* );
41 virtual void dropEvent( QDropEvent* );
43 public Q_SLOTS:
44 void slotSort();
46 protected:
47 virtual void keyPressEvent( QKeyEvent * e );
48 virtual void contextMenuEvent( QContextMenuEvent * event );
49 virtual void startDrag( Qt::DropActions supportedActions );
51 private:
52 KMail::Composer * mComposer;
54 int mEncryptColWidth;
55 int mSignColWidth;
57 signals:
58 void attachmentDeleted();
59 void rightButtonPressed( QTreeWidgetItem * item );
60 void dragStarted();
63 } // namespace KMail
65 #endif // _KMAIL_ATTACHMENTLISTVIEW_H_