• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

kgpg

kgpg.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kgpg.h  -  description
00003                              -------------------
00004     begin                : Mon Nov 18 2002
00005     copyright          : (C) 2002 by Jean-Baptiste Mardelle
00006     email                : bj@altern.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KGPGAPPLET_H
00019 #define KGPGAPPLET_H
00020 
00021 #include <QClipboard>
00022 
00023 #include <KUniqueApplication>
00024 #include <KSystemTrayIcon>
00025 #include <KShortcut>
00026 #include <KUrl>
00027 
00028 #include "ui_kgpgwizard.h"
00029 
00030 class QDragEnterEvent;
00031 class QDropEvent;
00032 class QMenu;
00033 
00034 class KPassivePopup;
00035 class KgpgWizard;
00036 class KAboutData;
00037 class KTemporaryFile;
00038 class KAction;
00039 
00040 class KgpgSelectPublicKeyDlg;
00041 class KGpgTextInterface;
00042 class KeysManager;
00043 class KgpgLibrary;
00044 class KGpgItemModel;
00045 class KgpgInterface;
00046 
00047 class KgpgWizard : public Q3Wizard, public Ui::KgpgWizard
00048 {
00049 public:
00050     KgpgWizard(QWidget *parent = 0) : Q3Wizard(parent)
00051     {
00052         setupUi(this);
00053     }
00054 };
00055 
00056 class KGpgUserActions : public QObject
00057 {
00058     Q_OBJECT
00059 
00060 public:
00061     KGpgUserActions(QWidget *parent, KSystemTrayIcon *parentTrayIcon, KGpgItemModel *model);
00062     ~KGpgUserActions();
00063 
00064     KUrl droppedUrl;
00065     KUrl::List droppedUrls;
00066     KTemporaryFile *kgpgfoldertmp;
00067     KShortcut goDefaultKey;
00068 
00069 signals:
00070     void setFont(QFont);
00071     void readAgain2();
00072     void createNewKey();
00073     void updateDefault(QString);
00074 
00075 public slots:
00081     void clipEncrypt();
00082     void clipDecrypt();
00083     void clipSign(bool openEditor = true);
00084 
00085     void encryptDroppedFile();
00086     void decryptDroppedFile();
00087     void signDroppedFile();
00088     void showDroppedFile();
00089 
00090     void busyMessage(const QString &mssge, bool reset = false);
00091     void slotVerifyFile();
00092     void encryptDroppedFolder();
00093     void startFolderEncode();
00094     void slotFolderFinished(const KUrl &, KGpgTextInterface *);
00095     void slotFolderFinishedError(const QString &errmsge, KGpgTextInterface *);
00096     void encryptFiles(KUrl::List urls);
00097     void slotAbortEnc();
00098 
00099 protected:
00100     virtual void dragEnterEvent(QDragEnterEvent *);
00101     virtual void dropEvent(QDropEvent*);
00102 
00103 private:
00104     KAction *saveDecrypt;
00105     KAction *showDecrypt;
00106     KAction *encrypt;
00107     KAction *sign;
00108 
00109     QMenu *droppopup;
00110     QMenu *udroppopup;
00111     KAboutData *_aboutData;
00112     QStringList customDecrypt;
00113     KgpgWizard *wiz;
00114     KPassivePopup *pop;
00115     KTemporaryFile *kgpgFolderExtract;
00116     int compressionScheme;
00117     int openTasks;
00118     KgpgSelectPublicKeyDlg *dialog;
00119     QClipboard::Mode clipboardMode;
00120     KSystemTrayIcon *trayIcon;
00121     KGpgItemModel *m_model;
00122 
00123     int startWizard();
00124     int firstRun();
00125 
00126     KUrl::List m_decryptionFailed;
00127 
00128 private slots:
00129     void slotWizardClose();
00130     void slotWizardChange();
00131     void slotSaveOptionsPath();
00132     void slotGenKey();
00133     void importSignature(const QString &ID);
00134     void slotSetClip(const QString &newtxt);
00135     void slotPassiveClip();
00136     void encryptClipboard(QStringList selec, QStringList encryptOptions, const bool symmetric);
00137     void help();
00138     void about();
00139     void readOptions();
00140     void droppedfile(KUrl::List);
00141     void droppedtext(const QString &inputText, bool allowEncrypt = true);
00142     void slotSetCompression(int cp);
00143     void decryptNextFile(KgpgLibrary *lib, const KUrl &failed);
00144     void decryptFile(KgpgLibrary *lib);
00145     void slotImportedKeys(KgpgInterface *iface, const QStringList &);
00146     void slotImportedKeys(KgpgLibrary *lib, const QStringList &);
00147 };
00148 
00149 class kgpgapplet : public KSystemTrayIcon
00150 {
00151     Q_OBJECT
00152 
00153 public:
00154     kgpgapplet(QWidget *parent, KGpgItemModel *model);
00155     ~kgpgapplet();
00156     KGpgUserActions *w;
00157 
00158 private:
00159     KSystemTrayIcon *kgpgapp;
00160 
00161 private slots:
00162     void slotOpenKeyManager();
00163     void slotOpenServerDialog();
00164     void showOptions();
00165 };
00166 
00167 class KCmdLineArgs;
00168 
00169 class KgpgAppletApp : public KUniqueApplication
00170 {
00171     Q_OBJECT
00172     friend class kgpgapplet;
00173 
00174 public:
00175     KgpgAppletApp();
00176     ~KgpgAppletApp();
00177 
00178     int newInstance ();
00179     bool running;
00180     KUrl::List urlList;
00181     KShortcut goHome;
00182 
00183 protected:
00184     KCmdLineArgs *args;
00185 
00186 private:
00187     kgpgapplet *kgpg_applet;
00188     KeysManager *s_keyManager;
00189 
00190 private slots:
00191     void slotHandleQuit();
00192     void wizardOver(const QString &defaultKeyId);
00193 };
00194 
00195 #endif // KGPGAPPLET_H

kgpg

Skip menu "kgpg"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal