AuboCaps  0.5.0
arcs::aubo_scope::KeyboardNumberInput< T > Class Template Reference

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

#include <keyboard_number_input.h>

Public Member Functions

 KeyboardNumberInput (KeyboardNumberInput &f)
 
 KeyboardNumberInput (KeyboardNumberInput &&f)
 
virtual ~KeyboardNumberInput ()
 
void setErrorValidator (const std::shared_ptr< InputValidator< T >> &validator)
 
void setInitialValue (T initialValue)
 Sets the initial value which will be displayed when the virtual numeric keypad is shown. More...
 
void show (QWidget *component, const std::function< void(bool, T)> &callback)
 This method requests the virtual numeric keypad to be shown. More...
 

Private Member Functions

 KeyboardNumberInput ()
 

Private Attributes

void * d_ { nullptr }
 

Friends

class DataSwitch
 

Detailed Description

template<typename T>
class arcs::aubo_scope::KeyboardNumberInput< T >

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

Template Parameters
<T>The (generic) type parameter for the interface representing the type of input data entered by the end user via the virtual keypad. Relevant types are e.g. Integer and Double.

Definition at line 25 of file keyboard_number_input.h.

Constructor & Destructor Documentation

template<typename T >
virtual arcs::aubo_scope::KeyboardNumberInput< T >::~KeyboardNumberInput ( )
virtual
template<typename T >
arcs::aubo_scope::KeyboardNumberInput< T >::KeyboardNumberInput ( )
private

Member Function Documentation

template<typename T >
void arcs::aubo_scope::KeyboardNumberInput< T >::setErrorValidator ( const std::shared_ptr< InputValidator< T >> &  validator)

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

Specifying an input validator is recommended, but optional.

In case InputValidator#isValid(Object) returns false, the accept button on the virtual keypad will be disabled and the error message from InputValidator#getMessage(Object) will be shown.

Parameters
validatorthe validator to be used to validate keypad user input.
Returns
this KeyboardNumberInput object.
Exceptions
NullPointerExceptionin case the validator is null.
template<typename T >
void arcs::aubo_scope::KeyboardNumberInput< T >::setInitialValue ( initialValue)

Sets the initial value which will be displayed when the virtual numeric keypad is shown.

Parameters
initialValuethe initial value for the virtual keypad.
Returns
this KeyboardNumberInput object.
template<typename T >
void arcs::aubo_scope::KeyboardNumberInput< T >::show ( QWidget *  component,
const std::function< void(bool, T)> &  callback 
)

This method requests the virtual numeric keypad to be shown.

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

Friends And Related Function Documentation

template<typename T >
friend class DataSwitch
friend

Definition at line 77 of file keyboard_number_input.h.

Member Data Documentation

template<typename T >
void* arcs::aubo_scope::KeyboardNumberInput< T >::d_ { nullptr }
private

Definition at line 79 of file keyboard_number_input.h.


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