ManaPlus
Public Member Functions | Protected Attributes
ShopRenameListener Class Reference

#include <shoprenamelistener.h>

Inheritance diagram for ShopRenameListener:
ActionListener

Public Member Functions

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

Protected Attributes

EditDialogmDialog
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Definition at line 31 of file shoprenamelistener.h.

Constructor & Destructor Documentation

◆ ShopRenameListener()

ShopRenameListener::ShopRenameListener ( )

Definition at line 31 of file shoprenamelistener.cpp.

31  :
33  mDialog(nullptr)
34 {
35 }

Member Function Documentation

◆ action()

void ShopRenameListener::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 37 of file shoprenamelistener.cpp.

38 {
39  if (event.getId() != "OK")
40  return;
41  if (mDialog != nullptr)
42  {
44  mDialog = nullptr;
45  }
46 }
std::string getMsg() const
Definition: editdialog.h:65
void setShopName(const std::string &name)
ShopWindow * shopWindow
Definition: shopwindow.cpp:101

References ActionEvent::getId(), EditDialog::getMsg(), mDialog, ShopWindow::setShopName(), and shopWindow.

◆ setDialog()

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

Definition at line 40 of file shoprenamelistener.h.

41  { mDialog = dialog; }

References mDialog.

Referenced by ShopWindow::action().

Field Documentation

◆ mDialog

EditDialog* ShopRenameListener::mDialog
protected

Definition at line 44 of file shoprenamelistener.h.

Referenced by action(), and setDialog().


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