aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/KeyServerImportDialog.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-23 09:10:53 +0000
committerSaturneric <[email protected]>2022-01-23 09:10:53 +0000
commit0dd16d72d75e2068b8365a49ef2696a4744575dd (patch)
treea463727ba5a5ee4d5afcfb0eaa4d8e6e48b7c930 /src/ui/KeyServerImportDialog.h
parent<refactor>(ui): tidy up codes and comments. (diff)
downloadGpgFrontend-0dd16d72d75e2068b8365a49ef2696a4744575dd.tar.gz
GpgFrontend-0dd16d72d75e2068b8365a49ef2696a4744575dd.zip
<refactor>(ui): tidy up codes and comments.
1. tidy up ui.
Diffstat (limited to 'src/ui/KeyServerImportDialog.h')
-rw-r--r--src/ui/KeyServerImportDialog.h162
1 files changed, 124 insertions, 38 deletions
diff --git a/src/ui/KeyServerImportDialog.h b/src/ui/KeyServerImportDialog.h
index 00a91742..f2619464 100644
--- a/src/ui/KeyServerImportDialog.h
+++ b/src/ui/KeyServerImportDialog.h
@@ -36,60 +36,146 @@
namespace GpgFrontend::UI {
+/**
+ * @brief
+ *
+ */
class KeyServerImportDialog : public QDialog {
Q_OBJECT
public:
+ /**
+ * @brief Construct a new Key Server Import Dialog object
+ *
+ * @param automatic
+ * @param parent
+ */
KeyServerImportDialog(bool automatic, QWidget* parent);
+ /**
+ * @brief Construct a new Key Server Import Dialog object
+ *
+ * @param parent
+ */
explicit KeyServerImportDialog(QWidget* parent);
- void slotImport(const KeyIdArgsListPtr& keys);
-
- void slotImport(const QStringList& keyIds, const QUrl& keyserverUrl);
+ public slots:
- signals:
- void signalKeyImported();
-
- private slots:
+ /**
+ * @brief
+ *
+ * @param keys
+ */
+ void SlotImport(const KeyIdArgsListPtr& keys);
- void slotImport();
+ /**
+ * @brief
+ *
+ * @param keyIds
+ * @param keyserverUrl
+ */
+ void SlotImport(const QStringList& keyIds, const QUrl& keyserverUrl);
- void slotSearchFinished();
+ signals:
- void slotImportFinished(const QString& keyid);
+ /**
+ * @brief
+ *
+ */
+ void SignalKeyImported();
- void slotSearch();
+ private slots:
- void slotSaveWindowState();
+ /**
+ * @brief
+ *
+ */
+ void slot_import();
+
+ /**
+ * @brief
+ *
+ */
+ void slot_search_finished();
+
+ /**
+ * @brief
+ *
+ * @param keyid
+ */
+ void slot_import_finished(const QString& keyid);
+
+ /**
+ * @brief
+ *
+ */
+ void slot_search();
+
+ /**
+ * @brief
+ *
+ */
+ void slot_save_window_state();
private:
- void createKeysTable();
-
- void setMessage(const QString& text, bool error);
-
- void importKeys(ByteArrayPtr in_data);
-
- void setLoading(bool status);
-
- QPushButton* createButton(const QString& text, const char* member);
-
- QComboBox* createComboBox();
-
- bool mAutomatic = false;
-
- QLineEdit* searchLineEdit{};
- QComboBox* keyServerComboBox{};
- QProgressBar* waitingBar;
- QLabel* searchLabel{};
- QLabel* keyServerLabel{};
- QLabel* message{};
- QLabel* icon{};
- QPushButton* closeButton{};
- QPushButton* importButton{};
- QPushButton* searchButton{};
- QTableWidget* keysTable{};
- QNetworkAccessManager* qnam{};
+ /**
+ * @brief Create a keys table object
+ *
+ */
+ void create_keys_table();
+
+ /**
+ * @brief Set the message object
+ *
+ * @param text
+ * @param error
+ */
+ void set_message(const QString& text, bool error);
+
+ /**
+ * @brief
+ *
+ * @param in_data
+ */
+ void import_keys(ByteArrayPtr in_data);
+
+ /**
+ * @brief Set the loading object
+ *
+ * @param status
+ */
+ void set_loading(bool status);
+
+ /**
+ * @brief Create a button object
+ *
+ * @param text
+ * @param member
+ * @return QPushButton*
+ */
+ QPushButton* create_button(const QString& text, const char* member);
+
+ /**
+ * @brief Create a comboBox object
+ *
+ * @return QComboBox*
+ */
+ QComboBox* create_comboBox();
+
+ bool m_automatic_ = false; ///<
+
+ QLineEdit* search_line_edit_{}; ///<
+ QComboBox* key_server_combo_box_{}; ///<
+ QProgressBar* waiting_bar_; ///<
+ QLabel* search_label_{}; ///<
+ QLabel* key_server_label_{}; ///<
+ QLabel* message_{}; ///<
+ QLabel* icon_{}; ///<
+ QPushButton* close_button_{}; ///<
+ QPushButton* import_button_{}; ///<
+ QPushButton* search_button_{}; ///<
+ QTableWidget* keys_table_{}; ///<
+ QNetworkAccessManager* network_access_manager_{}; ///<
};
} // namespace GpgFrontend::UI