20#ifndef ORES_QT_CLIENT_TREATMENT_DIMENSION_MODEL_HPP
21#define ORES_QT_CLIENT_TREATMENT_DIMENSION_MODEL_HPP
24#include <QFutureWatcher>
25#include <QAbstractTableModel>
26#include "ores.qt/ClientManager.hpp"
27#include "ores.qt/RecencyPulseManager.hpp"
28#include "ores.qt/RecencyTracker.hpp"
29#include "ores.logging/make_logger.hpp"
30#include "ores.dq/domain/treatment_dimension.hpp"
34class ClientTreatmentDimensionModel final :
public QAbstractTableModel {
38 inline static std::string_view logger_name =
39 "ores.qt.client_treatment_dimension_model";
41 [[nodiscard]]
static auto& lg() {
43 static auto instance = make_logger(logger_name);
58 explicit ClientTreatmentDimensionModel(ClientManager* clientManager,
59 QObject* parent =
nullptr);
60 ~ClientTreatmentDimensionModel()
override =
default;
62 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
63 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
64 QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
65 QVariant headerData(
int section, Qt::Orientation orientation,
66 int role = Qt::DisplayRole)
const override;
73 void loadError(
const QString& error_message,
const QString& details = {});
76 void onDimensionsLoaded();
77 void onPulseStateChanged(
bool isOn);
78 void onPulsingComplete();
81 QVariant recency_foreground_color(
const std::string& code)
const;
85 std::vector<dq::domain::treatment_dimension> dimensions;
86 QString error_message;
87 QString error_details;
90 ClientManager* clientManager_;
91 std::vector<dq::domain::treatment_dimension> dimensions_;
92 QFutureWatcher<FetchResult>* watcher_;
93 bool is_fetching_{
false};
96 RecencyTracker<dq::domain::treatment_dimension, TreatmentDimensionKeyExtractor> recencyTracker_;
97 RecencyPulseManager* pulseManager_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Classifies datasets by their processing treatment level.
Definition treatment_dimension.hpp:40