diff options
Diffstat (limited to 'src/ui/widgets')
-rw-r--r-- | src/ui/widgets/FilePage.h | 2 | ||||
-rw-r--r-- | src/ui/widgets/FindWidget.cpp | 6 | ||||
-rw-r--r-- | src/ui/widgets/InfoBoardWidget.cpp | 4 | ||||
-rw-r--r-- | src/ui/widgets/InfoBoardWidget.h | 2 | ||||
-rw-r--r-- | src/ui/widgets/KeyList.h | 2 | ||||
-rw-r--r-- | src/ui/widgets/SignersPicker.cpp | 74 | ||||
-rw-r--r-- | src/ui/widgets/SignersPicker.h | 66 | ||||
-rw-r--r-- | src/ui/widgets/VerifyKeyDetailBox.cpp | 2 | ||||
-rw-r--r-- | src/ui/widgets/VerifyKeyDetailBox.h | 2 |
9 files changed, 10 insertions, 150 deletions
diff --git a/src/ui/widgets/FilePage.h b/src/ui/widgets/FilePage.h index cff395a8..8e278de7 100644 --- a/src/ui/widgets/FilePage.h +++ b/src/ui/widgets/FilePage.h @@ -29,8 +29,6 @@ #ifndef GPGFRONTEND_FILEPAGE_H #define GPGFRONTEND_FILEPAGE_H - - #include "ui/GpgFrontendUI.h" #include "ui/widgets/InfoBoardWidget.h" diff --git a/src/ui/widgets/FindWidget.cpp b/src/ui/widgets/FindWidget.cpp index defcf31c..598d8004 100644 --- a/src/ui/widgets/FindWidget.cpp +++ b/src/ui/widgets/FindWidget.cpp @@ -49,9 +49,11 @@ FindWidget::FindWidget(QWidget* parent, PlainTextEditorPage* edit) this->setLayout(notificationWidgetLayout); connect(find_edit_, &QLineEdit::textEdited, this, &FindWidget::slot_find); - connect(find_edit_, &QLineEdit::returnPressed, this, &FindWidget::slot_find_next); + connect(find_edit_, &QLineEdit::returnPressed, this, + &FindWidget::slot_find_next); connect(nextButton, &QPushButton::clicked, this, &FindWidget::slot_find_next); - connect(previousButton, &QPushButton::clicked, this, &FindWidget::slot_find_previous); + connect(previousButton, &QPushButton::clicked, this, + &FindWidget::slot_find_previous); connect(closeButton, &QPushButton::clicked, this, &FindWidget::slot_close); // The timer is necessary for setting the focus diff --git a/src/ui/widgets/InfoBoardWidget.cpp b/src/ui/widgets/InfoBoardWidget.cpp index ec2971cc..264a67d1 100644 --- a/src/ui/widgets/InfoBoardWidget.cpp +++ b/src/ui/widgets/InfoBoardWidget.cpp @@ -28,10 +28,10 @@ #include "ui/widgets/InfoBoardWidget.h" -#include "ui/SignalStation.h" #include "core/function/GlobalSettingStation.h" -#include "ui_InfoBoard.h" +#include "ui/SignalStation.h" #include "ui/struct/SettingsObject.h" +#include "ui_InfoBoard.h" namespace GpgFrontend::UI { diff --git a/src/ui/widgets/InfoBoardWidget.h b/src/ui/widgets/InfoBoardWidget.h index 7f456777..47740456 100644 --- a/src/ui/widgets/InfoBoardWidget.h +++ b/src/ui/widgets/InfoBoardWidget.h @@ -31,7 +31,7 @@ #include "PlainTextEditorPage.h" #include "core/function/result_analyse/GpgVerifyResultAnalyse.h" -#include "ui/details/VerifyDetailsDialog.h" +#include "ui/dialog/details/VerifyDetailsDialog.h" class Ui_InfoBoard; diff --git a/src/ui/widgets/KeyList.h b/src/ui/widgets/KeyList.h index 60449ad9..f1c88cc6 100644 --- a/src/ui/widgets/KeyList.h +++ b/src/ui/widgets/KeyList.h @@ -32,7 +32,7 @@ #include <utility> #include "core/GpgContext.h" -#include "ui/import_export/KeyImportDetailDialog.h" +#include "ui/dialog/import_export/KeyImportDetailDialog.h" class Ui_KeyList; diff --git a/src/ui/widgets/SignersPicker.cpp b/src/ui/widgets/SignersPicker.cpp deleted file mode 100644 index 75f6b2ba..00000000 --- a/src/ui/widgets/SignersPicker.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (C) 2021 Saturneric - * - * This file is part of GpgFrontend. - * - * GpgFrontend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GpgFrontend is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. - * - * The initial version of the source code is inherited from - * the gpg4usb project, which is under GPL-3.0-or-later. - * - * All the source code of GpgFrontend was modified and released by - * Saturneric<[email protected]> starting on May 12, 2021. - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#include "ui/widgets/SignersPicker.h" - -#include "ui/widgets/KeyList.h" - -namespace GpgFrontend::UI { - -SignersPicker::SignersPicker(QWidget* parent) : QDialog(parent) { - auto confirm_button = new QPushButton(_("Confirm")); - connect(confirm_button, &QPushButton::clicked, this, &SignersPicker::accept); - - /*Setup KeyList*/ - key_list_ = new KeyList(false, this); - key_list_->AddListGroupTab( - _("Signers"), KeyListRow::ONLY_SECRET_KEY, - KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage, - [](const GpgKey& key) -> bool { - return key.IsHasActualSigningCapability(); - }); - key_list_->SlotRefresh(); - - auto* vbox2 = new QVBoxLayout(); - vbox2->addWidget(new QLabel(QString(_("Select Signer(s)")) + ": ")); - vbox2->addWidget(key_list_); - vbox2->addWidget(new QLabel( - QString( - _("Please select one or more private keys you use for signing.")) + - "\n" + - _("If no key is selected, the default key will be used for signing."))); - vbox2->addWidget(confirm_button); - vbox2->addStretch(0); - setLayout(vbox2); - - this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | - Qt::CustomizeWindowHint); - - this->setModal(true); - this->setWindowTitle("Signers Picker"); - this->setMinimumWidth(480); - this->show(); -} - -GpgFrontend::KeyIdArgsListPtr SignersPicker::GetCheckedSigners() { - return key_list_->GetPrivateChecked(); -} - -} // namespace GpgFrontend::UI diff --git a/src/ui/widgets/SignersPicker.h b/src/ui/widgets/SignersPicker.h deleted file mode 100644 index 30f872f8..00000000 --- a/src/ui/widgets/SignersPicker.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (C) 2021 Saturneric - * - * This file is part of GpgFrontend. - * - * GpgFrontend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * GpgFrontend is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. - * - * The initial version of the source code is inherited from - * the gpg4usb project, which is under GPL-3.0-or-later. - * - * All the source code of GpgFrontend was modified and released by - * Saturneric<[email protected]> starting on May 12, 2021. - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifndef GPGFRONTEND_ZH_CN_TS_SIGNERSPIRCKER_H -#define GPGFRONTEND_ZH_CN_TS_SIGNERSPIRCKER_H - -#include "GpgFrontendUI.h" - -namespace GpgFrontend::UI { - -class KeyList; - -/** - * @brief - * - */ -class SignersPicker : public QDialog { - Q_OBJECT - - public: - /** - * @brief Construct a new Signers Picker object - * - * @param parent - */ - explicit SignersPicker(QWidget* parent = nullptr); - - /** - * @brief Get the Checked Signers object - * - * @return GpgFrontend::KeyIdArgsListPtr - */ - GpgFrontend::KeyIdArgsListPtr GetCheckedSigners(); - - private: - KeyList* key_list_; ///< -}; - -} // namespace GpgFrontend::UI - -#endif // GPGFRONTEND_ZH_CN_TS_SIGNERSPIRCKER_H diff --git a/src/ui/widgets/VerifyKeyDetailBox.cpp b/src/ui/widgets/VerifyKeyDetailBox.cpp index 4c936f4f..c6c4982c 100644 --- a/src/ui/widgets/VerifyKeyDetailBox.cpp +++ b/src/ui/widgets/VerifyKeyDetailBox.cpp @@ -41,7 +41,7 @@ VerifyKeyDetailBox::VerifyKeyDetailBox(const GpgSignature& signature, case GPG_ERR_NO_PUBKEY: { this->setTitle("A Error Signature"); auto* importButton = new QPushButton(_("Import from keyserver")); - connect(importButton,&QPushButton::clicked, this, + connect(importButton, &QPushButton::clicked, this, &VerifyKeyDetailBox::slot_import_form_key_server); this->setTitle(QString(_("Key not present with id 0x")) + fpr_.c_str()); diff --git a/src/ui/widgets/VerifyKeyDetailBox.h b/src/ui/widgets/VerifyKeyDetailBox.h index 57f133d5..6ed9fd52 100644 --- a/src/ui/widgets/VerifyKeyDetailBox.h +++ b/src/ui/widgets/VerifyKeyDetailBox.h @@ -29,7 +29,7 @@ #ifndef __VERIFYKEYDETAILBOX_H__ #define __VERIFYKEYDETAILBOX_H__ -#include "ui/import_export/KeyServerImportDialog.h" +#include "ui/dialog/import_export/KeyServerImportDialog.h" #include "ui/widgets/KeyList.h" namespace GpgFrontend::UI { |