/usr/include/KF5/messagecomposer/attachmentcontrollerbase.h is in libkf5messagecomposer-dev 4:17.12.3-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | /*
* This file is part of KMail.
* Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
*
* Parts based on KMail code by:
* Various authors.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef KMAIL_ATTACHMENTCONTROLLERBASE_H
#define KMAIL_ATTACHMENTCONTROLLERBASE_H
#include <QObject>
#include <QUrl>
#include <MessageCore/AttachmentPart>
#include <MessageViewer/EditorWatcher>
#include <KJob>
#include <KService>
#include "messagecomposer_export.h"
class KActionCollection;
class QAction;
namespace MessageComposer {
class AttachmentModel;
class MESSAGECOMPOSER_EXPORT AttachmentControllerBase : public QObject
{
Q_OBJECT
public:
AttachmentControllerBase(MessageComposer::AttachmentModel *model, QWidget *wParent, KActionCollection *actionCollection);
~AttachmentControllerBase();
void createActions();
// TODO dnd stuff...
void setSelectedParts(const MessageCore::AttachmentPart::List &selectedParts);
void setAttachOwnVcard(bool attachVcard);
bool attachOwnVcard() const;
void setIdentityHasOwnVcard(bool state);
public Q_SLOTS:
/// model sets these
void setEncryptEnabled(bool enabled);
void setSignEnabled(bool enabled);
/// compression is async...
void compressAttachment(const MessageCore::AttachmentPart::Ptr &part, bool compress);
void showContextMenu();
void openAttachment(const MessageCore::AttachmentPart::Ptr &part);
void viewAttachment(const MessageCore::AttachmentPart::Ptr &part);
void editAttachment(MessageCore::AttachmentPart::Ptr part, MessageViewer::EditorWatcher::OpenWithOption option = MessageViewer::EditorWatcher::NoOpenWithDialog);
void editAttachmentWith(const MessageCore::AttachmentPart::Ptr &part);
void saveAttachmentAs(const MessageCore::AttachmentPart::Ptr &part);
void attachmentProperties(const MessageCore::AttachmentPart::Ptr &part);
void showAddAttachmentFileDialog();
void showAddAttachmentCompressedDirectoryDialog();
/// sets sign, encrypt, shows properties dialog if so configured
void addAttachment(const MessageCore::AttachmentPart::Ptr &part);
void addAttachment(const QUrl &url);
void addAttachmentUrlSync(const QUrl &url);
void addAttachments(const QList<QUrl> &urls);
void showAttachPublicKeyDialog();
void showAttachVcard();
virtual void attachMyPublicKey();
Q_SIGNALS:
void actionsCreated();
void refreshSelection();
void showAttachment(KMime::Content *content, const QByteArray &charset);
void selectedAllAttachment();
void addOwnVcard(bool);
void fileAttached();
protected:
void exportPublicKey(const QString &fingerprint);
void enableAttachPublicKey(bool enable);
void enableAttachMyPublicKey(bool enable);
void byteArrayToRemoteFile(const QByteArray &aData, const QUrl &aURL, bool overwrite = false);
void openWith(const KService::Ptr &offer = KService::Ptr());
private:
void attachFiles(const QList<QUrl> &urls, const QString &encoding);
void attachDirectory(const QUrl &url);
private Q_SLOTS:
void slotPutResult(KJob *job);
void slotOpenWithDialog();
void slotOpenWithAction(QAction *act);
private:
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void compressJobResult(KJob *))
Q_PRIVATE_SLOT(d, void loadJobResult(KJob *))
Q_PRIVATE_SLOT(d, void openSelectedAttachments())
Q_PRIVATE_SLOT(d, void viewSelectedAttachments())
Q_PRIVATE_SLOT(d, void editSelectedAttachment())
Q_PRIVATE_SLOT(d, void editSelectedAttachmentWith())
Q_PRIVATE_SLOT(d, void removeSelectedAttachments())
Q_PRIVATE_SLOT(d, void saveSelectedAttachmentAs())
Q_PRIVATE_SLOT(d, void selectedAttachmentProperties())
Q_PRIVATE_SLOT(d, void editDone(MessageViewer::EditorWatcher *))
Q_PRIVATE_SLOT(d, void slotAttachmentContentCreated(KJob *))
Q_PRIVATE_SLOT(d, void reloadAttachment())
Q_PRIVATE_SLOT(d, void updateJobResult(KJob *))
Q_PRIVATE_SLOT(d, void attachVcardFromAddressBook(KJob *))
};
} //
#endif // KMAIL_ATTACHMENTCONTROLLERBASE_H
|