Vuo
1.2.1
|
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. | |
![]() | |
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) |
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_object * | getAcceptedValue (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_object * | convertFromLineEditListFormat (const QList< QString > &lineEditTexts)=0 |
Returns the value represented when the given text appears in the line edits. | |
![]() | |
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 | |
![]() | |
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 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. | |
VuoInputEditorWithLineEditList::VuoInputEditorWithLineEditList | ( | bool | allowAddingAndRemovingRows = false , |
int | lineEditWidth = 100 |
||
) |
Creates an input editor whose show
function displays a series of line edits.
|
protected |
Adds the widget at the bottom of the dialog.
|
protectedpure virtual |
Returns the value represented when the given text appears in the line edits.
|
protectedpure virtual |
Returns the text that should appear in each of the line edits to represent value.
|
protectedvirtual |
Returns the current value in the line edits.
Implements VuoInputEditorWithDialog.
|
protected |
Returns the current text in the line edits.
|
protected |
Returns the line edit and associated widgets in the row that is currently at the given index.
index | The row index, numbered from 0. |
|
protected |
Removes the widget from the dialog.
widget | A widget previously passed to addWidgetToDialog(). |
|
protectedvirtual |
Adds the line edits and associated widgets to the dialog, and populates the line edits with the dialog's initial value.
Implements VuoInputEditorWithDialog.
|
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.
|
virtual |
Returns true.
Reimplemented from VuoInputEditor.
|
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.
rowLayout | The layout that was returned by setUpRow() when the row was added. |