File: kgpg.h

package info (click to toggle)
kgpg 4:18.08.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,168 kB
  • sloc: cpp: 18,911; xml: 159; makefile: 8; sh: 4
file content (76 lines) | stat: -rw-r--r-- 3,061 bytes parent folder | download
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
/***************************************************************************
                          kgpg.h  -  description
                             -------------------
    begin                : Mon Nov 18 2002
    copyright          : (C) 2002 by Jean-Baptiste Mardelle
    email                : bj@altern.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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KGPGAPPLET_H
#define KGPGAPPLET_H

#include <QApplication>
#include <QKeySequence>

#include <KLocalizedString>

class KeysManager;
class KGpgExternalActions;
class QCommandLineParser;
class QDir;
class QString;

static const QString EMailTemplateText=i18n(
    "Hi,\n\nplease find attached the user id '%UIDNAME%' of your key %KEYID% signed by me. "
    "This mail is encrypted with that key to make sure you control both the email address and the key.\n\n"
    "If you have multiple user ids, I sent the signature for each user id separately to that user id's associated email address. "
    "You can import the signatures by running each through `gpg --import` after you have decrypted them with `gpg --decrypt`.\n\n"
    "If you are using KGpg store the attachment to disk and then import it. Just select `Import Key...` from `Keys` menu and open the file.\n\n"
    "Note that I did not upload your key to any keyservers. If you want this new signature to be available to others, please upload it yourself. "
    "With GnuPG this can be done using gpg --keyserver subkeys.pgp.net --send-key %KEYID%.\n\n" 
    "With KGpg you can right click on the key once you imported all user ids and choose `Export Public Key...`.\n\n"
    "If you have any questions, don't hesitate to ask.\n");

class KGpgApp : public QApplication
{
    Q_OBJECT

public:
    KGpgApp(int &argc, char **argv);
    ~KGpgApp();

	bool newInstance();
	QKeySequence goHome;

	/**
	 * @brief configure the QCommandLineParser to know about the control arguments
	 */
	void setupCmdlineParser(QCommandLineParser &parser);

	/**
	 * @brief process the actions requested by the user
	 */
	void handleArguments(const QCommandLineParser &parser, const QDir &workingDirectory);

public slots:
	void slotDBusActivation(const QStringList &arguments, const QString &workingDirectory);

private:
    KGpgExternalActions *w;
    KeysManager *s_keyManager;

private slots:
    void slotHandleQuit();
    void assistantOver(const QString &defaultKeyId);
};

#endif // KGPGAPPLET_H