26 #include <QtCore/QString>
27 #include <QtCore/QVector>
35 #include <kpassworddialog.h>
47 class QTreeWidgetItem;
65 const QString &caption=QString(),
66 const QString &keyID=QString());
85 virtual void setValues();
86 virtual void applySettings();
103 #ifndef QT_NO_TREEWIDGET
104 #define KeySelectionDialogSuper KDialog
109 enum TrustCheckMode { NoExpensiveTrustCheck,
110 AllowExpensiveTrustCheck,
118 const QString& title,
119 const QString& text = QString(),
121 const bool rememberChoice =
false,
122 const unsigned int allowedKeys =
AllKeys,
123 const bool extendedSelection =
false,
129 virtual KeyID key()
const;
137 return mRememberCB->isChecked();
143 virtual void slotRereadKeys();
144 virtual void slotSelectionChanged();
145 virtual void slotCheckSelection( QTreeWidgetItem* = 0 );
146 virtual void slotRMB(
const QPoint& pos );
147 virtual void slotRecheckKey();
148 virtual void slotOk();
149 virtual void slotCancel();
150 virtual void slotSearch(
const QString & text );
151 virtual void slotFilter();
154 void filterByKeyID(
const QString & keyID );
155 void filterByKeyIDOrUID(
const QString & keyID );
156 void filterByUID(
const QString & uid );
158 bool anyChildMatches(
const QTreeWidgetItem * item, QRegExp & rx )
const;
162 QString keyInfo(
const Kpgp::Key* )
const;
164 QString beautifyFingerprint(
const QByteArray& )
const;
167 KeyID getKeyId(
const QTreeWidgetItem* )
const;
170 int keyValidity(
const Kpgp::Key* )
const;
173 void updateKeyInfo(
const Kpgp::Key*, QTreeWidgetItem* )
const;
182 int keyAdmissibility( QTreeWidgetItem*,
183 TrustCheckMode = NoExpensiveTrustCheck )
const;
189 QTreeWidget *mListView;
190 QCheckBox *mRememberCB;
191 QPixmap *mKeyGoodPix, *mKeyBadPix, *mKeyUnknownPix, *mKeyValidPix;
193 unsigned int mAllowedKeys;
194 QTimer* mCheckSelectionTimer;
195 QTimer* mStartSearchTimer;
197 QTreeWidgetItem* mCurrentContextMenuItem;
199 static const int sCheckSelectionDelay;
209 unsigned int allowedKeys=
AllKeys,
const char * name=0 );
213 void setKeyIDs(
const KeyIDList & keyIDs );
218 void setDialogCaption(
const QString & caption );
219 void setDialogMessage(
const QString & message );
221 bool isMultipleKeysEnabled()
const;
222 void setMultipleKeysEnabled(
bool enable );
224 int allowedKeys()
const;
225 void setAllowedKeys(
int allowed );
241 void slotDialogButtonClicked();
242 void slotEraseButtonClicked();
251 virtual void virtual_hook(
int,
void* );
260 const char * name=0 );
271 virtual void virtual_hook(
int,
void* );
280 const char * name=0 );
291 virtual void virtual_hook(
int,
void* );
302 const QVector<KeyIDList>&,
303 const int allowedKeys,
307 QVector<KeyIDList>
keys()
const {
return mKeys; }
313 void slotChangeEncryptionKey(
int );
314 virtual void slotOk();
315 virtual void slotCancel();
318 QVector<KeyIDList> mKeys;
322 QVector<QLabel*> mAddressLabels;
323 QVector<QLabel*> mKeyIdsLabels;
325 QVector<QComboBox*> mEncrPrefCombos;
336 const QByteArray &charset=0,
341 void setMinimumSize();
QPushButton * mEraseButton
virtual bool rememberSelection() const
QPushButton * dialogButton() const
virtual ~KeyApprovalDialog()
void slotPrefsChanged(int)
QPushButton * eraseButton() const
QPushButton * mDialogButton
bool preferencesChanged() const
virtual KeyIDList keys() const
Returns a list of selected key IDs.
QGroupBox * mpOptionsGroupBox
QVector< KeyIDList > keys() const
A widget for configuring the pgp interface.
virtual ~CipherTextDialog()
QGroupBox * optionsGroupBox()
This class is used to store information about a PGP key.
QCheckBox * showCipherText
QCheckBox * showKeyApprovalDlg