Vuo  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VuoInputEditorWithDialog Class Referenceabstract

Description

A base class for input editors that display a frameless dialog.

Definition at line 18 of file VuoInputEditorWithDialog.hh.

Public Member Functions

json_objectshow (QPoint portLeftCenter, json_object *originalValue, json_object *details, map< QString, json_object * > portNamesAndValues)
 Displays a frameless dialog. More...
 
- Public Member Functions inherited from VuoInputEditor
virtual bool supportsTabbingBetweenPorts (void)
 Returns true if this input editor should be part of the Vuo Editor's tab order when using Tab / Shift-Tab to navigate between input ports. More...
 

Protected Member Functions

 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...
 
virtual void setUpDialog (QDialog &dialog, json_object *originalValue, json_object *details)=0
 Adds widgets to the dialog and configures them to display the dialog's initial value. More...
 
virtual json_objectgetAcceptedValue (void)=0
 Returns the value currently set in the dialog's widgets. More...
 

Protected Attributes

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

◆ VuoInputEditorWithDialog()

VuoInputEditorWithDialog::VuoInputEditorWithDialog ( void  )
protected

Creates an input editor whose show() function displays a frameless dialog.

Definition at line 16 of file VuoInputEditorWithDialog.cc.

Member Function Documentation

◆ eventFilter()

bool VuoInputEditorWithDialog::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Handles tabbing past the last widget or reverse-tabbing past the first widget in the tab order.

Definition at line 122 of file VuoInputEditorWithDialog.cc.

◆ getAcceptedValue()

virtual json_object* VuoInputEditorWithDialog::getAcceptedValue ( void  )
protectedpure virtual

◆ getDialog()

QDialog * VuoInputEditorWithDialog::getDialog ( void  )
protected

Returns a pointer to the dialog displayed by show().

This pointer is only valid during a call to show().

Definition at line 82 of file VuoInputEditorWithDialog.cc.

◆ setFirstWidgetInTabOrder()

void VuoInputEditorWithDialog::setFirstWidgetInTabOrder ( QWidget *  widget)
protected

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

This function sets up the input editor to emit tabbedBackwardPastFirstWidget() signals.

Definition at line 92 of file VuoInputEditorWithDialog.cc.

◆ setLastWidgetInTabOrder()

void VuoInputEditorWithDialog::setLastWidgetInTabOrder ( QWidget *  widget)
protected

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

This function sets up the input editor to emit tabbedPastLastWidget() signals.

Definition at line 108 of file VuoInputEditorWithDialog.cc.

◆ setUpDialog()

virtual void VuoInputEditorWithDialog::setUpDialog ( QDialog &  dialog,
json_object originalValue,
json_object details 
)
protectedpure virtual

Adds widgets to the dialog and configures them to display the dialog's initial value.

Parameters
dialogThe dialog, which is initially empty. It has a style sheet that makes the dialog and any widgets added to it default to a standard style, which depends on the Vuo Editor's "Dark Interface" setting. If changing fonts of widgest, you may need to use QWidget::setStyleSheet() instead of QWidget::setFont(), since the latter may have no effect (https://doc.qt.io/qt-5/qwidget.html#font-prop).
originalValueThe value to display initially in the dialog.
detailsAdditional details (e.g., suggested min. and max. values) pertaining to the port data.

Implemented in VuoInputEditorWithLineEdit, VuoPublishedPortNameEditor, VuoInputEditorRange, VuoInputEditorReal, VuoInputEditorInteger, VuoInputEditorPoint2d, VuoInputEditorPoint3d, VuoInputEditorPoint4d, VuoInputEditorTransform, VuoInputEditorTransform2d, VuoInputEditorMovieFormat, VuoInputEditorAnchor, VuoInputEditorEdgeBlend, VuoInputEditorIntegerRange, VuoInputEditorKey, VuoInputEditorTextComparison, VuoTextEditor, and VuoInputEditorWithLineEditList.

◆ show()

json_object * VuoInputEditorWithDialog::show ( QPoint  portLeftCenter,
json_object originalValue,
json_object details,
map< QString, json_object * >  portNamesAndValues 
)
virtual

Displays a frameless dialog.

Implements VuoInputEditor.

Definition at line 27 of file VuoInputEditorWithDialog.cc.

Member Data Documentation

◆ isDark

bool VuoInputEditorWithDialog::isDark
protected

Is Vuo Editor in Dark Interface Mode?

Definition at line 47 of file VuoInputEditorWithDialog.hh.


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