Editor API
UnigineEditor public API
UnigineEditor::Selection Class Reference

Selection class. This class is used to manage current selection (nodes, materials, properties, runtimes...) in the Editor. More...

Inherits QObject.

Signals

void changed ()
 This signal is emitted when the current selection has changed. More...
 

Static Public Member Functions

static Selectioninstance ()
 Returns the instance of the Selection class. This method is used to subscribe to the changed signal. More...
 
static void clear ()
 Clears the current selection. If current selection was not empty the changed signal is emitted. More...
 
static const SelectorgetSelector ()
 Returns the current selection. More...
 
static void setSelector (Selector *selector)
 Sets the specified selection as the current one. If current selection has changed the changed signal is emitted. More...
 
static SelectorcopySelector ()
 Copies the current selection. Current selection obtained via the getSelector() method is not managed by the user, so it can change at any time. You can use this method to store a copy of the current selection in order to perform undo/redo operations. More...
 
static const SelectorNodesgetSelectorNodes ()
 Tries to filter out nodes from the current selection as a nodes selector (SelectorType). The result shall combine only selected nodes (if any). More...
 
static const SelectorGUIDsgetSelectorRuntimes ()
 Tries to filter out runtimes from the current selection as a runtimes selector (SelectorType). The result shall combine only selected runtimes (if any). More...
 
static const SelectorGUIDsgetSelectorMaterials ()
 Tries to filter out materials from the current selection as a materials selector (SelectorType). The result shall combine only selected materials (if any). More...
 
static const SelectorGUIDsgetSelectorProperties ()
 Tries to filter out properties from the current selection as a properties selector (SelectorType). The result shall combine only selected properties (if any). More...
 
static SelectorNodescopySelectorNodes ()
 Copies all currently selected nodes to a separate list. More...
 
static SelectorGUIDscopySelectorRuntimes ()
 Copies all runtimes for all currently selected nodes to a separate list. More...
 
static SelectorGUIDscopySelectorMaterials ()
 Copies all currently selected materials to a separate list. More...
 
static SelectorGUIDscopySelectorProperties ()
 Copies all currently selected properties to a separate list. More...
 

Detailed Description

Selection class. This class is used to manage current selection (nodes, materials, properties, runtimes...) in the Editor.

Member Function Documentation

◆ changed

void UnigineEditor::Selection::changed ( )
signal

This signal is emitted when the current selection has changed.

◆ clear()

static void UnigineEditor::Selection::clear ( )
static

Clears the current selection. If current selection was not empty the changed signal is emitted.

◆ copySelector()

static Selector* UnigineEditor::Selection::copySelector ( )
static

Copies the current selection. Current selection obtained via the getSelector() method is not managed by the user, so it can change at any time. You can use this method to store a copy of the current selection in order to perform undo/redo operations.

◆ copySelectorMaterials()

static SelectorGUIDs* UnigineEditor::Selection::copySelectorMaterials ( )
static

Copies all currently selected materials to a separate list.

Returns
Pointer to the Selector containing copies of currently selected materials.

◆ copySelectorNodes()

static SelectorNodes* UnigineEditor::Selection::copySelectorNodes ( )
static

Copies all currently selected nodes to a separate list.

Returns
Pointer to the Selector containing copies of currently selected nodes.

◆ copySelectorProperties()

static SelectorGUIDs* UnigineEditor::Selection::copySelectorProperties ( )
static

Copies all currently selected properties to a separate list.

Returns
Pointer to the Selector containing copies of currently selected properties.

◆ copySelectorRuntimes()

static SelectorGUIDs* UnigineEditor::Selection::copySelectorRuntimes ( )
static

Copies all runtimes for all currently selected nodes to a separate list.

Returns
Pointer to the Selector containing copies of all runtimes for all currently selected nodes.

◆ getSelector()

static const Selector* UnigineEditor::Selection::getSelector ( )
static

Returns the current selection.

◆ getSelectorMaterials()

static const SelectorGUIDs* UnigineEditor::Selection::getSelectorMaterials ( )
static

Tries to filter out materials from the current selection as a materials selector (SelectorType). The result shall combine only selected materials (if any).

Returns
Selector of the materials type for currently selected materials, or nullptr if there are no materials currently selected.

◆ getSelectorNodes()

static const SelectorNodes* UnigineEditor::Selection::getSelectorNodes ( )
static

Tries to filter out nodes from the current selection as a nodes selector (SelectorType). The result shall combine only selected nodes (if any).

Returns
Selector of the nodes type for currently selected nodes, or nullptr if there are no nodes currently selected.

◆ getSelectorProperties()

static const SelectorGUIDs* UnigineEditor::Selection::getSelectorProperties ( )
static

Tries to filter out properties from the current selection as a properties selector (SelectorType). The result shall combine only selected properties (if any).

Returns
Selector of the properties type for currently selected properties, or nullptr if there are no properties currently selected.

◆ getSelectorRuntimes()

static const SelectorGUIDs* UnigineEditor::Selection::getSelectorRuntimes ( )
static

Tries to filter out runtimes from the current selection as a runtimes selector (SelectorType). The result shall combine only selected runtimes (if any).

Returns
Selector of the runtimes type for currently selected runtimes, or nullptr if there are no runtimes currently selected.

◆ instance()

static Selection* UnigineEditor::Selection::instance ( )
static

Returns the instance of the Selection class. This method is used to subscribe to the changed signal.

Returns
Selection class instance.

Example:

, this, &ParametersWindow::selection_changed);

◆ setSelector()

static void UnigineEditor::Selection::setSelector ( Selector selector)
static

Sets the specified selection as the current one. If current selection has changed the changed signal is emitted.