20#ifndef ORES_QT_BADGE_DEFINITION_MDI_WINDOW_HPP
21#define ORES_QT_BADGE_DEFINITION_MDI_WINDOW_HPP
25#include <QSortFilterProxyModel>
26#include "ores.qt/EntityListMdiWindow.hpp"
27#include "ores.qt/ClientManager.hpp"
28#include "ores.qt/ClientBadgeDefinitionModel.hpp"
29#include "ores.qt/PaginationWidget.hpp"
30#include "ores.logging/make_logger.hpp"
31#include "ores.dq/domain/badge_definition.hpp"
45 inline static std::string_view logger_name =
46 "ores.qt.badge_definition_mdi_window";
48 [[nodiscard]]
static auto& lg() {
50 static auto instance = make_logger(logger_name);
57 const QString& username,
58 QWidget* parent =
nullptr);
62 void statusChanged(
const QString& message);
63 void errorOccurred(
const QString& error_message);
65 void addNewRequested();
66 void definitionDeleted(
const QString& code);
72 void deleteSelected();
73 void viewHistorySelected();
77 void onLoadError(
const QString& error_message,
const QString& details = {});
78 void onSelectionChanged();
79 void onDoubleClicked(
const QModelIndex& index);
85 return tr(
"Refresh badge definitions");
92 void setupConnections();
93 void updateActionStates();
99 QTableView* tableView_;
101 QSortFilterProxyModel* proxyModel_;
105 QAction* reloadAction_;
107 QAction* editAction_;
108 QAction* deleteAction_;
109 QAction* historyAction_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Visual definition for a badge, including colours, label, and severity.
Definition badge_definition.hpp:41
MDI window for displaying and managing badge definitions.
Definition BadgeDefinitionMdiWindow.hpp:41
void doReload() override
Subclass implementation of the reload operation.
Definition BadgeDefinitionMdiWindow.cpp:179
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition BadgeDefinitionMdiWindow.hpp:84
Model for displaying badge definitions fetched from the server.
Definition ClientBadgeDefinitionModel.hpp:40
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:62
Widget providing pagination controls for data tables.
Definition PaginationWidget.hpp:39