comparison ui/createcertlistdialog.h @ 454:efd1bd85112f

Save selected certificate in settings and parse it.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 10:36:22 +0000
parents 17e1c8f37d72
children 88dfe16a0bb9
comparison
equal deleted inserted replaced
453:6dec8101793c 454:efd1bd85112f
9 #define CREATECERTLISTDIALOG_H 9 #define CREATECERTLISTDIALOG_H
10 10
11 #include <QDialog> 11 #include <QDialog>
12 #include <QMainWindow> 12 #include <QMainWindow>
13 #include <QLineEdit> 13 #include <QLineEdit>
14
15 #include <polarssl/pk.h>
14 /** 16 /**
15 * @file createinstallerdialog.h 17 * @file createinstallerdialog.h
16 * @brief The dialog to show settings and create an installer. 18 * @brief The dialog to show settings and create an installer.
17 */ 19 */
18 20
19 class QListWidget; 21 class QListWidget;
22 class AdministratorWindow;
20 23
21 class CreateCertListDialog : public QDialog 24 class CreateCertListDialog : public QDialog
22 { 25 {
23 Q_OBJECT 26 Q_OBJECT
24 public: 27 public:
25 /** @brief Create a dialog showing settings for the create certificate list 28 /** @brief Create a dialog showing settings for the create certificate list
26 * process 29 * process
27 * */ 30 * */
28 CreateCertListDialog(QMainWindow *parent); 31 CreateCertListDialog(AdministratorWindow *parent);
29 32
30 private: 33 private:
31 void setupGUI(); 34 void setupGUI();
32 35
33 QLineEdit *mCertFile; 36 QLineEdit *mCertFile;
34 QLineEdit *mSaveFile; 37 QLineEdit *mSaveFile;
38 AdministratorWindow *mAdminWindow;
39
40 pk_context *mPk;
35 41
36 private slots: 42 private slots:
43 /** @brief Open the certificate selection dialog and parse the certificate
44 *
45 * If the certificate can be parsed mPk is replaced by the new key
46 * otherwise an error message is shown to the user.
47 */
37 void openCertificateSelect(); 48 void openCertificateSelect();
38 void openSaveLocation(); 49 void openSaveLocation();
50 /** @brief create a valid certificate list file
51 *
52 * The contents of the certificate list is the certificatelist
53 * of the adminWindow. It is signed with the currently
54 * loaded certificate in mPk. On errors the user is
55 * informed with showErrorMessage */
39 void createList(); 56 void createList();
57
58 /** @brief show an error message with QMessageBox */
59 void showErrorMessage(const QString&msg);
40 }; 60 };
41 61
42 #endif // CREATECERTLISTDIALOG_H 62 #endif // CREATECERTLISTDIALOG_H

http://wald.intevation.org/projects/trustbridge/