ManaPlus
Public Member Functions | Private Attributes
WrongDataNoticeListener Class Reference

#include <wrongdatanoticelistener.h>

Inheritance diagram for WrongDataNoticeListener:
ActionListener

Public Member Functions

 WrongDataNoticeListener ()
 
void setTarget (TextField *const textField)
 
void action (const ActionEvent &event)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Private Attributes

TextFieldmTarget
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Listener used while dealing with wrong data. It is used to direct the focus to the field which contained wrong data when the Ok button was pressed on the error notice.

Definition at line 36 of file wrongdatanoticelistener.h.

Constructor & Destructor Documentation

◆ WrongDataNoticeListener()

WrongDataNoticeListener::WrongDataNoticeListener ( )

Definition at line 30 of file wrongdatanoticelistener.cpp.

30  :
32  mTarget(nullptr)
33 {
34 }

Member Function Documentation

◆ action()

void WrongDataNoticeListener::action ( const ActionEvent actionEvent)
virtual

Called when an action is recieved from a widget. It is used to be able to recieve a notification that an action has occured.

Parameters
actionEventThe event of the action.

Implements ActionListener.

Definition at line 41 of file wrongdatanoticelistener.cpp.

42 {
43  if (event.getId() == "ok" && (mTarget != nullptr))
45 }
virtual void requestFocus()
Definition: widget.cpp:204

References ActionEvent::getId(), mTarget, and Widget::requestFocus().

◆ setTarget()

void WrongDataNoticeListener::setTarget ( TextField *const  textField)

Definition at line 36 of file wrongdatanoticelistener.cpp.

37 {
38  mTarget = textField;
39 }

References mTarget.

Referenced by ChangeEmailDialog::action(), ChangePasswordDialog::action(), and RegisterDialog::action().

Field Documentation

◆ mTarget

TextField* WrongDataNoticeListener::mTarget
private

Definition at line 47 of file wrongdatanoticelistener.h.

Referenced by action(), and setTarget().


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