20#ifndef ORES_QT_CLIENT_METHODOLOGY_MODEL_HPP
21#define ORES_QT_CLIENT_METHODOLOGY_MODEL_HPP
24#include <QFutureWatcher>
25#include <QAbstractTableModel>
26#include <boost/uuid/uuid.hpp>
27#include <boost/uuid/uuid_io.hpp>
28#include "ores.qt/ClientManager.hpp"
29#include "ores.qt/RecencyPulseManager.hpp"
30#include "ores.qt/RecencyTracker.hpp"
31#include "ores.logging/make_logger.hpp"
32#include "ores.dq/domain/methodology.hpp"
36class ClientMethodologyModel final :
public QAbstractTableModel {
40 inline static std::string_view logger_name =
41 "ores.qt.client_methodology_model";
43 [[nodiscard]]
static auto& lg() {
45 static auto instance = make_logger(logger_name);
60 explicit ClientMethodologyModel(ClientManager* clientManager,
61 QObject* parent =
nullptr);
62 ~ClientMethodologyModel()
override =
default;
64 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
65 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
66 QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
67 QVariant headerData(
int section, Qt::Orientation orientation,
68 int role = Qt::DisplayRole)
const override;
75 void loadError(
const QString& error_message,
const QString& details = {});
78 void onMethodologiesLoaded();
79 void onPulseStateChanged(
bool isOn);
80 void onPulsingComplete();
83 QVariant recency_foreground_color(
const boost::uuids::uuid&
id)
const;
87 std::vector<dq::domain::methodology> methodologies;
88 QString error_message;
89 QString error_details;
92 ClientManager* clientManager_;
93 std::vector<dq::domain::methodology> methodologies_;
94 QFutureWatcher<FetchResult>* watcher_;
95 bool is_fetching_{
false};
98 RecencyTracker<dq::domain::methodology, MethodologyKeyExtractor> recencyTracker_;
99 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
Describes a methodology for data processing or transformation.
Definition methodology.hpp:33