ManaPlus
Public Member Functions
NewPincodeListener Class Reference

#include <newpincodelistener.h>

Inheritance diagram for NewPincodeListener:
ActionListener

Public Member Functions

 NewPincodeListener ()
 
void action (const ActionEvent &event)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Definition at line 29 of file newpincodelistener.h.

Constructor & Destructor Documentation

◆ NewPincodeListener()

NewPincodeListener::NewPincodeListener ( )
inline

Definition at line 32 of file newpincodelistener.h.

32  :
34  { }

Member Function Documentation

◆ action()

void NewPincodeListener::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 33 of file newpincodelistener.cpp.

34 {
35  if (event.getId() == "ok")
36  {
37  const PincodeDialog *const dialog = dynamic_cast<PincodeDialog*>(
38  event.getSource());
39  if (dialog != nullptr)
40  {
41  const std::string &pincode = dialog->getMsg();
43  }
44  }
45  else
46  {
48  }
49 }
void setState(const StateT state)
Definition: client.h:66
const std::string & getMsg() const
void setNewPincode(const std::string &pincode)
Client * client
Definition: client.cpp:118
@ SWITCH_LOGIN
Definition: state.h:63
PincodeManager pincodeManager

References client, ActionEvent::getId(), PincodeDialog::getMsg(), pincodeManager, PincodeManager::setNewPincode(), Client::setState(), and State::SWITCH_LOGIN.


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