1 #ifndef SSLTRUSTEDITOR_HPP
2 #define SSLTRUSTEDITOR_HPP
3 
4 #include <QWidget>
5 #include <QSortFilterProxyModel>
6 
7 #include "ssltrust.hpp"
8 
9 namespace Ui {
10 class SslTrustEditor;
11 }
12 
13 class SslTrustEditor : public QWidget
14 {
15     Q_OBJECT
16 
17 public:
18     explicit SslTrustEditor(QWidget *parent = nullptr);
19     ~SslTrustEditor();
20 
21 
22     SslTrust trust() const;
23     void setTrust(SslTrust const & trust);
24 
25 private slots:
26     void on_trust_revoke_selected_clicked();
27 
28     void on_trust_enable_ca_clicked();
29 
30     void on_trust_disable__ca_clicked();
31 
32     void on_trust_level_currentIndexChanged(int index);
33 
34 private:
35 
36 
37     void on_trusted_server_selection(QModelIndex const & current, QModelIndex const & previous);
38 
39 private:
40     Ui::SslTrustEditor *ui;
41 
42     SslTrust current_trust;
43 };
44 
45 #endif // SSLTRUSTEDITOR_HPP
46