Vuo  1.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
VuoInputEditorWithLineEditList Class Referenceabstract

Description

A base class for input editors that display a series of line edits (text fields).

Public Member Functions

 VuoInputEditorWithLineEditList (bool allowAddingAndRemovingRows=false, int lineEditWidth=100)
 Creates an input editor whose show function displays a series of line edits.
 
virtual bool supportsTabbingBetweenPorts (void)
 Returns true.
 
- Public Member Functions inherited from VuoInputEditorWithDialog
json_objectshow (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)
 Adds the line edits and associated widgets to the dialog, and populates the line edits with the dialog's initial value.
 
virtual QLayout * setUpRow (QDialog &dialog, QLineEdit *lineEdit)
 Creates and returns a layout containing lineEdit and any associated widgets.
 
virtual void tearDownRow (QLayout *rowLayout)
 Performs any cleanup necessary before the line edit and associated widgets are removed from the dialog and deallocated.
 
QLayout * getRowAtIndex (int index)
 Returns the line edit and associated widgets in the row that is currently at the given index.
 
void addWidgetToDialog (QWidget *widget)
 Adds the widget at the bottom of the dialog.
 
void removeWidgetFromDialog (QWidget *widget)
 Removes the widget from the dialog.
 
json_objectgetAcceptedValue (void)
 Returns the current value in the line edits.
 
QList< QString > getLineEditTexts (void)
 Returns the current text in the line edits.
 
virtual QList< QString > convertToLineEditListFormat (json_object *value)=0
 Returns the text that should appear in each of the line edits to represent value.
 
virtual json_objectconvertFromLineEditListFormat (const QList< QString > &lineEditTexts)=0
 Returns the value represented when the given text appears in the line edits.
 
- Protected Member Functions inherited from VuoInputEditorWithDialog
 VuoInputEditorWithDialog (void)
 Creates an input editor whose show() function displays a frameless dialog.
 
QDialog * getDialog (void)
 Returns a pointer to the dialog displayed by show().
 
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.
 
bool eventFilter (QObject *object, QEvent *event)
 Handles tabbing past the last widget or reverse-tabbing past the first widget in the tab order.
 

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.
 
- Static Public Member Functions inherited from VuoInputEditor
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.
 

Constructor & Destructor Documentation

VuoInputEditorWithLineEditList::VuoInputEditorWithLineEditList ( bool  allowAddingAndRemovingRows = false,
int  lineEditWidth = 100 
)

Creates an input editor whose show function displays a series of line edits.

Member Function Documentation

void VuoInputEditorWithLineEditList::addWidgetToDialog ( QWidget *  widget)
protected

Adds the widget at the bottom of the dialog.

virtual json_object* VuoInputEditorWithLineEditList::convertFromLineEditListFormat ( const QList< QString > &  lineEditTexts)
protectedpure virtual

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

virtual QList<QString> VuoInputEditorWithLineEditList::convertToLineEditListFormat ( json_object value)
protectedpure virtual

Returns the text that should appear in each of the line edits to represent value.

json_object * VuoInputEditorWithLineEditList::getAcceptedValue ( void  )
protectedvirtual

Returns the current value in the line edits.

Implements VuoInputEditorWithDialog.

QList< QString > VuoInputEditorWithLineEditList::getLineEditTexts ( void  )
protected

Returns the current text in the line edits.

QLayout * VuoInputEditorWithLineEditList::getRowAtIndex ( int  index)
protected

Returns the line edit and associated widgets in the row that is currently at the given index.

Parameters
indexThe row index, numbered from 0.
Returns
The layout that was returned by setUpRow() when the row was added.
void VuoInputEditorWithLineEditList::removeWidgetFromDialog ( QWidget *  widget)
protected

Removes the widget from the dialog.

Parameters
widgetA widget previously passed to addWidgetToDialog().
void VuoInputEditorWithLineEditList::setUpDialog ( QDialog &  dialog,
json_object originalValue,
json_object details 
)
protectedvirtual

Adds the line edits and associated widgets to the dialog, and populates the line edits with the dialog's initial value.

Implements VuoInputEditorWithDialog.

QLayout * VuoInputEditorWithLineEditList::setUpRow ( QDialog &  dialog,
QLineEdit *  lineEdit 
)
protectedvirtual

Creates and returns a layout containing lineEdit and any associated widgets.

The default implementation of this function optionally adds a remove button to the row. Override this function to customize the widgets associated with each line edit.

bool VuoInputEditorWithLineEditList::supportsTabbingBetweenPorts ( void  )
virtual

Returns true.

Reimplemented from VuoInputEditor.

void VuoInputEditorWithLineEditList::tearDownRow ( QLayout *  rowLayout)
protectedvirtual

Performs any cleanup necessary before the line edit and associated widgets are removed from the dialog and deallocated.

The default implementation of this function does nothing.

Parameters
rowLayoutThe layout that was returned by setUpRow() when the row was added.

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