ManaPlus
Public Member Functions
ChangePincodeListener Class Reference

#include <changepincodelistener.h>

Inheritance diagram for ChangePincodeListener:
ActionListener

Public Member Functions

 ChangePincodeListener ()
 
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 changepincodelistener.h.

Constructor & Destructor Documentation

◆ ChangePincodeListener()

ChangePincodeListener::ChangePincodeListener ( )
inline

Definition at line 32 of file changepincodelistener.h.

32  :
34  { }

Member Function Documentation

◆ action()

void ChangePincodeListener::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 changepincodelistener.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 changePincode(const std::string &pincode)
Client * client
Definition: client.cpp:118
@ SWITCH_LOGIN
Definition: state.h:63
PincodeManager pincodeManager

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


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