• 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
mainwindow_desktop.cpp
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  mainwindow_desktop.cpp
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2007 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 
35 #include "mainwindow_desktop.h"
36 #include "aboutdata.h"
37 
38 #include "models/keylistmodel.h"
39 #include "models/keylistsortfilterproxymodel.h"
40 
41 #include "view/searchbar.h"
42 #include "view/tabwidget.h"
43 #include "view/keylistcontroller.h"
44 
45 #include "commands/selftestcommand.h"
46 #include "commands/importcrlcommand.h"
47 #include "commands/importcertificatefromfilecommand.h"
48 #include "commands/decryptverifyfilescommand.h"
49 #include "commands/signencryptfilescommand.h"
50 
51 #include "utils/detail_p.h"
52 #include "utils/gnupg-helper.h"
53 #include "utils/action_data.h"
54 #include "utils/classify.h"
55 #include "utils/filedialog.h"
56 #include "utils/clipboardmenu.h"
57 
58 // from libkdepim
59 #include "progresswidget/statusbarprogresswidget.h"
60 #include "progresswidget/progressdialog.h"
61 
62 #include <KStatusBar>
63 #include <KXMLGUIFactory>
64 #include <KApplication>
65 #include <KActionCollection>
66 #include <KLocalizedString>
67 #include <KStandardAction>
68 #include <KAction>
69 #include <KAboutData>
70 #include <KMessageBox>
71 #include <KStandardGuiItem>
72 #include <KShortcutsDialog>
73 #include <KEditToolBar>
74 #include <KAboutApplicationDialog>
75 #include <kdebug.h>
76 #include <KLineEdit>
77 #include <KActionMenu>
78 
79 #include <QAbstractItemView>
80 #include <QApplication>
81 #include <QCloseEvent>
82 #include <QMenu>
83 #include <QTimer>
84 #include <QProcess>
85 #include <QVBoxLayout>
86 
87 #include <kleo/cryptobackendfactory.h>
88 #include <ui/cryptoconfigdialog.h>
89 #include <kleo/cryptoconfig.h>
90 #include <kleo/stl_util.h>
91 
92 #ifndef Q_MOC_RUN
93 #include <boost/bind.hpp>
94 #include <boost/shared_ptr.hpp>
95 #endif
96 
97 #include <vector>
98 
99 #ifdef Q_OS_WIN32
100 static const bool OS_WIN = true;
101 #else
102 static const bool OS_WIN = false;
103 #endif
104 
105 using namespace Kleo;
106 using namespace Kleo::Commands;
107 using namespace boost;
108 using namespace GpgME;
109 
110 namespace {
111 
112  static const KAboutData * aboutGpg4WinData() {
113  static const AboutGpg4WinData data;
114  return &data;
115  }
116 
117 }
118 
119 static KGuiItem KStandardGuiItem_quit() {
120  static const QString app = KGlobal::mainComponent().aboutData()->programName();
121  KGuiItem item = KStandardGuiItem::quit();
122  item.setText( i18nc( "Quit [ApplicationName]", "&Quit %1", app ) );
123  return item;
124 }
125 
126 static KGuiItem KStandardGuiItem_close() {
127  KGuiItem item = KStandardGuiItem::close();
128  item.setText( i18n("Only &Close Window" ) );
129  return item;
130 }
131 
132 static bool isQuitting = false;
133 
134 class MainWindow::Private {
135  friend class ::MainWindow;
136  MainWindow * const q;
137 
138 public:
139  explicit Private( MainWindow * qq );
140  ~Private();
141 
142  template <typename T>
143  void createAndStart() {
144  ( new T( this->currentView(), &this->controller ) )->start();
145  }
146  template <typename T>
147  void createAndStart( QAbstractItemView * view ) {
148  ( new T( view, &this->controller ) )->start();
149  }
150  template <typename T>
151  void createAndStart( const QStringList & a ) {
152  ( new T( a, this->currentView(), &this->controller ) )->start();
153  }
154  template <typename T>
155  void createAndStart( const QStringList & a, QAbstractItemView * view ) {
156  ( new T( a, view, &this->controller ) )->start();
157  }
158 
159  void closeAndQuit() {
160  const QString app = KGlobal::mainComponent().aboutData()->programName();
161  const int rc = KMessageBox::questionYesNoCancel( q,
162  i18n("%1 may be used by other applications as a service.\n"
163  "You may instead want to close this window without exiting %1.", app ),
164  i18n("Really Quit?"), KStandardGuiItem_close(), KStandardGuiItem_quit(), KStandardGuiItem::cancel(),
165  QLatin1String("really-quit-") + app.toLower() );
166  if ( rc == KMessageBox::Cancel )
167  return;
168  isQuitting = true;
169  if ( !q->close() )
170  return;
171  // WARNING: 'this' might be deleted at this point!
172  if ( rc == KMessageBox::No )
173  qApp->quit();
174  }
175  void configureToolbars() {
176  KEditToolBar dlg( q->factory() );
177  dlg.exec();
178  }
179  void editKeybindings() {
180  KShortcutsDialog::configure( q->actionCollection(), KShortcutsEditor::LetterShortcutsAllowed );
181  updateSearchBarClickMessage();
182  }
183 
184  void updateSearchBarClickMessage() {
185  const QString shortcutStr = focusToClickSearchAction->shortcut().toString();
186  ui.searchBar->updateClickMessage(shortcutStr);
187  }
188 
189  void selfTest() {
190  createAndStart<SelfTestCommand>();
191  }
192  void configureBackend();
193 
194  void showHandbook();
195 
196  void gnupgLogViewer() {
197  if( !QProcess::startDetached(QLatin1String("kwatchgnupg") ) )
198  KMessageBox::error( q, i18n( "Could not start the GnuPG Log Viewer (kwatchgnupg). "
199  "Please check your installation." ),
200  i18n( "Error Starting KWatchGnuPG" ) );
201  }
202 
203  void gnupgAdministrativeConsole() {
204  if( !QProcess::startDetached(QLatin1String("kgpgconf") ) )
205  KMessageBox::error( q, i18n( "Could not start the GnuPG Administrative Console (kgpgconf). "
206  "Please check your installation." ),
207  i18n( "Error Starting KGpgConf" ) );
208  }
209 
210  void slotConfigCommitted();
211  void slotContextMenuRequested( QAbstractItemView *, const QPoint & p ) {
212  if ( QMenu * const menu = qobject_cast<QMenu*>( q->factory()->container( QLatin1String("listview_popup"), q ) ) )
213  menu->exec( p );
214  else
215  kDebug() << "no \"listview_popup\" <Menu> in kleopatra's ui.rc file";
216  }
217 
218  void aboutGpg4Win() {
219  ( new KAboutApplicationDialog( aboutGpg4WinData(), KAboutApplicationDialog::HideKdeVersion|KAboutApplicationDialog::HideTranslators, q ) )->show();
220  }
221  void slotFocusQuickSearch() {
222  ui.searchBar->lineEdit()->setFocus();
223  }
224 
225 private:
226  void setupActions();
227 
228  QAbstractItemView * currentView() const {
229  return ui.tabWidget.currentView();
230  }
231 
232 private:
233  Kleo::KeyListController controller;
234  bool firstShow : 1;
235  struct UI {
236 
237  TabWidget tabWidget;
238  SearchBar * searchBar;
239  explicit UI( MainWindow * q );
240  } ui;
241  KAction *focusToClickSearchAction;
242  ClipboardMenu *clipboadMenu;
243 };
244 
245 MainWindow::Private::UI::UI(MainWindow *q)
246  : tabWidget( q )
247 {
248  KDAB_SET_OBJECT_NAME( tabWidget );
249 
250  QWidget *mainWidget = new QWidget;
251  QVBoxLayout *vbox = new QVBoxLayout;
252  vbox->setSpacing(0);
253  mainWidget->setLayout(vbox);
254  searchBar = new SearchBar;
255  vbox->addWidget(searchBar);
256  tabWidget.connectSearchBar( searchBar );
257  vbox->addWidget(&tabWidget);
258 
259  q->setCentralWidget(mainWidget);
260  KPIM::ProgressDialog * progressDialog = new KPIM::ProgressDialog( q->statusBar(), q );
261  KDAB_SET_OBJECT_NAME( progressDialog );
262  progressDialog->hide();
263  KPIM::StatusbarProgressWidget * statusBarProgressWidget
264  = new KPIM::StatusbarProgressWidget( progressDialog, q->statusBar() );
265  KDAB_SET_OBJECT_NAME( statusBarProgressWidget );
266  q->statusBar()->addPermanentWidget( statusBarProgressWidget, 0 );
267  statusBarProgressWidget->show();
268 }
269 
270 
271 MainWindow::Private::Private( MainWindow * qq )
272  : q( qq ),
273  controller( q ),
274  firstShow( true ),
275  ui( q )
276 {
277  KDAB_SET_OBJECT_NAME( controller );
278 
279  AbstractKeyListModel * flatModel = AbstractKeyListModel::createFlatKeyListModel( q );
280  AbstractKeyListModel * hierarchicalModel = AbstractKeyListModel::createHierarchicalKeyListModel( q );
281 
282  KDAB_SET_OBJECT_NAME( flatModel );
283  KDAB_SET_OBJECT_NAME( hierarchicalModel );
284 
285 
286  controller.setFlatModel( flatModel );
287  controller.setHierarchicalModel( hierarchicalModel );
288  controller.setTabWidget( &ui.tabWidget );
289 
290  ui.tabWidget.setFlatModel( flatModel );
291  ui.tabWidget.setHierarchicalModel( hierarchicalModel );
292 
293  setupActions();
294 
295  connect( &controller, SIGNAL(message(QString,int)), q->statusBar(), SLOT(showMessage(QString,int)) );
296  connect( &controller, SIGNAL(contextMenuRequested(QAbstractItemView*,QPoint)),
297  q, SLOT(slotContextMenuRequested(QAbstractItemView*,QPoint)) );
298 
299  q->createGUI( QLatin1String("kleopatra.rc") );
300 
301  q->setAcceptDrops( true );
302 
303  q->setAutoSaveSettings();
304  updateSearchBarClickMessage();
305 }
306 
307 MainWindow::Private::~Private() {}
308 
309 MainWindow::MainWindow( QWidget* parent, Qt::WindowFlags flags )
310  : KXmlGuiWindow( parent, flags ), d( new Private( this ) )
311 {
312 }
313 
314 MainWindow::~MainWindow() {}
315 
316 
317 void MainWindow::Private::setupActions() {
318 
319  KActionCollection * const coll = q->actionCollection();
320 
321  const action_data action_data[] = {
322  // most have been MOVED TO keylistcontroller.cpp
323  // Tools menu
324 #ifndef Q_OS_WIN
325  { "tools_start_kwatchgnupg", i18n("GnuPG Log Viewer"), QString(),
326  "kwatchgnupg", q, SLOT(gnupgLogViewer()), QString(), false, true },
327 #endif
328 #if 0
329  { "tools_start_kgpgconf", i18n("GnuPG Administrative Console"), QString(),
330  "kgpgconf", q, SLOT(gnupgLogViewer()), QString(), false, true },
331 #endif
332  // most have been MOVED TO keylistcontroller.cpp
333 #if 0
334  { "configure_backend", i18n("Configure GnuPG Backend..."), QString(),
335  0, q, SLOT(configureBackend()), QString(), false, true },
336 #endif
337  // Settings menu
338  { "settings_self_test", i18n("Perform Self-Test"), QString(),
339  0, q, SLOT(selfTest()), QString(), false, true },
340  // Help menu
341 #ifdef Q_WS_WIN
342  { "help_about_gpg4win", i18n("About Gpg4win"), QString(),
343  "gpg4win-compact", q, SLOT(aboutGpg4Win()), QString(), false, true },
344 #endif
345  // most have been MOVED TO keylistcontroller.cpp
346  };
347 
348  make_actions_from_data( action_data, /*sizeof action_data / sizeof *action_data,*/ coll );
349 
350  if ( QAction * action = coll->action( QLatin1String("configure_backend") ) )
351  action->setMenuRole( QAction::NoRole ); //prevent Qt OS X heuristics for config* actions
352 
353  KStandardAction::close( q, SLOT(close()), coll );
354  KStandardAction::quit( q, SLOT(closeAndQuit()), coll );
355  KStandardAction::configureToolbars( q, SLOT(configureToolbars()), coll );
356  KStandardAction::keyBindings( q, SLOT(editKeybindings()), coll );
357  KStandardAction::preferences( qApp, SLOT(openOrRaiseConfigDialog()), coll );
358 
359  focusToClickSearchAction = new KAction(i18n("Set Focus to Quick Search"), q);
360  focusToClickSearchAction->setShortcut( QKeySequence( Qt::ALT + Qt::Key_Q ) );
361  coll->addAction( QLatin1String("focus_to_quickseach"), focusToClickSearchAction );
362  connect( focusToClickSearchAction, SIGNAL(triggered(bool)), q, SLOT(slotFocusQuickSearch()) );
363  clipboadMenu = new ClipboardMenu(q);
364  clipboadMenu->setMainWindow(q);
365  clipboadMenu->clipboardMenu()->setIcon(KIcon(QLatin1String("edit-paste")));
366  clipboadMenu->clipboardMenu()->setDelayed(false);
367  coll->addAction( QLatin1String("clipboard_menu"), clipboadMenu->clipboardMenu());
368 
369  q->createStandardStatusBarAction();
370  q->setStandardToolBarMenuEnabled( true );
371 
372  controller.createActions( coll );
373 
374  ui.tabWidget.createActions( coll );
375 }
376 
377 void MainWindow::Private::configureBackend() {
378  Kleo::CryptoConfig * const config = Kleo::CryptoBackendFactory::instance()->config();
379  if ( !config ) {
380  KMessageBox::error( q, i18n( "Could not configure the cryptography backend (gpgconf tool not found)" ), i18n( "Configuration Error" ) );
381  return;
382  }
383 
384  Kleo::CryptoConfigDialog dlg( config );
385 
386  const int result = dlg.exec();
387 
388  // Forget all data parsed from gpgconf, so that we show updated information
389  // when reopening the configuration dialog.
390  config->clear();
391 
392  if ( result == QDialog::Accepted ) {
393 #if 0
394  // Tell other apps (e.g. kmail) that the gpgconf data might have changed
395  QDBusMessage message =
396  QDBusMessage::createSignal(QString(), "org.kde.kleo.CryptoConfig", "changed");
397  QDBusConnection::sessionBus().send(message);
398 #endif
399  }
400 }
401 
402 void MainWindow::Private::slotConfigCommitted() {
403  controller.updateConfig();
404 }
405 
406 void MainWindow::closeEvent( QCloseEvent * e ) {
407  // KMainWindow::closeEvent() insists on quitting the application,
408  // so do not let it touch the event...
409  kDebug();
410  if ( d->controller.hasRunningCommands() ) {
411  if ( d->controller.shutdownWarningRequired() ) {
412  const int ret = KMessageBox::warningContinueCancel( this, i18n("There are still some background operations ongoing. "
413  "These will be terminated when closing the window. "
414  "Proceed?"),
415  i18n("Ongoing Background Tasks") );
416  if ( ret != KMessageBox::Continue ) {
417  e->ignore();
418  return;
419  }
420  }
421  d->controller.cancelCommands();
422  if ( d->controller.hasRunningCommands() ) {
423  // wait for them to be finished:
424  setEnabled( false );
425  QEventLoop ev;
426  QTimer::singleShot( 100, &ev, SLOT(quit()) );
427  connect( &d->controller, SIGNAL(commandsExecuting(bool)), &ev, SLOT(quit()) );
428  ev.exec();
429  kWarning( d->controller.hasRunningCommands() )
430  << "controller still has commands running, this may crash now...";
431  setEnabled( true );
432  }
433  }
434  if ( isQuitting || kapp->sessionSaving() ) {
435  d->ui.tabWidget.saveViews( KGlobal::config().data() );
436  saveMainWindowSettings( KConfigGroup( KGlobal::config(), autoSaveGroup() ) );
437  e->accept();
438  } else {
439  e->ignore();
440  hide();
441  }
442 }
443 
444 void MainWindow::showEvent( QShowEvent * e ) {
445  KXmlGuiWindow::showEvent( e );
446  if ( d->firstShow ) {
447  d->ui.tabWidget.loadViews( KGlobal::config().data() );
448  d->firstShow = false;
449  }
450 
451  if ( !savedGeometry.isEmpty() ) {
452  restoreGeometry( savedGeometry );
453  }
454 
455 }
456 
457 void MainWindow::hideEvent( QHideEvent * e )
458 {
459  savedGeometry = saveGeometry();
460  KXmlGuiWindow::hideEvent( e );
461 }
462 
463 
464 void MainWindow::importCertificatesFromFile( const QStringList & files ) {
465  if ( !files.empty() )
466  d->createAndStart<ImportCertificateFromFileCommand>( files );
467 }
468 
469 
470 static QStringList extract_local_files( const QMimeData * data ) {
471  const QList<QUrl> urls = data->urls();
472  // begin workaround KDE/Qt misinterpretation of text/uri-list
473  QList<QUrl>::const_iterator end = urls.end();
474  if ( urls.size() > 1 && !urls.back().isValid() )
475  --end;
476  // end workaround
477  QStringList result;
478  std::transform( urls.begin(), end,
479  std::back_inserter( result ),
480  boost::bind( &QUrl::toLocalFile, _1 ) );
481  result.erase( std::remove_if( result.begin(), result.end(),
482  boost::bind( &QString::isEmpty, _1 ) ), result.end() );
483  return result;
484 }
485 
486 static bool can_decode_local_files( const QMimeData * data ) {
487  if ( !data )
488  return false;
489  return !extract_local_files( data ).empty();
490 }
491 
492 void MainWindow::dragEnterEvent( QDragEnterEvent * e ) {
493  kDebug();
494 
495  if ( can_decode_local_files( e->mimeData() ) )
496  e->acceptProposedAction();
497 }
498 
499 void MainWindow::dropEvent( QDropEvent * e ) {
500  kDebug();
501 
502  if ( !can_decode_local_files( e->mimeData() ) )
503  return;
504 
505  e->setDropAction( Qt::CopyAction );
506 
507  const QStringList files = extract_local_files( e->mimeData() );
508 
509  const unsigned int classification = classify( files );
510 
511  QMenu menu;
512 
513  QAction * const signEncrypt = menu.addAction( i18n("Sign/Encrypt...") );
514  QAction * const decryptVerify = mayBeAnyMessageType( classification ) ? menu.addAction( i18n("Decrypt/Verify...") ) : 0 ;
515  if ( signEncrypt || decryptVerify )
516  menu.addSeparator();
517 
518  QAction * const importCerts = mayBeAnyCertStoreType( classification ) ? menu.addAction( i18n("Import Certificates") ) : 0 ;
519  QAction * const importCRLs = mayBeCertificateRevocationList( classification ) ? menu.addAction( i18n("Import CRLs") ) : 0 ;
520  if ( importCerts || importCRLs )
521  menu.addSeparator();
522 
523  if ( !signEncrypt && !decryptVerify && !importCerts && !importCRLs )
524  return;
525 
526  menu.addAction( i18n("Cancel") );
527 
528  const QAction * const chosen = menu.exec( mapToGlobal( e->pos() ) );
529 
530  if ( !chosen )
531  return;
532 
533  if ( chosen == signEncrypt )
534  d->createAndStart<SignEncryptFilesCommand>( files );
535  else if ( chosen == decryptVerify )
536  d->createAndStart<DecryptVerifyFilesCommand>( files );
537  else if ( chosen == importCerts )
538  d->createAndStart<ImportCertificateFromFileCommand>( files );
539  else if ( chosen == importCRLs )
540  d->createAndStart<ImportCrlCommand>( files );
541 
542  e->accept();
543 }
544 
545 void MainWindow::readProperties( const KConfigGroup & cg )
546 {
547  kDebug();
548  KXmlGuiWindow::readProperties(cg);
549  savedGeometry = cg.readEntry("savedGeometry", QByteArray() );
550  if ( !savedGeometry.isEmpty() ) {
551  restoreGeometry( savedGeometry );
552  }
553 
554  if (! cg.readEntry<bool>("hidden", false))
555  show();
556 }
557 
558 void MainWindow::saveProperties( KConfigGroup & cg )
559 {
560  kDebug();
561  KXmlGuiWindow::saveProperties( cg );
562  cg.writeEntry( "hidden", isHidden() );
563  if ( isHidden() ) {
564  cg.writeEntry( "savedGeometry", savedGeometry );
565  } else {
566  cg.writeEntry( "savedGeometry", saveGeometry() );
567  }
568 }
569 
570 #include "moc_mainwindow_desktop.cpp"
QHideEvent
flags
static const char * flags[]
Definition: readerstatus.cpp:114
MainWindow::showEvent
void showEvent(QShowEvent *e)
Definition: mainwindow_desktop.cpp:444
decryptverifyfilescommand.h
QWidget
MainWindow::dropEvent
void dropEvent(QDropEvent *)
Definition: mainwindow_desktop.cpp:499
KStandardGuiItem_quit
static KGuiItem KStandardGuiItem_quit()
Definition: mainwindow_desktop.cpp:119
keylistcontroller.h
QWidget::isHidden
bool isHidden() const
OS_WIN
static const bool OS_WIN
Definition: mainwindow_desktop.cpp:102
QEventLoop
QDropEvent::mimeData
const QMimeData * mimeData() const
QAbstractItemView
MainWindow::savedGeometry
QByteArray savedGeometry
Definition: mainwindow_desktop.h:50
Kleo::TabWidget
Definition: tabwidget.h:58
QByteArray
extract_local_files
static QStringList extract_local_files(const QMimeData *data)
Definition: mainwindow_desktop.cpp:470
QMainWindow::statusBar
QStatusBar * statusBar() const
Kleo::KeyListController
Definition: keylistcontroller.h:55
QProcess::startDetached
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
Kleo::Commands::DecryptVerifyFilesCommand
Definition: commands/decryptverifyfilescommand.h:45
MainWindow::hideEvent
void hideEvent(QHideEvent *e)
Definition: mainwindow_desktop.cpp:457
QMenu::addAction
void addAction(QAction *action)
classify.h
QDropEvent::pos
const QPoint & pos() const
Kleo::SearchBar
Definition: searchbar.h:50
QByteArray::isEmpty
bool isEmpty() const
QWidget::mapToGlobal
QPoint mapToGlobal(const QPoint &pos) const
Kleo::ImportCertificateFromFileCommand
Definition: importcertificatefromfilecommand.h:42
QList::erase
iterator erase(iterator pos)
MainWindow::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *)
Definition: mainwindow_desktop.cpp:492
QDBusConnection::sessionBus
QDBusConnection sessionBus()
QPoint
AboutGpg4WinData
Definition: aboutdata.h:43
QDropEvent::acceptProposedAction
void acceptProposedAction()
QList::const_iterator
QMimeData
QList::size
int size() const
MainWindow::importCertificatesFromFile
void importCertificatesFromFile(const QStringList &files)
Definition: mainwindow_desktop.cpp:464
MainWindow::readProperties
void readProperties(const KConfigGroup &cg)
Definition: mainwindow_desktop.cpp:545
QCloseEvent
QWidget::setEnabled
void setEnabled(bool)
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
d
#define d
Definition: adduseridcommand.cpp:89
tabwidget.h
QEvent::ignore
void ignore()
KXmlGuiWindow
isQuitting
static bool isQuitting
Definition: mainwindow_desktop.cpp:132
QWidget::setLayout
void setLayout(QLayout *layout)
QList::empty
bool empty() const
action_data.h
QEventLoop::exec
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
QWidget::restoreGeometry
bool restoreGeometry(const QByteArray &geometry)
QShowEvent
QDBusMessage::createSignal
QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name)
QDropEvent
Kleo::Commands::ImportCrlCommand
Definition: importcrlcommand.h:43
QString::isEmpty
bool isEmpty() const
QDBusConnection::send
bool send(const QDBusMessage &message) const
keylistsortfilterproxymodel.h
aboutdata.h
KDAB_SET_OBJECT_NAME
#define KDAB_SET_OBJECT_NAME(x)
Definition: kdtoolsglobal.h:66
MainWindow::closeEvent
void closeEvent(QCloseEvent *e)
Definition: mainwindow_desktop.cpp:406
QVBoxLayout
QDropEvent::setDropAction
void setDropAction(Qt::DropAction action)
KAboutData
importcrlcommand.h
QMainWindow::setCentralWidget
void setCentralWidget(QWidget *widget)
QMenu::addSeparator
QAction * addSeparator()
QString
QList
Definition: commands/command.h:46
QWidget::hide
void hide()
selftestcommand.h
MainWindow::saveProperties
void saveProperties(KConfigGroup &cg)
Definition: mainwindow_desktop.cpp:558
QMenu::exec
QAction * exec()
QStringList
gnupg-helper.h
Kleo::action_data
Definition: action_data.h:44
QUrl::toLocalFile
QString toLocalFile() const
QWidget::setAcceptDrops
void setAcceptDrops(bool on)
Kleo::AbstractKeyListModel
Definition: keylistmodel.h:49
QList::end
iterator end()
QString::toLower
QString toLower() const
QMenu
QEvent::accept
void accept()
keylistmodel.h
QStatusBar::addPermanentWidget
void addPermanentWidget(QWidget *widget, int stretch)
Kleo::classify
unsigned int classify(const QString &filename)
Definition: classify.cpp:156
signencryptfilescommand.h
QUrl::isValid
bool isValid() const
QDragEnterEvent
QDBusMessage
QWidget::saveGeometry
QByteArray saveGeometry() const
QLatin1String
QKeySequence
QMimeData::urls
QList< QUrl > urls() const
can_decode_local_files
static bool can_decode_local_files(const QMimeData *data)
Definition: mainwindow_desktop.cpp:486
searchbar.h
q
#define q
Definition: adduseridcommand.cpp:90
QAction
ClipboardMenu
Definition: clipboardmenu.h:28
detail_p.h
mainwindow_desktop.h
KStandardGuiItem_close
static KGuiItem KStandardGuiItem_close()
Definition: mainwindow_desktop.cpp:126
Qt::WindowFlags
typedef WindowFlags
Kleo::Commands::SignEncryptFilesCommand
Definition: commands/signencryptfilescommand.h:47
MainWindow::~MainWindow
~MainWindow()
Definition: mainwindow.cpp:100
QWidget::show
void show()
Kleo::make_actions_from_data
void make_actions_from_data(const action_data *data, unsigned int numData, KActionCollection *collection)
Definition: action_data.cpp:66
clipboardmenu.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
MainWindow::MainWindow
MainWindow(QWidget *parent=0, Qt::WindowFlags flags=0)
Definition: mainwindow.cpp:52
QDropEvent::accept
void accept(bool accept)
QList::back
T & back()
QList::begin
iterator begin()
MainWindow
Definition: kgpgconf/mainwindow.h:47
QBoxLayout::setSpacing
void setSpacing(int spacing)
importcertificatefromfilecommand.h
QTimer::singleShot
singleShot
filedialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 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