AuboCaps  0.4.1
arcs::aubo_scope::KeyboardTextInput Class Reference

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

#include <keyboard_text_input.h>

Public Member Functions

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

Private Member Functions

 KeyboardTextInput ()
 

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 21 of file keyboard_text_input.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void arcs::aubo_scope::KeyboardTextInput::setErrorValidator ( const std::shared_ptr< InputValidator< std::string >> &  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.
virtual void arcs::aubo_scope::KeyboardTextInput::setInitialValue ( const std::string &  initialText)
virtual

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

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

This method requests the virtual standard 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 76 of file keyboard_text_input.h.

Member Data Documentation

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

Definition at line 78 of file keyboard_text_input.h.


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