Vuo  0.9.1
 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 supportsTabbingBetweenPorts (void)
 Returns a boolean indicating whether this input editor emits tabbedPastLastWidget() and tabbedBackwardPastFirstWidget() signals when appropriate.
 
- Public Member Functions inherited from VuoInputEditorWithDialog
json_object * show (QPoint portLeftCenter, json_object *originalValue, json_object *details, map< QString, json_object * > portNamesAndValues)
 Displays a frameless dialog.
 

Protected Member Functions

virtual void setUpDialog (QDialog &dialog, json_object *originalValue, json_object *details=0)
 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 setFirstWidgetInTabOrder (QWidget *widget)
 Makes the given widget the first in this input editor's tab order.
 
void setLastWidgetInTabOrder (QWidget *widget)
 Makes the given widget the last in this input editor's tab order.
 
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 Member Functions inherited from VuoInputEditorWithDialog
QDialog * getDialog (void)
 Returns a pointer to the dialog displayed by show().
 
- Protected Member Functions inherited from VuoInputEditor
QFont getDefaultFont (void)
 Returns the font that input editors are recommended to use.
 

Protected Attributes

QLineEdit * lineEdit
 The text field widget.
 

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 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.
 

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::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::setFirstWidgetInTabOrder ( QWidget *  widget)
protected

Makes the given widget the first in this input editor's tab order.

By default, the first widget is the line edit passed to setUpLineEdit(). Any call to setUpLineEdit() or setUpDialog() reverts the first widget to the default.

void VuoInputEditorWithLineEdit::setLastWidgetInTabOrder ( QWidget *  widget)
protected

Makes the given widget the last in this input editor's tab order.

By default, the last widget is the line edit passed to setUpLineEdit(). Any call to setUpLineEdit() or setUpDialog() reverts the last widget to the default.

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

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

Parameters
existingLineEditThe already-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.

bool VuoInputEditorWithLineEdit::supportsTabbingBetweenPorts ( void  )
virtual

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

Reimplemented from VuoInputEditor.

Member Data Documentation

QLineEdit* VuoInputEditorWithLineEdit::lineEdit
protected

The text field widget.


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