/usr/include/KF5/messagecomposer/signaturecontroller.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 | /*
* Copyright (c) 2010 Volker Krause <vkrause@kde.org>
*
* Based on kmail/kmcomposewin.cpp
* Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
*
* Based on KMail code by:
* Copyright (c) 1997 Markus Wuebben <markus.wuebben@kde.org>
*
* 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 MESSAGECOMPSER_SIGNATURECONTROLLER_H
#define MESSAGECOMPSER_SIGNATURECONTROLLER_H
#include "messagecomposer_export.h"
#include <QObject>
#include <KIdentityManagement/kidentitymanagement/signature.h>
namespace KIdentityManagement {
class IdentityCombo;
}
namespace MessageComposer {
class RichTextComposerNg;
/** Controls signature (the footer thing, not the crypto thing) operations
* happening on a KMEditor triggerd by identity selection or menu actions.
* @since 4.5
*/
class SignatureControllerPrivate;
class MESSAGECOMPOSER_EXPORT SignatureController : public QObject
{
Q_OBJECT
public:
explicit SignatureController(QObject *parent = nullptr);
~SignatureController();
void setEditor(MessageComposer::RichTextComposerNg *editor);
void setIdentityCombo(KIdentityManagement::IdentityCombo *combo);
/** Temporarily disable identity tracking, useful for initial loading for example. */
void suspend();
/** Resume identity change tracking after a previous call to suspend(). */
void resume();
/** Adds the given signature to the editor, taking user preferences into account.
*/
void applySignature(const KIdentityManagement::Signature &signature);
public Q_SLOTS:
/**
* Append signature to the end of the text in the editor.
*/
void appendSignature();
/**
* Prepend signature at the beginning of the text in the editor.
*/
void prependSignature();
/**
* Insert signature at the cursor position of the text in the editor.
*/
void insertSignatureAtCursor();
void cleanSpace();
Q_SIGNALS:
/**
* A HTML signature is about to be inserted, so enable HTML support in the editor.
*/
void enableHtml();
void signatureAdded();
private:
/**
* Helper to insert the signature of the current identity arbitrarily
* in the editor, connecting slot functions to KMeditor::insertSignature().
* @param placement the position of the signature
*/
void insertSignatureHelper(KIdentityManagement::Signature::Placement placement);
private Q_SLOTS:
void identityChanged(uint id);
private:
SignatureControllerPrivate *const d;
};
}
#endif
|