InfoBoardWidget.h
#ifndef __VERIFYNOTIFICATION_H__
#define __VERIFYNOTIFICATION_H__
#include "PlainTextEditorPage.h"
#include "core/function/result_analyse/GpgVerifyResultAnalyse.h"
#include "ui/dialog/details/VerifyDetailsDialog.h"
class Ui_InfoBoard;
namespace GpgFrontend::UI {
typedef enum {
INFO_ERROR_OK = 0,
INFO_ERROR_WARN = 1,
INFO_ERROR_CRITICAL = 2,
INFO_ERROR_NEUTRAL = 3,
} InfoBoardStatus;
class InfoBoardWidget : public QWidget {
Q_OBJECT
public:
explicit InfoBoardWidget(QWidget* parent);
void AssociateTextEdit(QTextEdit* edit);
void AssociateTabWidget(QTabWidget* tab);
void AddOptionalAction(const QString& name,
const std::function<void()>& action);
void ResetOptionActionsMenu();
void SetInfoBoard(const QString& text,
GpgFrontend::UI::InfoBoardStatus verify_label_status);
public slots:
void SlotReset();
void SlotRefresh(const QString& text,
GpgFrontend::UI::InfoBoardStatus status);
private slots:
void slot_copy();
void slot_save();
private:
std::shared_ptr<Ui_InfoBoard> ui_;
QTextEdit* m_text_page_{
nullptr};
QTabWidget* m_tab_widget_{nullptr};
void delete_widgets_in_layout(QLayout* layout, int start_index = 0);
};
} // namespace GpgFrontend::UI
#endif // __VERIFYNOTIFICATION_H__
GpgFrontend::UI
Definition: FileReadTask.cpp:31
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::AddOptionalAction
void AddOptionalAction(const QString &name, const std::function< void()> &action)
Definition: InfoBoardWidget.cpp:113
GpgFrontend::UI::InfoBoardWidget::ResetOptionActionsMenu
void ResetOptionActionsMenu()
Definition: InfoBoardWidget.cpp:129
GpgFrontend::UI::SettingsObject::Check
nlohmann::json & Check(const std::string &key, const nlohmann::json &default_value)
Definition: SettingsObject.cpp:31
GpgFrontend::UI::InfoBoardWidget::SlotRefresh
void SlotRefresh(const QString &text, GpgFrontend::UI::InfoBoardStatus status)
Definition: InfoBoardWidget.cpp:89
GpgFrontend::UI::SettingsObject
The SettingsObject class This class is used to store settings for the application securely.
Definition: SettingsObject.h:43
GpgFrontend::UI::InfoBoardStatus
InfoBoardStatus
Definition: InfoBoardWidget.h:43
GpgFrontend::UI::InfoBoardWidget::AssociateTextEdit
void AssociateTextEdit(QTextEdit *edit)
Definition: InfoBoardWidget.cpp:95
GpgFrontend::UI::InfoBoardWidget::delete_widgets_in_layout
void delete_widgets_in_layout(QLayout *layout, int start_index=0)
Definition: InfoBoardWidget.cpp:143
GpgFrontend::UI::InfoBoardWidget::AssociateTabWidget
void AssociateTabWidget(QTabWidget *tab)
Definition: InfoBoardWidget.cpp:103
GpgFrontend::UI::SignalStation::SignalRefreshInfoBoard
void SignalRefreshInfoBoard(const QString &text, InfoBoardStatus verify_label_status)
GpgFrontend::UI::SignalStation::GetInstance
static SignalStation * GetInstance()
Get the Instance object.
Definition: SignalStation.cpp:37
GpgFrontend::UI::InfoBoardWidget::m_text_page_
QTextEdit * m_text_page_
TextEdit associated to the notification.
Definition: InfoBoardWidget.h:133
GpgFrontend::UI::InfoBoardWidget
Class for handling the verify label shown at bottom of a textedit-page.
Definition: InfoBoardWidget.h:53