GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

InfoBoardWidget.h
1
29 #ifndef __VERIFYNOTIFICATION_H__
30 #define __VERIFYNOTIFICATION_H__
31
32 #include "PlainTextEditorPage.h"
33 #include "core/function/result_analyse/GpgVerifyResultAnalyse.h"
34 #include "ui/dialog/details/VerifyDetailsDialog.h"
35
36 class Ui_InfoBoard;
37
38 namespace GpgFrontend::UI {
39
43 typedef enum {
44 INFO_ERROR_OK = 0,
45 INFO_ERROR_WARN = 1,
46 INFO_ERROR_CRITICAL = 2,
47 INFO_ERROR_NEUTRAL = 3,
48 } InfoBoardStatus;
49
53 class InfoBoardWidget : public QWidget {
54 Q_OBJECT
55 public:
62 explicit InfoBoardWidget(QWidget* parent);
63
69 void AssociateTextEdit(QTextEdit* edit);
70
76 void AssociateTabWidget(QTabWidget* tab);
77
84 void AddOptionalAction(const QString& name,
85 const std::function<void()>& action);
86
91 void ResetOptionActionsMenu();
92
99 void SetInfoBoard(const QString& text,
100 GpgFrontend::UI::InfoBoardStatus verify_label_status);
101
102 public slots:
103
108 void SlotReset();
109
113 void SlotRefresh(const QString& text,
114 GpgFrontend::UI::InfoBoardStatus status);
115
116 private slots:
117
122 void slot_copy();
123
128 void slot_save();
129
130 private:
131 std::shared_ptr<Ui_InfoBoard> ui_;
132
133 QTextEdit* m_text_page_{
134 nullptr};
135 QTabWidget* m_tab_widget_{nullptr};
136
143 void delete_widgets_in_layout(QLayout* layout, int start_index = 0);
144 };
145
146 } // namespace GpgFrontend::UI
147
148 #endif // __VERIFYNOTIFICATION_H__
GpgFrontend::UI::InfoBoardWidget
Class for handling the verify label shown at bottom of a textedit-page.
Definition: InfoBoardWidget.h:53
GpgFrontend::UI::InfoBoardWidget::AddOptionalAction
void AddOptionalAction(const QString &name, const std::function< void()> &action)
Definition: InfoBoardWidget.cpp:114
GpgFrontend::UI::InfoBoardWidget::AssociateTextEdit
void AssociateTextEdit(QTextEdit *edit)
Definition: InfoBoardWidget.cpp:96
GpgFrontend::UI::InfoBoardWidget::m_text_page_
QTextEdit * m_text_page_
TextEdit associated to the notification.
Definition: InfoBoardWidget.h:133
GpgFrontend::UI::InfoBoardWidget::SlotRefresh
void SlotRefresh(const QString &text, GpgFrontend::UI::InfoBoardStatus status)
Definition: InfoBoardWidget.cpp:90
GpgFrontend::UI::InfoBoardWidget::ResetOptionActionsMenu
void ResetOptionActionsMenu()
Definition: InfoBoardWidget.cpp:130
GpgFrontend::UI::InfoBoardWidget::delete_widgets_in_layout
void delete_widgets_in_layout(QLayout *layout, int start_index=0)
Definition: InfoBoardWidget.cpp:144
GpgFrontend::UI::InfoBoardWidget::SetInfoBoard
void SetInfoBoard(const QString &text, GpgFrontend::UI::InfoBoardStatus verify_label_status)
Definition: InfoBoardWidget.cpp:58
GpgFrontend::UI::InfoBoardWidget::InfoBoardWidget
InfoBoardWidget(QWidget *parent)
Definition: InfoBoardWidget.cpp:38
GpgFrontend::UI::InfoBoardWidget::AssociateTabWidget
void AssociateTabWidget(QTabWidget *tab)
Definition: InfoBoardWidget.cpp:104
GpgFrontend::UI
Definition: FileReadTask.cpp:29
GpgFrontend::UI::InfoBoardStatus
InfoBoardStatus
Definition: InfoBoardWidget.h:43