Loading...
Searching...
No Matches
StatePresenter.hpp
1#pragma once
2#include <Scenario/Document/State/StateView.hpp>
3
4#include <score/command/Dispatchers/CommandDispatcher.hpp>
5#include <score/graphics/GraphicsItem.hpp>
6#include <score/model/Identifier.hpp>
7
8#include <nano_observer.hpp>
9#include <score_plugin_scenario_export.h>
10
11#include <verdigris>
12
13namespace Process
14{
15class ProcessModel;
16}
17namespace Scenario
18{
19class StateModel;
20class SCORE_PLUGIN_SCENARIO_EXPORT StatePresenter final
21 : public QObject
22 , public Nano::Observer
23{
24 W_OBJECT(StatePresenter)
25
26public:
28 const StateModel& model, const score::DocumentContext& ctx,
29 QGraphicsItem* parentview, QObject* parent);
30
31 virtual ~StatePresenter();
32
33 const Id<StateModel>& id() const;
34
35 StateView* view() const;
36
37 const StateModel& model() const;
38
39 void select() const;
40 bool isSelected() const;
41
42 void handleDrop(const QMimeData& mime);
43 void on_processAdded(const Process::ProcessModel&);
44 void on_processRemoved(const Process::ProcessModel&);
45
46public:
47 void pressed(const QPointF& arg_1)
48 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, pressed, arg_1)
49 void moved(const QPointF& arg_1) E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, moved, arg_1)
50 void released(const QPointF& arg_1)
51 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, released, arg_1)
52
53 void hoverEnter() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, hoverEnter)
54 void hoverLeave() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, hoverLeave)
55
56private:
57 void updateStateView();
58
59 const StateModel& m_model;
61
62 const score::DocumentContext& m_ctx;
63};
64}
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Definition StateModel.hpp:63
Definition StatePresenter.hpp:23
Definition StateView.hpp:29
The id_base_t class.
Definition Identifier.hpp:57
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition GraphicsItem.hpp:47
Definition DocumentContext.hpp:18