Vuo  2.0.1
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).

Definition at line 17 of file VuoInputEditorWithLineEditList.hh.

Public Member Functions

 VuoInputEditorWithLineEditList (bool allowAddingAndRemovingRows=false, int lineEditWidth=100)
 Creates an input editor whose show function displays a series of line edits. More...
 
virtual bool supportsTabbingBetweenPorts (void)
 Returns true. More...
 
- 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. More...
 

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

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. More...
 
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. More...
 
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. More...
 
- Static Public Member Functions inherited from VuoInputEditor
static QFont getDefaultFont (void)
 Returns the font that input editors are recommended to use. More...
 
static QString getDefaultFontCss (void)
 Returns a CSS representation of the font that input editors are recommended to use. More...
 
- Protected Attributes inherited from VuoInputEditorWithDialog
bool isDark
 Is Vuo Editor in Dark Interface Mode? More...
 

Constructor & Destructor Documentation

◆ VuoInputEditorWithLineEditList()

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

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

Definition at line 50 of file VuoInputEditorWithLineEditList.cc.

Member Function Documentation

◆ addWidgetToDialog()

void VuoInputEditorWithLineEditList::addWidgetToDialog ( QWidget *  widget)
protected

Adds the widget at the bottom of the dialog.

Definition at line 243 of file VuoInputEditorWithLineEditList.cc.

◆ convertFromLineEditListFormat()

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

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

◆ convertToLineEditListFormat()

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.

◆ getAcceptedValue()

json_object * VuoInputEditorWithLineEditList::getAcceptedValue ( void  )
protectedvirtual

Returns the current value in the line edits.

Implements VuoInputEditorWithDialog.

Definition at line 267 of file VuoInputEditorWithLineEditList.cc.

◆ getLineEditTexts()

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

Returns the current text in the line edits.

Definition at line 275 of file VuoInputEditorWithLineEditList.cc.

◆ getRowAtIndex()

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.

Definition at line 232 of file VuoInputEditorWithLineEditList.cc.

◆ removeWidgetFromDialog()

void VuoInputEditorWithLineEditList::removeWidgetFromDialog ( QWidget *  widget)
protected

Removes the widget from the dialog.

Parameters
widgetA widget previously passed to addWidgetToDialog().

Definition at line 257 of file VuoInputEditorWithLineEditList.cc.

◆ setUpDialog()

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.

Definition at line 62 of file VuoInputEditorWithLineEditList.cc.

◆ setUpRow()

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.

Definition at line 189 of file VuoInputEditorWithLineEditList.cc.

◆ supportsTabbingBetweenPorts()

bool VuoInputEditorWithLineEditList::supportsTabbingBetweenPorts ( void  )
virtual

Returns true.

Reimplemented from VuoInputEditor.

Definition at line 310 of file VuoInputEditorWithLineEditList.cc.

◆ tearDownRow()

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.

Definition at line 222 of file VuoInputEditorWithLineEditList.cc.


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