diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch) | |
tree | 8d927b7b47a90c4adb646482a52613f58acd6f8c /kgpg/kgpg.h | |
download | tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgpg/kgpg.h')
-rw-r--r-- | kgpg/kgpg.h | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/kgpg/kgpg.h b/kgpg/kgpg.h new file mode 100644 index 0000000..aff3d18 --- /dev/null +++ b/kgpg/kgpg.h @@ -0,0 +1,168 @@ +/*************************************************************************** + 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 + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <kaction.h> +#include <ksystemtray.h> +#include <kuniqueapplication.h> +#include <kurl.h> +#include <kshortcut.h> + +#include <qlabel.h> +#include <qstringlist.h> +#include <qclipboard.h> + + +class QPopupMenu; +class KTempFile; +class KAboutData; +class KPassivePopup; +class KgpgWizard; +class popupPublic; + +class MyView : public QLabel +{ + + Q_OBJECT + +public: + MyView( QWidget *parent = 0, const char *name = 0); + ~MyView(); + + KURL droppedUrl; + KURL::List droppedUrls; + KTempFile *kgpgfoldertmp; + KShortcut goDefaultKey; + QClipboard::Mode clipboardMode; + +private: + QPopupMenu *droppopup,*udroppopup; + KAboutData *_aboutData; + QStringList customDecrypt; + KgpgWizard *wiz; + KPassivePopup *pop; + KTempFile *kgpgFolderExtract; + int compressionScheme,openTasks; + popupPublic *dialogue; + +public slots: + void busyMessage(QString mssge,bool reset=false); + void encryptDroppedFile(); + void decryptDroppedFile(); + void slotVerifyFile(); + void signDroppedFile(); + void showDroppedFile (); + void clipDecrypt(); + void clipSign(bool openEditor=true); + void clipEncrypt(); + void shredDroppedFile(); + void encryptDroppedFolder(); + void startFolderEncode(QStringList selec,QStringList encryptOptions,bool ,bool symetric); + void slotFolderFinished(KURL); + void slotFolderFinishedError(QString errmsge); + void encryptFiles(KURL::List urls); + void installShred(); + +private slots: + void slotWizardClose(); + void startWizard(); + void slotWizardChange(); + void slotSaveOptionsPath(); + void slotGenKey(); + void importSignature(QString ID); + void slotSetClip(QString newtxt); + void slotPassiveClip(); + void encryptClipboard(QStringList selec,QStringList encryptOptions,bool,bool symmetric); + void help(); + void about(); + void firstRun(); + void readOptions(); + void droppedfile (KURL::List); + void droppedtext (QString inputText, bool allowEncrypt=true); + void unArchive(); + void slotSetCompression(int cp); + void decryptNextFile(); + +protected: + virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dropEvent (QDropEvent*); + +protected slots: + + +signals: + void setFont(QFont); + void readAgain2(); + void createNewKey(); + void updateDefault(QString); + void importedKeys(QStringList); +}; + +class kgpgapplet : public KSystemTray//KUniqueApplication +{ + Q_OBJECT + +public: + kgpgapplet( QWidget *parent = 0, const char *name = 0); + /** destructor */ + ~kgpgapplet(); + MyView *w; + +private: + KSystemTray *kgpgapp; + KAction *KgpgEncryptClipboard, *KgpgDecryptClipboard, *KgpgSignClipboard; + +private slots: + void slotOpenKeyManager(); + void slotOpenServerDialog(); + void showOptions(); + void checkMenu(); +}; + +class KCmdLineArgs; + +class KgpgAppletApp : public KUniqueApplication +{ + Q_OBJECT + friend class kgpgapplet; +public: + KgpgAppletApp(); + ~KgpgAppletApp(); + int newInstance (); + KURL::List urlList; + bool running; + KShortcut goHome; + +protected: + KCmdLineArgs *args; +private: + kgpgapplet *kgpg_applet; + class listKeys *s_keyManager; + +private slots: + void slotHandleQuit(); + void wizardOver(QString defaultKeyId); +}; + +#endif // KGPGAPPLET_H + |