MessageTreeView.hpp
1 #pragma once
2 #include <score/command/Dispatchers/CommandDispatcher.hpp>
3 
4 #include <QTreeView>
5 
6 class QAction;
7 class QContextMenuEvent;
8 class QResizeEvent;
9 class QWidget;
10 namespace Scenario
11 {
12 class MessageItemModel;
13 class StateModel;
14 class MessageTreeView final : public QTreeView
15 {
16 public:
17  MessageTreeView(const StateModel& model, QWidget* parent);
18 
19  MessageItemModel& model() const;
20 
21  void removeNodes();
22 
23 protected:
24  void resizeEvent(QResizeEvent* ev) override;
25 
26 private:
27  // void mouseDoubleClickEvent(QMouseEvent* ev) override;
28  void contextMenuEvent(QContextMenuEvent*) override;
29 
30  QAction* m_removeNodesAction{};
31  const StateModel& m_model;
32 
33  CommandDispatcher<> m_dispatcher;
34  float m_valueColumnSize{0.15f};
35 };
36 }
The CommandDispatcher class.
Definition: CommandDispatcher.hpp:13
The MessageItemModel class.
Definition: MessageItemModel.hpp:38
Definition: MessageTreeView.hpp:15
Definition: StateModel.hpp:63
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14