Make it possible to use a distinct selection model in the foldertreewidget.
[kdepim.git] / messagecore / attachmentpropertiesdialog.h
blob29fde5ce3e59d22ffc465b0c9da082c4990c4bae
1 /*
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
19 02110-1301, USA.
22 #ifndef KDEPIM_ATTACHMENTPROPERTIESDIALOG_H
23 #define KDEPIM_ATTACHMENTPROPERTIESDIALOG_H
25 #include "attachmentpart.h"
26 #include "messagecore_export.h"
28 #include <KDE/KDialog>
30 namespace KPIM {
32 class MESSAGECORE_EXPORT AttachmentPropertiesDialog: public KDialog
34 Q_OBJECT
36 public:
37 explicit AttachmentPropertiesDialog( KPIM::AttachmentPart::Ptr part,
38 QWidget *parent = 0, bool readOnly = false );
40 /**
41 This converts the KMime::Content to an AttachmentPart. Therefore, saving
42 the changes to the KMime::Content is not supported, and readOnly must
43 be true.
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 );
58 public slots:
59 /* reimpl */
60 virtual void accept();
62 private:
63 class Private;
64 Private *const d;
66 Q_PRIVATE_SLOT( d, void mimeTypeChanged( const QString& ) )
69 } // namespace KMail
71 #endif