49 #ifndef __KLEO_UI_KEYREQUESTER_H__
50 #define __KLEO_UI_KEYREQUESTER_H__
53 #include <kleo/cryptobackend.h>
56 #include <tdemacros.h>
60 class KeyListViewItem;
80 KeyRequester( unsigned int allowedKeys, bool multipleKeys= false,
81 TQWidget * parent=0, const char * name=0 );
83 KeyRequester( TQWidget * parent=0, const char * name=0 );
86 const GpgME::Key & key() const;
91 void setKey( const GpgME::Key & key );
93 const std::vector<GpgME::Key> & keys() const;
97 void setKeys( const std::vector<GpgME::Key> & keys );
99 TQString fingerprint() const;
103 void setFingerprint( const TQString & fingerprint );
105 TQStringList fingerprints() const;
109 void setFingerprints( const TQStringList & fingerprints );
112 TQPushButton * eraseButton();
113 TQPushButton * dialogButton();
115 void setDialogCaption( const TQString & caption );
116 void setDialogMessage( const TQString & message );
118 bool isMultipleKeysEnabled() const;
119 void setMultipleKeysEnabled( bool enable );
121 unsigned int allowedKeys() const;
122 void setAllowedKeys( unsigned int allowed );
124 void setInitialQuery( const TQString & s ) { mInitialQuery = s; }
125 const TQString & initialQuery() const { return mInitialQuery; }
132 void startKeyListJob( const TQStringList & fingerprints );
136 void slotNextKey( const GpgME::Key & key );
137 void slotKeyListResult( const GpgME::KeyListResult & result );
138 void slotDialogButtonClicked();
139 void slotEraseButtonClicked();
142 const CryptoBackend::Protocol * mOpenPGPBackend;
143 const CryptoBackend::Protocol * mSMIMEBackend;
145 TQPushButton * mEraseButton;
146 TQPushButton * mDialogButton;
147 TQString mDialogCaption, mDialogMessage, mInitialQuery;
149 unsigned int mKeyUsage;
151 std::vector<GpgME::Key> mKeys;
152 std::vector<GpgME::Key> mTmpKeys;
158 virtual void virtual_hook( int, void* );
162 class TDE_EXPORT EncryptionKeyRequester : public KeyRequester {
166 enum { OpenPGP = 1, SMIME = 2, AllProtocols = OpenPGP|SMIME };
171 EncryptionKeyRequester( bool multipleKeys= false, unsigned int proto=AllProtocols,
172 TQWidget * parent=0, const char * name=0,
173 bool onlyTrusted= true, bool onlyValid= true );
177 EncryptionKeyRequester( TQWidget * parent=0, const char * name=0 );
178 ~EncryptionKeyRequester();
180 void setAllowedKeys( unsigned int proto, bool onlyTrusted= true, bool onlyValid= true );
186 virtual void virtual_hook( int, void* );
190 class TDE_EXPORT SigningKeyRequester : public KeyRequester {
194 enum { OpenPGP = 1, SMIME = 2, AllProtocols = OpenPGP|SMIME };
204 SigningKeyRequester( bool multipleKeys= false, unsigned int proto=AllProtocols,
205 TQWidget * parent=0, const char * name=0,
206 bool onlyTrusted= true, bool onlyValid= true );
210 SigningKeyRequester( TQWidget * parent=0, const char * name=0 );
211 ~SigningKeyRequester();
219 void setAllowedKeys( unsigned int proto, bool onlyTrusted= true, bool onlyValid= true );
225 virtual void virtual_hook( int, void* );
230 #endif // __KLEO_UI_KEYREQUESTER_H__
Base class for SigningKeyRequester and EncryptionKeyRequester.
|