2 Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
4 Based on KMail code by various authors (kmmsgpartdlg).
6 This library is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Library General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or (at your
9 option) any later version.
11 This library is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef KDEPIM_ATTACHMENTPROPERTIESDIALOG_H
23 #define KDEPIM_ATTACHMENTPROPERTIESDIALOG_H
25 #include "attachmentpart.h"
26 #include "messagecore_export.h"
28 #include <KDE/KDialog>
32 class MESSAGECORE_EXPORT AttachmentPropertiesDialog
: public KDialog
37 explicit AttachmentPropertiesDialog( KPIM::AttachmentPart::Ptr part
,
38 QWidget
*parent
= 0, bool readOnly
= false );
41 This converts the KMime::Content to an AttachmentPart. Therefore, saving
42 the changes to the KMime::Content is not supported, and readOnly must
45 explicit AttachmentPropertiesDialog( const KMime::Content
*content
,
46 QWidget
*parent
= 0, bool readOnly
= true );
47 virtual ~AttachmentPropertiesDialog();
49 KPIM::AttachmentPart::Ptr
attachmentPart() const;
51 bool isEncryptEnabled() const;
52 /** Sets whether or not this attachment can be encrypted */
53 void setEncryptEnabled( bool enabled
);
54 bool isSignEnabled() const;
55 /** Sets whether or not this attachment can be signed */
56 void setSignEnabled( bool enabled
);
60 virtual void accept();
66 Q_PRIVATE_SLOT( d
, void mimeTypeChanged( const QString
& ) )