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

Definition at line 17 of file VuoInputEditorWithLineEdit.hh.

Public Member Functions

 VuoInputEditorWithLineEdit (void)
 Creates an input editor whose show function displays a line edit. More...
 
virtual bool supportsTabbingBetweenPorts (void)
 Returns true. More...
 
void setWidth (int width)
 Sets the width of the line edit. 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=0)
 Adds a line edit widget to the dialog. More...
 
void setUpLineEdit (QLineEdit *existingLineEdit, json_object *originalValue)
 Configures the provided line edit to display the dialog's initial value. More...
 
json_objectgetAcceptedValue (void)
 Returns the current text in the line edit. More...
 
virtual QString convertToLineEditFormat (json_object *value)
 Returns the text that should appear in the line edit to represent value. More...
 
virtual json_objectconvertFromLineEditFormat (const QString &valueAsString)
 Returns the value represented when the given text appears in the line edit. 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...
 

Protected Attributes

QLineEdit * lineEdit
 The text field widget. More...
 
- Protected Attributes inherited from VuoInputEditorWithDialog
bool isDark
 Is Vuo Editor in Dark Interface Mode? 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...
 

Constructor & Destructor Documentation

◆ VuoInputEditorWithLineEdit()

VuoInputEditorWithLineEdit::VuoInputEditorWithLineEdit ( void  )

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

Definition at line 15 of file VuoInputEditorWithLineEdit.cc.

Member Function Documentation

◆ convertFromLineEditFormat()

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

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

Reimplemented in VuoTitleEditor.

Definition at line 74 of file VuoInputEditorWithLineEdit.cc.

◆ convertToLineEditFormat()

QString VuoInputEditorWithLineEdit::convertToLineEditFormat ( json_object value)
protectedvirtual

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

Reimplemented in VuoInputEditorMovieFormat, and VuoTitleEditor.

Definition at line 66 of file VuoInputEditorWithLineEdit.cc.

◆ getAcceptedValue()

json_object * VuoInputEditorWithLineEdit::getAcceptedValue ( void  )
protectedvirtual

Returns the current text in the line edit.

Implements VuoInputEditorWithDialog.

Definition at line 58 of file VuoInputEditorWithLineEdit.cc.

◆ setUpDialog()

void VuoInputEditorWithLineEdit::setUpDialog ( QDialog &  dialog,
json_object originalValue,
json_object details = 0 
)
protectedvirtual

Adds a line edit widget to the dialog.

Sets this line edit as the first and last widget in this input editor's tab order.

Implements VuoInputEditorWithDialog.

Reimplemented in VuoPublishedPortNameEditor, and VuoInputEditorMovieFormat.

Definition at line 27 of file VuoInputEditorWithLineEdit.cc.

◆ setUpLineEdit()

void VuoInputEditorWithLineEdit::setUpLineEdit ( QLineEdit *  existingLineEdit,
json_object originalValue 
)
protected

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

Sets the line edit as the first and last widget in this input editor's tab order.

Parameters
existingLineEditThe already-initialized QLineEdit widget to configure for the dialog.
originalValueThe value to display initially in the dialog.

Definition at line 40 of file VuoInputEditorWithLineEdit.cc.

◆ setWidth()

void VuoInputEditorWithLineEdit::setWidth ( int  width)

Sets the width of the line edit.

Definition at line 82 of file VuoInputEditorWithLineEdit.cc.

◆ supportsTabbingBetweenPorts()

bool VuoInputEditorWithLineEdit::supportsTabbingBetweenPorts ( void  )
virtual

Returns true.

Reimplemented from VuoInputEditor.

Definition at line 90 of file VuoInputEditorWithLineEdit.cc.

Member Data Documentation

◆ lineEdit

QLineEdit* VuoInputEditorWithLineEdit::lineEdit
protected

The text field widget.

Definition at line 31 of file VuoInputEditorWithLineEdit.hh.


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