Vuo  1.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Static Public Member Functions | List of all members
VuoInputEditor Class Referenceabstract

Description

This class implements the input editor widget displayed by the Vuo Editor when editing an input port value of a certain type.

See Also
Developing an Input Editor

Signals

void valueChanged (json_object *newValue)
 An input editor can emit this signal to inform the Vuo Editor that the value has been edited.
 
void tabbedPastLastWidget ()
 If supportsTabbingBetweenPorts() returns true, an input editor should emit this signal when the Tab key is pressed while the last widget in the input editor's tab order has focus.
 
void tabbedBackwardPastFirstWidget ()
 If supportsTabbingBetweenPorts() returns true, an input editor should emit this signal when the Shift-Tab key combination is pressed while the first widget in the input editor's tab order has focus.
 

Public Member Functions

virtual json_objectshow (QPoint portLeftCenter, json_object *originalValue, json_object *details, map< QString, json_object * > portNamesAndValues)=0
 Displays the input editor and waits until the user has finished or canceled editing.
 
virtual bool supportsTabbingBetweenPorts (void)
 Returns true if this input editor should be part of the Vuo Editor's tab order when using Tab / Shift-Tab to navigate between input ports.
 

Static Public Member Functions

static QFont getDefaultFont (void)
 Returns the font that input editors are recommended to use.
 
static QString getDefaultFontCss (void)
 Returns a CSS representation of the font that input editors are recommended to use.
 

Member Function Documentation

QFont VuoInputEditor::getDefaultFont ( void  )
static

Returns the font that input editors are recommended to use.

QString VuoInputEditor::getDefaultFontCss ( void  )
static

Returns a CSS representation of the font that input editors are recommended to use.

virtual json_object* VuoInputEditor::show ( QPoint  portLeftCenter,
json_object originalValue,
json_object details,
map< QString, json_object * >  portNamesAndValues 
)
pure virtual

Displays the input editor and waits until the user has finished or canceled editing.

Parameters
portLeftCenterThe left center point (in global coordinates) of the port whose value is to be edited. Used to position the input editor.
originalValueThe value to display initially in the input editor.
detailsAdditional details about the port (e.g., suggested minimum and maximum values). A port in a node class implementation can optionally provide these details. To assist node class developers, the input editor's class description should document the JSON keys recognized by the input editor.
portNamesAndValuesNot yet implemented. The name and value of each input port that is on the same node as the port being edited by this input editor (including that port) and that has a constant value (no incoming data cable). Together with details, this information can be used to limit the input editor's range based on other input ports' values.
See Also
Built-in Types for information about types and their serialization to JSON.

Implemented in VuoInputEditorColor, VuoInputEditorFont, VuoInputEditorWithMenu, and VuoInputEditorWithDialog.

bool VuoInputEditor::supportsTabbingBetweenPorts ( void  )
virtual

Returns true if this input editor should be part of the Vuo Editor's tab order when using Tab / Shift-Tab to navigate between input ports.

If true, this input editor should emit tabbedPastLastWidget() and tabbedBackwardPastFirstWidget() signals when appropriate. If false, those signals are ignored.

Unless overridden, this function always returns false.

Reimplemented in VuoInputEditorText, VuoInputEditorWithLineEditList, and VuoInputEditorWithLineEdit.

void VuoInputEditor::tabbedBackwardPastFirstWidget ( )
signal

If supportsTabbingBetweenPorts() returns true, an input editor should emit this signal when the Shift-Tab key combination is pressed while the first widget in the input editor's tab order has focus.

This tells the Vuo Editor to navigate to the previous port in the Vuo Editor's tab order.

void VuoInputEditor::tabbedPastLastWidget ( )
signal

If supportsTabbingBetweenPorts() returns true, an input editor should emit this signal when the Tab key is pressed while the last widget in the input editor's tab order has focus.

This tells the Vuo Editor to navigate to the next port in the Vuo Editor's tab order.

void VuoInputEditor::valueChanged ( json_object newValue)
signal

An input editor can emit this signal to inform the Vuo Editor that the value has been edited.

If the Vuo Editor receives this signal while a composition is running, it updates the running composition immediately to use the updated value (while the input editor is still showing).

Parameters
newValueThe updated value.

The documentation for this class was generated from the following files: