comparison ui/createcertlistdialog.h @ 465:88dfe16a0bb9

Implement certificatelist saving
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 15:34:53 +0000
parents efd1bd85112f
children 0d71ce440bcc
comparison
equal deleted inserted replaced
464:2e100d3e414a 465:88dfe16a0bb9
27 public: 27 public:
28 /** @brief Create a dialog showing settings for the create certificate list 28 /** @brief Create a dialog showing settings for the create certificate list
29 * process 29 * process
30 * */ 30 * */
31 CreateCertListDialog(AdministratorWindow *parent); 31 CreateCertListDialog(AdministratorWindow *parent);
32 ~CreateCertListDialog();
32 33
33 private: 34 private:
34 void setupGUI(); 35 void setupGUI();
35 36
36 QLineEdit *mCertFile; 37 QLineEdit *mKeyFile;
37 QLineEdit *mSaveFile; 38 QLineEdit *mSaveDir;
38 AdministratorWindow *mAdminWindow; 39 AdministratorWindow *mAdminWindow;
39 40
40 pk_context *mPk; 41 pk_context *mPk;
42
43 /** @brief show an error message with QMessageBox
44 *
45 * @param [in] msg The message to show
46 */
47 void showErrorMessage(const QString &msg);
48
49 /** @brief load a file into mPk
50 *
51 * If the file is not a valid key or an error
52 * occurs mPk will be NULL after a call to this function.
53 *
54 * @param [in] the file to load
55 */
56 void loadKeyFile(const QString& fileName);
41 57
42 private slots: 58 private slots:
43 /** @brief Open the certificate selection dialog and parse the certificate 59 /** @brief Open the certificate selection dialog and parse the certificate
44 * 60 *
45 * If the certificate can be parsed mPk is replaced by the new key 61 * If the certificate can be parsed mPk is replaced by the new key
47 */ 63 */
48 void openCertificateSelect(); 64 void openCertificateSelect();
49 void openSaveLocation(); 65 void openSaveLocation();
50 /** @brief create a valid certificate list file 66 /** @brief create a valid certificate list file
51 * 67 *
52 * The contents of the certificate list is the certificatelist 68 * The contents of the certificate list are the certificates
53 * of the adminWindow. It is signed with the currently 69 * shown in the adminWindow. It is signed with the currently
54 * loaded certificate in mPk. On errors the user is 70 * loaded certificate in mPk. On errors the user is
55 * informed with showErrorMessage */ 71 * informed with showErrorMessage */
56 void createList(); 72 void createList();
57
58 /** @brief show an error message with QMessageBox */
59 void showErrorMessage(const QString&msg);
60 }; 73 };
61 74
62 #endif // CREATECERTLISTDIALOG_H 75 #endif // CREATECERTLISTDIALOG_H

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