OpenASIP  2.0
Public Member Functions | List of all members
ProximSimulatorSettingsCmd Class Reference

#include <ProximSimulatorSettingsCmd.hh>

Inheritance diagram for ProximSimulatorSettingsCmd:
Inheritance graph
Collaboration diagram for ProximSimulatorSettingsCmd:
Collaboration graph

Public Member Functions

 ProximSimulatorSettingsCmd ()
 
virtual ~ProximSimulatorSettingsCmd ()
 
virtual bool Do ()
 
virtual bool isEnabled ()
 
virtual int id () const
 
virtual std::string icon () const
 
ProximSimulatorSettingsCmdcreate () const
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Detailed Description

Command for opening the simulator settings dialog in Proxim.

Definition at line 41 of file ProximSimulatorSettingsCmd.hh.

Constructor & Destructor Documentation

◆ ProximSimulatorSettingsCmd()

ProximSimulatorSettingsCmd::ProximSimulatorSettingsCmd ( )

The Constructor.

Definition at line 43 of file ProximSimulatorSettingsCmd.cc.

Referenced by create().

◆ ~ProximSimulatorSettingsCmd()

ProximSimulatorSettingsCmd::~ProximSimulatorSettingsCmd ( )
virtual

The Destructor.

Definition at line 51 of file ProximSimulatorSettingsCmd.cc.

51  {
52 }

Member Function Documentation

◆ create()

ProximSimulatorSettingsCmd * ProximSimulatorSettingsCmd::create ( ) const
virtual

Creates and returns a new isntance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 95 of file ProximSimulatorSettingsCmd.cc.

95  {
96  return new ProximSimulatorSettingsCmd();
97 }

References ProximSimulatorSettingsCmd().

Here is the call graph for this function:

◆ Do()

bool ProximSimulatorSettingsCmd::Do ( )
virtual

Executes the command.

@retutn True, if the command was succesfully executed.

Implements GUICommand.

Definition at line 60 of file ProximSimulatorSettingsCmd.cc.

60  {
61  wxWindow* parent = parentWindow();
62  assert(parent != NULL);
65  SimulatorSettingsDialog dialog(parentWindow(), -1, *frontend, lineReader);
66  dialog.ShowModal();
67  return true;
68 }

References assert, ProximToolbox::frontend(), ProximToolbox::lineReader(), and GUICommand::parentWindow().

Here is the call graph for this function:

◆ icon()

std::string ProximSimulatorSettingsCmd::icon ( ) const
virtual

Returns path to the icon file for this command.

Implements GUICommand.

Definition at line 84 of file ProximSimulatorSettingsCmd.cc.

84  {
85  return "configure.png";
86 }

◆ id()

int ProximSimulatorSettingsCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 75 of file ProximSimulatorSettingsCmd.cc.

References ProximConstants::COMMAND_SIMULATOR_SETTINGS.

◆ isEnabled()

bool ProximSimulatorSettingsCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
Always true.

Implements GUICommand.

Definition at line 106 of file ProximSimulatorSettingsCmd.cc.

106  {
107  return true;
108 }

The documentation for this class was generated from the following files:
ProximToolbox::frontend
static TracedSimulatorFrontend * frontend()
Definition: ProximToolbox.cc:223
ProximSimulatorSettingsCmd::ProximSimulatorSettingsCmd
ProximSimulatorSettingsCmd()
Definition: ProximSimulatorSettingsCmd.cc:43
assert
#define assert(condition)
Definition: Application.hh:86
SimulatorSettingsDialog
Definition: SimulatorSettingsDialog.hh:44
ProximLineReader
Definition: ProximLineReader.hh:60
ProximConstants::COMMAND_NAME_SIMULATOR_SETTINGS
static const std::string COMMAND_NAME_SIMULATOR_SETTINGS
Name of the simulator settings command.
Definition: ProximConstants.hh:134
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximToolbox::lineReader
static ProximLineReader & lineReader()
Definition: ProximToolbox.cc:238
SimulatorFrontend
Definition: SimulatorFrontend.hh:89
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75
ProximConstants::COMMAND_SIMULATOR_SETTINGS
@ COMMAND_SIMULATOR_SETTINGS
Definition: ProximConstants.hh:68