File indexing completed on 2024-04-28 04:43:37

0001 /*
0002  Copyright (C) 2007 Justin Karneges <justin@affinix.com>
0003 
0004  Permission is hereby granted, free of charge, to any person obtaining a copy
0005  of this software and associated documentation files (the "Software"), to deal
0006  in the Software without restriction, including without limitation the rights
0007  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0008  copies of the Software, and to permit persons to whom the Software is
0009  furnished to do so, subject to the following conditions:
0010 
0011  The above copyright notice and this permission notice shall be included in
0012  all copies or substantial portions of the Software.
0013 
0014  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017  AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 */
0021 
0022 #ifndef KEYSELECTDLG_H
0023 #define KEYSELECTDLG_H
0024 
0025 #include <QDialog>
0026 
0027 class QPixmap;
0028 
0029 namespace QCA {
0030 class CertificateChain;
0031 class KeyStoreEntry;
0032 }
0033 
0034 class KeySelectDlg : public QDialog
0035 {
0036     Q_OBJECT
0037 public:
0038     enum IconType
0039     {
0040         IconCert,
0041         IconCrl,
0042         IconKeyBundle,
0043         IconPgpPub,
0044         IconPgpSec
0045     };
0046 
0047     KeySelectDlg(QWidget *parent = 0);
0048     ~KeySelectDlg();
0049 
0050     void setIcon(IconType type, const QPixmap &icon);
0051 
0052 Q_SIGNALS:
0053     void selected(const QCA::KeyStoreEntry &entry);
0054     void viewCertificate(const QCA::CertificateChain &chain);
0055 
0056 protected slots:
0057     virtual void accept();
0058 
0059 private:
0060     class Private;
0061     friend class Private;
0062     Private *d;
0063 };
0064 
0065 #endif