20#ifndef ORES_QT_CHANGE_REASON_CATEGORY_MDI_WINDOW_HPP
21#define ORES_QT_CHANGE_REASON_CATEGORY_MDI_WINDOW_HPP
26#include <QSortFilterProxyModel>
27#include "ores.qt/EntityListMdiWindow.hpp"
28#include "ores.qt/ClientManager.hpp"
29#include "ores.qt/ClientChangeReasonCategoryModel.hpp"
30#include "ores.logging/make_logger.hpp"
31#include "ores.dq/domain/change_reason_category.hpp"
45 inline static std::string_view logger_name =
46 "ores.qt.change_reason_category_mdi_window";
48 [[nodiscard]]
static auto& lg() {
50 static auto instance = make_logger(logger_name);
57 const QString& username,
58 QWidget* parent =
nullptr);
61 QSize sizeHint()
const override;
64 void reload()
override;
67 void statusChanged(
const QString& message);
68 void errorOccurred(
const QString& error_message);
70 void addNewRequested();
71 void categoryDeleted(
const QString& code);
72 void showCategoryHistory(
const QString& code);
77 void deleteSelected();
78 void viewHistorySelected();
82 void onLoadError(
const QString& error_message,
const QString& details = {});
83 void onSelectionChanged();
84 void onDoubleClicked(
const QModelIndex& index);
87 void showHeaderContextMenu(
const QPoint& pos);
93 void setupColumnVisibility();
94 void setupConnections();
95 void updateActionStates();
97 void restoreSettings();
103 QTableView* tableView_;
105 QSortFilterProxyModel* proxyModel_;
108 QAction* reloadAction_;
110 QAction* editAction_;
111 QAction* deleteAction_;
112 QAction* historyAction_;
116 return tr(
"Refresh change reason categories");
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Groups change reasons into logical categories.
Definition change_reason_category.hpp:45
MDI window for displaying and managing change reason categories.
Definition ChangeReasonCategoryMdiWindow.hpp:41
QString normalRefreshTooltip() const override
Get the normal (non-stale) tooltip text for the refresh action.
Definition ChangeReasonCategoryMdiWindow.hpp:115
Model for displaying change reason categories fetched from the server.
Definition ClientChangeReasonCategoryModel.hpp:40
Manages the lifecycle of the network client and IO context.
Definition ClientManager.hpp:90
Base class for entity list MDI windows providing stale indicator support.
Definition EntityListMdiWindow.hpp:56