ManaPlus
Public Member Functions | Protected Attributes
CharRenameListener Class Reference

#include <charrenamelistener.h>

Inheritance diagram for CharRenameListener:
ActionListener

Public Member Functions

 CharRenameListener ()
 
void action (const ActionEvent &event)
 
void setId (const BeingId id)
 
void setDialog (EditDialog *const dialog)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Protected Attributes

EditDialogmDialog
 
BeingId mId
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Definition at line 33 of file charrenamelistener.h.

Constructor & Destructor Documentation

◆ CharRenameListener()

CharRenameListener::CharRenameListener ( )

Definition at line 32 of file charrenamelistener.cpp.

32  :
34  mDialog(nullptr),
36 {
37 }
const BeingId BeingId_zero
Definition: beingid.h:30

Member Function Documentation

◆ action()

void CharRenameListener::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 39 of file charrenamelistener.cpp.

40 {
41  if (event.getId() != "OK")
42  return;
43  if (mDialog != nullptr)
44  {
45  if (charServerHandler != nullptr)
47  mDialog = nullptr;
48  }
49 }
Net::CharServerHandler * charServerHandler
Definition: net.cpp:85
std::string getMsg() const
Definition: editdialog.h:65
virtual void renameCharacter(const BeingId id, const std::string &newName) const =0

References charServerHandler, ActionEvent::getId(), EditDialog::getMsg(), mDialog, mId, and Net::CharServerHandler::renameCharacter().

◆ setDialog()

void CharRenameListener::setDialog ( EditDialog *const  dialog)
inline

Definition at line 45 of file charrenamelistener.h.

46  { mDialog = dialog; }

References mDialog.

Referenced by CharSelectDialog::action().

◆ setId()

void CharRenameListener::setId ( const BeingId  id)
inline

Definition at line 42 of file charrenamelistener.h.

43  { mId = id; }

References mId.

Referenced by CharSelectDialog::action().

Field Documentation

◆ mDialog

EditDialog* CharRenameListener::mDialog
protected

Definition at line 49 of file charrenamelistener.h.

Referenced by action(), and setDialog().

◆ mId

BeingId CharRenameListener::mId
protected

Definition at line 50 of file charrenamelistener.h.

Referenced by action(), and setId().


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