• Skip to content
  • Skip to link menu
KDE 4.0 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 #include <QLabel>
00023 
00024 #include <KUniqueApplication>
00025 #include <KSystemTrayIcon>
00026 #include <KShortcut>
00027 #include <KUrl>
00028 
00029 #include "ui_kgpgwizard.h"
00030 
00031 class QDragEnterEvent;
00032 class QDropEvent;
00033 class QMenu;
00034 
00035 class KPassivePopup;
00036 class KgpgWizard;
00037 class KAboutData;
00038 class KTemporaryFile;
00039 class KAction;
00040 
00041 class KgpgSelectPublicKeyDlg;
00042 class KgpgInterface;
00043 class KeysManager;
00044 
00045 class KgpgWizard : public Q3Wizard, public Ui::KgpgWizard
00046 {
00047 public:
00048     KgpgWizard(QWidget *parent = 0) : Q3Wizard(parent)
00049     {
00050         setupUi(this);
00051     }
00052 };
00053 
00054 class MyView : public QObject
00055 {
00056     Q_OBJECT
00057 
00058 public:
00059     explicit MyView(QWidget *parent = 0, KSystemTrayIcon *parentTrayIcon = 0);
00060     ~MyView();
00061 
00062     KUrl droppedUrl;
00063     KUrl::List droppedUrls;
00064     KTemporaryFile *kgpgfoldertmp;
00065     KShortcut goDefaultKey;
00066 
00067 signals:
00068     void setFont(QFont);
00069     void readAgain2();
00070     void createNewKey();
00071     void updateDefault(QString);
00072 
00073 public slots:
00079     void clipEncrypt();
00080     void clipDecrypt();
00081     void clipSign(bool openEditor = true);
00082 
00083     void encryptDroppedFile();
00084     void decryptDroppedFile();
00085     void signDroppedFile();
00086     void showDroppedFile();
00087 
00088     void busyMessage(const QString &mssge, bool reset = false);
00089     void slotVerifyFile();
00090     void encryptDroppedFolder();
00091     void startFolderEncode();
00092     void slotFolderFinished(const KUrl &, KgpgInterface *);
00093     void slotFolderFinishedError(const QString &errmsge, KgpgInterface *);
00094     void encryptFiles(KUrl::List urls);
00095     void slotAbortEnc();
00096 
00097 protected:
00098     virtual void dragEnterEvent(QDragEnterEvent *);
00099     virtual void dropEvent(QDropEvent*);
00100 
00101 private:
00102     KAction *saveDecrypt;
00103     KAction *showDecrypt;
00104     KAction *encrypt;
00105     KAction *sign;
00106 
00107     QMenu *droppopup;
00108     QMenu *udroppopup;
00109     KAboutData *_aboutData;
00110     QStringList customDecrypt;
00111     KgpgWizard *wiz;
00112     KPassivePopup *pop;
00113     KTemporaryFile *kgpgFolderExtract;
00114     int compressionScheme;
00115     int openTasks;
00116     KgpgSelectPublicKeyDlg *dialog;
00117     QClipboard::Mode clipboardMode;
00118     KSystemTrayIcon *trayIcon;
00119 
00120 private slots:
00121     void slotWizardClose();
00122     void startWizard();
00123     void slotWizardChange();
00124     void slotSaveOptionsPath();
00125     void slotGenKey();
00126     void importSignature(const QString &ID);
00127     void slotSetClip(const QString &newtxt);
00128     void slotPassiveClip();
00129     void encryptClipboard(QStringList selec, QStringList encryptOptions, const bool symmetric);
00130     void help();
00131     void about();
00132     void firstRun();
00133     void readOptions();
00134     void droppedfile(KUrl::List);
00135     void droppedtext(const QString &inputText, bool allowEncrypt = true);
00136     void unArchive();
00137     void slotSetCompression(int cp);
00138     void decryptNextFile();
00139 };
00140 
00141 class kgpgapplet : public KSystemTrayIcon
00142 {
00143     Q_OBJECT
00144 
00145 public:
00146     kgpgapplet(QWidget *parent = 0);
00147     ~kgpgapplet();
00148     MyView *w;
00149 
00150 private:
00151     KSystemTrayIcon *kgpgapp;
00152 
00153 private slots:
00154     void slotOpenKeyManager();
00155     void slotOpenServerDialog();
00156     void showOptions();
00157 };
00158 
00159 class KCmdLineArgs;
00160 
00161 class KgpgAppletApp : public KUniqueApplication
00162 {
00163     Q_OBJECT
00164     friend class kgpgapplet;
00165 
00166 public:
00167     KgpgAppletApp();
00168     ~KgpgAppletApp();
00169 
00170     int newInstance ();
00171     bool running;
00172     KUrl::List urlList;
00173     KShortcut goHome;
00174 
00175 protected:
00176     KCmdLineArgs *args;
00177 
00178 private:
00179     kgpgapplet *kgpg_applet;
00180     KeysManager *s_keyManager;
00181 
00182 private slots:
00183     void slotHandleQuit();
00184     void wizardOver(const QString &defaultKeyId);
00185 };
00186 
00187 #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
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
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