20#ifndef ORES_QT_SUBJECT_AREA_MDI_WINDOW_HPP
21#define ORES_QT_SUBJECT_AREA_MDI_WINDOW_HPP
25#include <QSortFilterProxyModel>
26#include "ores.qt/EntityListMdiWindow.hpp"
27#include "ores.qt/ClientManager.hpp"
28#include "ores.qt/ClientSubjectAreaModel.hpp"
29#include "ores.logging/make_logger.hpp"
30#include "ores.dq/domain/subject_area.hpp"
34class SubjectAreaMdiWindow final :
public EntityListMdiWindow {
38 inline static std::string_view logger_name =
39 "ores.qt.subject_area_mdi_window";
41 [[nodiscard]]
static auto& lg() {
43 static auto instance = make_logger(logger_name);
48 explicit SubjectAreaMdiWindow(ClientManager* clientManager,
49 const QString& username,
50 QWidget* parent =
nullptr);
51 ~SubjectAreaMdiWindow()
override =
default;
53 QSize sizeHint()
const override {
return QSize(1000, 600); }
56 void reload()
override;
59 void statusChanged(
const QString& message);
60 void errorOccurred(
const QString& error_message);
62 void showSubjectAreaHistory(
const QString& name,
const QString& domain_name);
63 void addNewRequested();
67 void onLoadError(
const QString& error_message,
const QString& details = {});
68 void onRowDoubleClicked(
const QModelIndex& index);
71 void onDeleteClicked();
72 void onRefreshClicked();
73 void onSelectionChanged();
74 void onHistoryClicked();
77 QString normalRefreshTooltip()
const override {
78 return tr(
"Refresh subject areas");
84 void setupConnections();
85 void updateActionStates();
86 void saveColumnVisibility();
87 void loadColumnVisibility();
89 ClientManager* clientManager_;
91 ClientSubjectAreaModel* model_;
92 QSortFilterProxyModel* proxyModel_;
93 QTableView* tableView_;
98 QAction* deleteAction_;
99 QAction* refreshAction_;
100 QAction* historyAction_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Represents a subdivision within a data domain.
Definition subject_area.hpp:38