Vuo  0.5.7
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VuoInputEditorWithLineEdit Class Reference

Description

A base class for input editors that display a line edit (text field).

Public Member Functions

 VuoInputEditorWithLineEdit (void)
 Creates an input editor whose show function displays a line edit.
 
void setWidth (int width)
 Sets the width of the line edit.
 
bool emitsTabCycleCompletionSignals (void)
 Returns a boolean indicating whether this input editor emits tabCycleCompleted() and reverseTabCycleCompleted() signals when appropriate.
 
- Public Member Functions inherited from VuoInputEditorWithDialog
json_object * show (QPoint portLeftCenter, json_object *originalValue, QString portName, vector< pair< QString, json_object * > > portNamesAndValues, json_object *details)
 Displays a frameless dialog.
 

Protected Member Functions

virtual void setUpDialog (QDialog &dialog, json_object *originalValue, json_object *details=0, bool editingSolePortConstantForNode=false)
 Adds a line edit widget to the dialog.
 
void setUpLineEdit (QLineEdit *existingLineEdit, json_object *originalValue)
 Configures the provided line edit to display the dialog's initial value.
 
void setFirstTabCycleElement (QWidget *element)
 Sets the provided element as the first tab cycle element within this input editor.
 
void setFinalTabCycleElement (QWidget *element)
 Sets the provided element as the final tab cycle element within this input editor.
 
json_object * getAcceptedValue (void)
 Returns the current text in the line edit.
 
virtual QString convertToLineEditFormat (json_object *value)
 Returns the text that should appear in the line edit to represent value.
 
virtual json_object * convertFromLineEditFormat (const QString &valueAsString)
 Returns the value represented when the given text appears in the line edit.
 
bool eventFilter (QObject *object, QEvent *event)
 Filters events on watched objects.
 

Protected Attributes

QLineEdit * lineEdit
 The text field widget.
 
QWidget * firstTabCycleElement
 The first widget in this input editor's tab cycle.
 
QWidget * finalTabCycleElement
 The final widget in this input editor's tab cycle.
 
bool editingSolePortConstantForNode
 A boolean indicating whether this input editor is currently being used to edit a node's only port constant.
 

Additional Inherited Members

- Signals inherited from VuoInputEditor
void valueChanged (json_object *newValue)
 An input editor can emit this signal to inform the Vuo Editor that the value has been edited.
 
void tabCycleCompleted ()
 An input editor can emit this signal to inform the Vuo Editor that a 'Tab' keypress was received while the final widget in this input editor's tab cycle already had focus.
 
void reverseTabCycleCompleted ()
 An input editor can emit this signal to inform the Vuo Editor that a 'Shift'+'Tab' keypress was received while the first widget in this input editor's tab cycle already had focus.
 

Constructor & Destructor Documentation

VuoInputEditorWithLineEdit::VuoInputEditorWithLineEdit ( void  )

Creates an input editor whose show function displays a line edit.

Member Function Documentation

json_object * VuoInputEditorWithLineEdit::convertFromLineEditFormat ( const QString &  valueAsString)
protectedvirtual

Returns the value represented when the given text appears in the line edit.

Reimplemented in VuoInputEditorReal, and VuoInputEditorText.

QString VuoInputEditorWithLineEdit::convertToLineEditFormat ( json_object *  value)
protectedvirtual

Returns the text that should appear in the line edit to represent value.

Reimplemented in VuoInputEditorPoint3d, VuoInputEditorPoint2d, VuoInputEditorPoint4d, VuoInputEditorReal, and VuoInputEditorText.

bool VuoInputEditorWithLineEdit::emitsTabCycleCompletionSignals ( void  )
virtual

Returns a boolean indicating whether this input editor emits tabCycleCompleted() and reverseTabCycleCompleted() signals when appropriate.

Reimplemented from VuoInputEditor.

bool VuoInputEditorWithLineEdit::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Filters events on watched objects.

json_object * VuoInputEditorWithLineEdit::getAcceptedValue ( void  )
protectedvirtual

Returns the current text in the line edit.

Implements VuoInputEditorWithDialog.

void VuoInputEditorWithLineEdit::setFinalTabCycleElement ( QWidget *  element)
protected

Sets the provided element as the final tab cycle element within this input editor.

This method should be called only after any calls to setUpLineEdit(...) and/or setUpDialog(...) to override the default behavior of considering the member lineEdit to be the final tab cycle element.

void VuoInputEditorWithLineEdit::setFirstTabCycleElement ( QWidget *  element)
protected

Sets the provided element as the first tab cycle element within this input editor.

This method should be called only after any calls to setUpLineEdit(...) and/or setUpDialog(...) to override the default behavior of considering the member lineEdit to be the first tab cycle element.

void VuoInputEditorWithLineEdit::setUpDialog ( QDialog &  dialog,
json_object *  originalValue,
json_object *  details = 0,
bool  editingSolePortConstantForNode = false 
)
protectedvirtual
void VuoInputEditorWithLineEdit::setUpLineEdit ( QLineEdit *  existingLineEdit,
json_object *  originalValue 
)
protected

Configures the provided line edit to display the dialog's initial value.

Parameters
existingLineEditThe pre-initialized QLineEdit widget to configure for the dialog.
originalValueThe value to display initially in the dialog.
void VuoInputEditorWithLineEdit::setWidth ( int  width)

Sets the width of the line edit.

Member Data Documentation

bool VuoInputEditorWithLineEdit::editingSolePortConstantForNode
protected

A boolean indicating whether this input editor is currently being used to edit a node's only port constant.

QWidget* VuoInputEditorWithLineEdit::finalTabCycleElement
protected

The final widget in this input editor's tab cycle.

QWidget* VuoInputEditorWithLineEdit::firstTabCycleElement
protected

The first widget in this input editor's tab cycle.

QLineEdit* VuoInputEditorWithLineEdit::lineEdit
protected

The text field widget.


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