AuboCaps  0.4.1
arcs::aubo_scope::KeyboardExpressionInput Class Reference

Interface representing the virtual keyboard used for configuring it and requesting it to be displayed in PolyScope. More...

#include <keyboard_expression_input.h>

Public Member Functions

 KeyboardExpressionInput (KeyboardExpressionInput &f)
 
 KeyboardExpressionInput (KeyboardExpressionInput &&f)
 
virtual ~KeyboardExpressionInput ()
 
void setErrorValidator (const std::shared_ptr< InputValidator< ExpressionPtr >> &validator)
 
void setInitialValue (const ExpressionPtr &initialExpression)
 Sets the text which will be displayed when the virtual keyboard is shown. More...
 
void show (QWidget *component, const std::function< void(bool, const ExpressionPtr &)> &callback)
 This method requests the virtual keyboard to be shown. More...
 

Private Member Functions

 KeyboardExpressionInput ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Detailed Description

Interface representing the virtual keyboard used for configuring it and requesting it to be displayed in PolyScope.

Definition at line 23 of file keyboard_expression_input.h.

Constructor & Destructor Documentation

arcs::aubo_scope::KeyboardExpressionInput::KeyboardExpressionInput ( KeyboardExpressionInput f)
arcs::aubo_scope::KeyboardExpressionInput::KeyboardExpressionInput ( KeyboardExpressionInput &&  f)
virtual arcs::aubo_scope::KeyboardExpressionInput::~KeyboardExpressionInput ( )
virtual
arcs::aubo_scope::KeyboardExpressionInput::KeyboardExpressionInput ( )
private

Member Function Documentation

void arcs::aubo_scope::KeyboardExpressionInput::setErrorValidator ( const std::shared_ptr< InputValidator< ExpressionPtr >> &  validator)

Sets an input validator for the virtual keyboard. This validator will be used to validate the input entered by the user. Some standard validators are available in domain.userinteraction.inputvalidation.InputValidationFactory.

Specifying an input validator is recommended, but optional.

In case InputValidator#isValid(Object) (in this case parameter is String) returns false, the accept button on the virtual keyboard will be disabled and the error message from InputValidator#getMessage(Object) (parameter is String) will be shown.

Parameters
validatorthe validator to be used to validate keyboard user input.
Returns
this KeyboardTextInput object.
Exceptions
NullPointerExceptionin case the validator is null.
void arcs::aubo_scope::KeyboardExpressionInput::setInitialValue ( const ExpressionPtr &  initialExpression)

Sets the text which will be displayed when the virtual keyboard is shown.

Parameters
initialExpressionthe initial text for the virtual keyboard.
Returns
this KeyboardTextInput object.
void arcs::aubo_scope::KeyboardExpressionInput::show ( QWidget *  component,
const std::function< void(bool, const ExpressionPtr &)> &  callback 
)

This method requests the virtual keyboard to be shown.

Parameters
componentthe JTextField that will be used to define the screen position of the virtual keyboard. The component must be visible on the screen at the time of showing the keypad.
callbackthe callback to be used when the user exits the keyboard by accepting or canceling the input.
Exceptions
NullPointerExceptionin case any parameter is null.

Friends And Related Function Documentation

friend class DataSwitch
friend

Definition at line 78 of file keyboard_expression_input.h.

Member Data Documentation

void* arcs::aubo_scope::KeyboardExpressionInput::d_ { nullptr }
private

Definition at line 80 of file keyboard_expression_input.h.


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