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 class KGpgTextInterface;
00032 class KGpgItemModel;
00033
00034 class KgpgLibrary : public QObject
00035 {
00036 Q_OBJECT
00037
00038 public:
00042 explicit KgpgLibrary(QWidget *parent = 0);
00043
00047 void setFileExtension(const QString &extension);
00048
00049 signals:
00050 void encryptionOver();
00051 void decryptionOver(KgpgLibrary *, KUrl);
00052 void importOver(KgpgLibrary *, QStringList);
00053 void systemMessage(QString, bool reset = false);
00054 void photoAdded();
00055
00056 public slots:
00057 void slotFileEnc(const KUrl::List &urls, const QStringList &opts, KGpgItemModel *model, const KShortcut &goDefaultKey, const QString &defaultKey = QString());
00058 void slotFileDec(const KUrl &srcUrl, const KUrl &destUrl, const QStringList &customDecryptOption = QStringList());
00059
00060 private slots:
00061 void startEncode(const QStringList &encryptkeys, const QStringList &encryptoptions, const bool &symetric);
00062 void fastEncode(const KUrl &filetocrypt, const QStringList &encryptkeys, const QStringList &encryptoptions, const bool &symetric);
00063 void processEnc(const KUrl &, KGpgTextInterface*);
00064 void processEncError(const QString &mssge, KGpgTextInterface*);
00065 void processDecOver(int, KGpgTextInterface*);
00066 void processEncPopup(const KUrl &url);
00067 void processPopup2(const QString &fileName);
00068
00069 void slotImportOver(KgpgInterface *iface, const QStringList &keys);
00070
00071 private:
00072 QWidget *m_panel;
00073 QString m_extension;
00074 QStringList m_encryptkeys;
00075 QStringList m_encryptoptions;
00076
00077 KUrl::List m_urlselecteds;
00078 KUrl m_urlselected;
00079 KPassivePopup *m_pop;
00080
00081 bool m_popisactive;
00082 bool m_symetric;
00083 };
00084
00085 #endif // KGPGLIBRARY_H