ORE Studio 0.0.4
Loading...
Searching...
No Matches
OreImportController.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2026 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_QT_ORE_IMPORT_CONTROLLER_HPP
21#define ORES_QT_ORE_IMPORT_CONTROLLER_HPP
22
23#include <optional>
24#include <string>
25#include <QObject>
26#include <QWidget>
27#include <boost/uuid/uuid.hpp>
28#include "ores.logging/make_logger.hpp"
29#include "ores.qt/ClientManager.hpp"
30
31namespace ores::qt {
32
42class OreImportController final : public QObject {
43 Q_OBJECT
44
45private:
46 inline static std::string_view logger_name = "ores.qt.ore_import_controller";
47
48 [[nodiscard]] static auto& lg() {
49 using namespace ores::logging;
50 static auto instance = make_logger(logger_name);
51 return instance;
52 }
53
54public:
55 explicit OreImportController(ClientManager* clientManager,
56 QObject* parent = nullptr);
57 ~OreImportController() override = default;
58
67 void trigger(QWidget* parent = nullptr,
68 std::optional<boost::uuids::uuid> portfolioId = std::nullopt,
69 const std::string& portfolioName = "");
70
71signals:
78
82 void statusMessage(const QString& message);
83
84private:
85 ClientManager* clientManager_;
86};
87
88}
89
90#endif
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Controller that owns and launches the OreImportWizard.
Definition OreImportController.hpp:42
void statusMessage(const QString &message)
Emitted with a human-readable summary after import.
void importCompleted()
Emitted when an import completes successfully.
void trigger(QWidget *parent=nullptr, std::optional< boost::uuids::uuid > portfolioId=std::nullopt, const std::string &portfolioName="")
Show the ORE import wizard modal dialog.
Definition OreImportController.cpp:36