ORE Studio 0.0.4
Loading...
Searching...
No Matches
SchedulerPlugin.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 details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
16 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19#ifndef ORES_QT_SCHEDULER_PLUGIN_HPP
20#define ORES_QT_SCHEDULER_PLUGIN_HPP
21
22#include <memory>
23#include <QList>
24#include "ores.qt/PluginBase.hpp"
25
26namespace ores::qt {
27
28class JobDefinitionController;
29class JobInstanceController;
30class SchedulerMonitorController;
31
41 Q_OBJECT
42 Q_PLUGIN_METADATA(IID "ores.qt.IPlugin/1.0")
43 Q_INTERFACES(ores::qt::IPlugin)
44
45public:
46 explicit SchedulerPlugin(QObject* parent = nullptr);
47 ~SchedulerPlugin() override;
48
49 QString name() const override { return QStringLiteral("ores.qt.scheduler"); }
50 int load_order() const override { return 360; }
51
52 void on_login(const plugin_context& ctx) override;
53 QList<QMenu*> create_menus() override;
54 void on_logout() override;
55
56private:
57 plugin_context ctx_;
58
59 std::unique_ptr<JobDefinitionController> jobDefinitionController_;
60 std::unique_ptr<JobInstanceController> jobInstanceController_;
61 std::unique_ptr<SchedulerMonitorController> schedulerMonitorController_;
62};
63
64}
65
66#endif
Qt-based graphical user interface for ORE Studio.
Definition AccountController.hpp:32
Abstract interface that every domain plugin must implement.
Definition IPlugin.hpp:70
Context passed to each plugin at login time.
Definition plugin_context.hpp:47
Concrete base class for all domain plugins.
Definition PluginBase.hpp:46
Qt plugin providing the top-level &Scheduler menu.
Definition SchedulerPlugin.hpp:40
void on_logout() override
Destroy controllers and unsubscribe from server events.
Definition SchedulerPlugin.cpp:104
QList< QMenu * > create_menus() override
Build and return standalone domain menus for this plugin.
Definition SchedulerPlugin.cpp:76
QString name() const override
Returns a short, unique plugin name (e.g. "ores.qt.legacy").
Definition SchedulerPlugin.hpp:49
int load_order() const override
Load order hint — lower values are initialised first (default 100).
Definition SchedulerPlugin.hpp:50
void on_login(const plugin_context &ctx) override
Create controllers and subscribe to server events.
Definition SchedulerPlugin.cpp:55