kgpg
kgpglibrary.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KGPGLIBRARY_H
00019 #define KGPGLIBRARY_H
00020
00021 #include <QObject>
00022
00023 #include <KShortcut>
00024 #include <KUrl>
00025
00026 #include <QStringList>
00027 #include <QString>
00028
00029 class KPassivePopup;
00030 class KgpgInterface;
00031
00032 class KgpgLibrary : public QObject
00033 {
00034 Q_OBJECT
00035
00036 public:
00040 explicit KgpgLibrary(QWidget *parent = 0, const bool &pgpExtension = false);
00041
00042 signals:
00043 void encryptionOver();
00044 void decryptionOver();
00045 void importOver(QStringList);
00046 void systemMessage(QString, bool reset = false);
00047 void photoAdded();
00048
00049 public slots:
00050 void slotFileEnc(const KUrl::List &urls = KUrl(""), const QStringList &opts = QStringList(), const QStringList &defaultKey = QStringList(), const KShortcut &goDefaultKey = KShortcut(QKeySequence(Qt::CTRL + Qt::Key_Home)));
00051 void slotFileDec(const KUrl &srcUrl, const KUrl &destUrl, const QStringList &customDecryptOption = QStringList());
00052
00053 void addPhoto(const QString &keyid);
00054
00055 private slots:
00056 void startEncode(const QStringList &encryptkeys, const QStringList &encryptoptions, const bool &symetric);
00057 void fastEncode(const KUrl &filetocrypt, const QStringList &encryptkeys, const QStringList &encryptoptions, const bool &symetric);
00058 void processEnc(const KUrl &, KgpgInterface*);
00059 void processEncError(const QString &mssge, KgpgInterface*);
00060 void processDecOver();
00061 void processDecError(const QString &mssge);
00062 void processEncPopup(const KUrl &url);
00063 void processPopup2(const QString &fileName);
00064
00065 void slotAddPhotoFinished(int res, KgpgInterface *interface);
00066
00067 private:
00068 QWidget *m_panel;
00069 QString m_extension;
00070 QStringList m_encryptkeys;
00071 QStringList m_encryptoptions;
00072
00073 KUrl::List m_urlselecteds;
00074 KUrl m_urlselected;
00075 KPassivePopup *m_pop;
00076
00077 bool m_popisactive;
00078 bool m_symetric;
00079 };
00080
00081 #endif // KGPGLIBRARY_H