Editor API
UnigineEditor public API
Selection.h
1 // Copyright (C), UNIGINE. All rights reserved.
2 #pragma once
3 
4 
5 #include <editor/EditorGlobal.h>
6 
7 #include <QObject>
8 
9 
11 // Forward decl.
13 namespace Editor
14 {
15 class Presenter;
16 class Selector;
17 class SelectorNodes;
18 class SelectorGUIDs;
19 }
20 
21 
22 namespace Editor
23 {
25 // Selection.
27 class EDITOR_API Selection: public QObject
28 {
29  Q_OBJECT
30 public:
39  static Selection *instance();
40 
42  static void clear();
44  static Selector *getSelector();
46  static void setSelector(Selector *selector);
48  static Selector *copySelector();
49 
52  static SelectorNodes *getSelectorNodes();
55  static SelectorGUIDs *getSelectorRuntimes();
58  static SelectorGUIDs *getSelectorMaterials();
61  static SelectorGUIDs *getSelectorProperties();
62 
65  static SelectorNodes *copySelectorNodes();
68  static SelectorGUIDs *copySelectorRuntimes();
71  static SelectorGUIDs *copySelectorMaterials();
74  static SelectorGUIDs *copySelectorProperties();
75 
76 signals:
78  void changed();
79 
80 private:
81  explicit Selection(QObject *parent);
82  ~Selection() override;
83 
84  friend class Editor::Presenter;
85 };
86 
87 
88 } // namespace Editor
Definition: Actions.h:11
Definition: Selector.h:49
Selector for GUIDs-based items (materials, properties, runtimes). An item of this type is associated ...
Definition: Selector.h:70
Definition: Selection.h:27
This class is used to manage selected nodes along with their subobjects (such as surfaces,...
Definition: Selector.h:126