Debian Codegraph @

src/plugins/schedulers/tj/PlanTJPlugin.h

raw
1 /* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2009 Dag Andersen <[email protected]>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7 #ifndef PLANTJPLUGIN_H
8 #define PLANTJPLUGIN_H
9
10 #include "plantj_export.h"
11
12 #include "kptschedulerplugin.h"
13
14 #include <QVariantList>
15
16
17 namespace KPlato
18 {
19 class Project;
20 class ScheduleManager;
21 class Schedule;
22 }
23
24 using namespace KPlato;
25
26 class PLANTJ_EXPORT PlanTJPlugin : public SchedulerPlugin
27 {
28 Q_OBJECT
29
30 public:
31 PlanTJPlugin(QObject * parent, const QVariantList &);
32 ~PlanTJPlugin() override;
33
34 QString description() const override;
35 int capabilities() const override;
36
37 /// Calculate the project
38 void calculate(Project &project, ScheduleManager *sm, bool nothread = false) override;
39
40 /// Return the scheduling granularity in milliseconds
41 ulong currentGranularity() const;
42
43 void schedule(SchedulingContext &context) override;
44
45 Q_SIGNALS:
46 void sigCalculationStarted(KPlato::Project*, KPlato::ScheduleManager*);
47 void sigCalculationFinished(KPlato::Project*, KPlato::ScheduleManager*);
48
49 public Q_SLOTS:
50 void stopAllCalculations();
51 void stopCalculation(KPlato::SchedulerThread *sch) override;
52
53 protected Q_SLOTS:
54 void slotStarted(KPlato::SchedulerThread *job);
55 void slotFinished(KPlato::SchedulerThread *job);
56 };
57
58
59 #endif // PLANTJPLUGIN_H