• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kleopatra

  • sources
  • kde-4.14
  • kdepim
  • kleopatra
aboutdata.cpp
Go to the documentation of this file.
1 /*
2  aboutdata.cpp
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2001,2002,2004 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #include <config-kleopatra.h>
34 #include <version-kleopatra.h>
35 
36 #include "aboutdata.h"
37 
38 #include <utils/gnupg-helper.h>
39 
40 #include <klocale.h>
41 #include <kiconloader.h>
42 
43 #include <QPixmap>
44 #include <QProcess>
45 #include <QTextStream>
46 
47 #include <cassert>
48 
49 using namespace Kleo;
50 
51 static const char kleopatra_version[] = KLEOPATRA_VERSION_STRING;
52 static const char description[] = I18N_NOOP("Certificate Manager and Unified Crypto GUI");
53 
54 struct about_data {
55  const char * name;
56  const char * desc;
57  const char * email;
58  const char * web;
59 };
60 
61 static const about_data authors[] = {
62  { "Marc Mutz", I18N_NOOP("Current Maintainer"), "mutz@kde.org", 0 },
63  { "Steffen Hansen", I18N_NOOP("Former Maintainer"), "hansen@kde.org", 0 },
64  { "Matthias Kalle Dalheimer", I18N_NOOP("Original Author"), "kalle@kde.org", 0 },
65 };
66 
67 
68 static const about_data credits[] = {
69  { I18N_NOOP("David Faure"),
70  I18N_NOOP("Backend configuration framework, KIO integration"),
71  "faure@kde.org", 0 },
72  { I18N_NOOP("Michel Boyer de la Giroday"),
73  I18N_NOOP("Key-state dependent colors and fonts in the certificates list"),
74  "michel@klaralvdalens-datakonsult.se", 0 },
75  { I18N_NOOP("Thomas Moenicke"),
76  I18N_NOOP("Artwork"),
77  "tm@php-qt.org", 0 },
78  { I18N_NOOP("Frank Osterfeld"),
79  I18N_NOOP("Resident gpgme/win wrangler, UI Server commands and dialogs"),
80  "osterfeld@kde.org", 0 },
81  { I18N_NOOP("Karl-Heinz Zimmer"),
82  I18N_NOOP("DN display ordering support, infrastructure"),
83  "khz@kde.org", 0 },
84 };
85 
86 
87 AboutData::AboutData()
88  : KAboutData( "kleopatra", 0, ki18n("Kleopatra"),
89  kleopatra_version, ki18n(description), License_GPL,
90  ki18n("(c) 2002 Steffen\xC2\xA0Hansen, Matthias\xC2\xA0Kalle\xC2\xA0" "Dalheimer, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB\n"
91  "(c) 2004, 2007, 2008, 2009 Marc\xC2\xA0Mutz, Klar\xC3\xA4lvdalens\xC2\xA0" "Datakonsult\xC2\xA0" "AB") )
92 {
93  using ::authors;
94  using ::credits;
95  for ( unsigned int i = 0 ; i < sizeof authors / sizeof *authors ; ++i )
96  addAuthor( ki18n(authors[i].name), ki18n(authors[i].desc),
97  authors[i].email, authors[i].web );
98  for ( unsigned int i = 0 ; i < sizeof credits / sizeof *credits ; ++i )
99  addCredit( ki18n(credits[i].name), ki18n(credits[i].desc),
100  credits[i].email, credits[i].web );
101 }
102 
103 
104 static const char gpg4win_description[] = I18N_NOOP( "Gpg4win is an installer package for Windows for EMail and "
105  "file encryption using the core component GnuPG for Windows. "
106  "Both relevant cryptography standards are supported, OpenPGP "
107  "and S/MIME. Gpg4win and the software included with Gpg4win "
108  "are Free Software.");
109 
110 
111 static const char gpg4win_credits_description[] = I18N_NOOP( "This Free Software product was developed mostly as part of "
112  "commercial contracts by the following companies:"
113  "<ul><li><a href='http://intevation.net'>Intevation GmbH</a> "
114  "(Projekt coordination, QA, Compendium)</li>"
115  "<li><a href='http://www.g10code.com'>g10 Code GmbH</a> "
116  "(Crypto Funktionality, GpgOL, GpgEX, GPA)</li> "
117  "<li><a href='http://www.kdab.com'>KDAB</a> (Kleopatra)</li></ul>"
118  "The following persons have contributed (as of 20100706):");
119 
120 static const char gpg4win_credits_persons[] = I18N_NOOP( "Till Adam<br>"
121  "Marcus Brinkmann<br>"
122  "Brigitte Hamilton<br>"
123  "Bernhard Herzog<br>"
124  "Werner Koch<br>"
125  "Colin Leroy<br>"
126  "Marc Mutz<br>"
127  "Marcel Newmann<br>"
128  "Frank Osterfeld<br>"
129  "Bernhard Reiter<br>"
130  "Florian v. Samson<br>"
131  "Emanuel Schütze<br>"
132  "Dr. Jan-Oliver Wagner");
133 
134 
135 static const char gpg4win_version_guessed[] = "2.0.1";
136 
137 static QString gpg4win_version() {
138 
139  QProcess p;
140  p.setReadChannelMode( QProcess::MergedChannels );
141  p.start( gpgConfPath(), QStringList( QLatin1String( "--version" ) ) );
142  if ( !p.waitForFinished() )
143  return QString::fromLatin1( "%1 (%2)" ).arg( QLatin1String( gpg4win_version_guessed ),
144  i18nc("Version string is a guess","guessed") );
145  const QString output = QTextStream( &p ).readAll() ;
146  QRegExp rx( QLatin1String( "\\(Gpg4win\\s+([^\\s)]+)\\)" ) );
147  if ( rx.indexIn( output ) != -1 )
148  return rx.cap(1);
149  else
150  return QString::fromLatin1( "%1 (%2)" ).arg( QLatin1String( gpg4win_version_guessed ),
151  i18nc("Version string is a guess","guessed") );
152 }
153 
154 
155 static QPixmap UserIcon_nocached2( const char * name ) {
156  // KIconLoader insists on caching all pixmaps. Since the splash
157  // screen is a particularly large 'icon' and used only once,
158  // caching is unneccesary and just hurts startup performance.
159  KIconLoader * const il = KIconLoader::global();
160  assert( il );
161  const QString iconPath = il->iconPath( QLatin1String( name ), KIconLoader::User );
162  return iconPath.isEmpty() ? il->unknown() : QPixmap( iconPath ) ;
163 }
164 
165 
166 AboutGpg4WinData::AboutGpg4WinData()
167  : KAboutData( "gpg4win", 0, ki18n("Gpg4win"),
168  gpg4win_version().toLatin1(), ki18n(gpg4win_description),
169  License_GPL, KLocalizedString(), KLocalizedString(), "http://www.gpg4win.de" )
170 {
171  setCustomAuthorText( ki18n(gpg4win_credits_description), ki18n(gpg4win_credits_description) );
172  addAuthor( ki18n(gpg4win_credits_persons), KLocalizedString(), 0 , 0 );
173  setProgramLogo( UserIcon_nocached2( "gpg4win" ) );
174 }
description
static const char description[]
Definition: aboutdata.cpp:52
AboutData::AboutData
AboutData()
Definition: aboutdata.cpp:87
QRegExp::cap
QString cap(int nth) const
email
static std::string email(const UserID &uid)
Definition: keycache.cpp:594
QTextStream
QRegExp::indexIn
int indexIn(const QString &str, int offset, CaretMode caretMode) const
QRegExp
gpgConfPath
static QString gpgConfPath()
Definition: configreader.cpp:294
QProcess
QString::isEmpty
bool isEmpty() const
credits
static const about_data credits[]
Definition: aboutdata.cpp:68
aboutdata.h
gpg4win_credits_description
static const char gpg4win_credits_description[]
Definition: aboutdata.cpp:111
KAboutData
gpg4win_description
static const char gpg4win_description[]
Definition: aboutdata.cpp:104
authors
static const about_data authors[]
Definition: aboutdata.cpp:61
QString
QProcess::setReadChannelMode
void setReadChannelMode(ProcessChannelMode mode)
QStringList
gnupg-helper.h
QPixmap
UserIcon_nocached2
static QPixmap UserIcon_nocached2(const char *name)
Definition: aboutdata.cpp:155
QLatin1String
kleopatra_version
static const char kleopatra_version[]
Definition: aboutdata.cpp:51
name
const char * name
Definition: uiserver/selectcertificatecommand.cpp:113
QString::fromLatin1
QString fromLatin1(const char *str, int size)
gpg4win_version_guessed
static const char gpg4win_version_guessed[]
Definition: aboutdata.cpp:135
QTextStream::readAll
QString readAll()
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
gpg4win_credits_persons
static const char gpg4win_credits_persons[]
Definition: aboutdata.cpp:120
AboutGpg4WinData::AboutGpg4WinData
AboutGpg4WinData()
Definition: aboutdata.cpp:166
QProcess::start
void start(const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)
gpg4win_version
static QString gpg4win_version()
Definition: aboutdata.cpp:137
QProcess::waitForFinished
bool waitForFinished(int msecs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal