ManaPlus
Public Member Functions | Protected Attributes
InputActionRemoteListener Class Reference

#include <inputactionremotelistener.h>

Inheritance diagram for InputActionRemoteListener:
ActionListener

Public Member Functions

 InputActionRemoteListener ()
 
void action (const ActionEvent &event)
 
void setCommand (const std::string &command, const std::string &args)
 
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()
 

Protected Attributes

std::string mCommand
 
std::string mArgs
 

Additional Inherited Members

- Protected Member Functions inherited from ActionListener
 ActionListener ()
 

Detailed Description

Definition at line 29 of file inputactionremotelistener.h.

Constructor & Destructor Documentation

◆ InputActionRemoteListener()

InputActionRemoteListener::InputActionRemoteListener ( )

Definition at line 30 of file inputactionremotelistener.cpp.

30  :
32  mCommand(),
33  mArgs()
34 {
35 }

Member Function Documentation

◆ action()

void InputActionRemoteListener::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 inputactionremotelistener.cpp.

38 {
39  if (event.getId() != "yes")
40  {
41  mCommand.clear();
42  mArgs.clear();
43  return;
44  }
45 
47  mArgs,
48  nullptr);
49  mCommand.clear();
50  mArgs.clear();
51 }
bool executeRemoteChatCommand(const std::string &cmd, const std::string &args, ChatTab *const tab)
InputManager inputManager

References InputManager::executeRemoteChatCommand(), ActionEvent::getId(), inputManager, mArgs, and mCommand.

◆ setCommand()

void InputActionRemoteListener::setCommand ( const std::string &  command,
const std::string &  args 
)
inline

Definition at line 38 of file inputactionremotelistener.h.

40  {
41  mCommand = command;
42  mArgs = args;
43  }

References mArgs, and mCommand.

Referenced by ItemLinkHandler::handleCommandLink().

Field Documentation

◆ mArgs

std::string InputActionRemoteListener::mArgs
protected

Definition at line 47 of file inputactionremotelistener.h.

Referenced by action(), and setCommand().

◆ mCommand

std::string InputActionRemoteListener::mCommand
protected

Definition at line 46 of file inputactionremotelistener.h.

Referenced by action(), and setCommand().


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