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

#include <ProximOptionsCmd.hh>

Inheritance diagram for ProximOptionsCmd:
Inheritance graph
Collaboration diagram for ProximOptionsCmd:
Collaboration graph

Public Member Functions

 ProximOptionsCmd ()
 
virtual ~ProximOptionsCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximOptionsCmdcreate () const
 
virtual std::string icon () const
 
virtual bool isEnabled ()
 
- 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 editing Proxim options.

Creates and shows ProximOptionsDialog.

Definition at line 43 of file ProximOptionsCmd.hh.

Constructor & Destructor Documentation

◆ ProximOptionsCmd()

ProximOptionsCmd::ProximOptionsCmd ( )

The Constructor.

Definition at line 46 of file ProximOptionsCmd.cc.

46  :
48 
49 }

Referenced by create().

◆ ~ProximOptionsCmd()

ProximOptionsCmd::~ProximOptionsCmd ( )
virtual

The Destructor.

Definition at line 55 of file ProximOptionsCmd.cc.

55  {
56 }

Member Function Documentation

◆ create()

ProximOptionsCmd * ProximOptionsCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 97 of file ProximOptionsCmd.cc.

97  {
98  return new ProximOptionsCmd();
99 }

References ProximOptionsCmd().

Here is the call graph for this function:

◆ Do()

bool ProximOptionsCmd::Do ( )
virtual

Executes the command.

Returns
True, if the command was succesfully executed, false otherwise.

Implements GUICommand.

Definition at line 65 of file ProximOptionsCmd.cc.

65  {
66 
67  OptionsDialog dialog(
68  parentWindow(), wxGetApp().options(), wxGetApp().commandRegistry());
69 
70  if (dialog.ShowModal() == wxID_OK) {
71  if (wxGetApp().options().toolbarVisibility()) {
73  }
75  }
76  return true;
77 }

References ProximMainFrame::createMenubar(), ProximMainFrame::createToolbar(), ProximToolbox::mainFrame(), options, and GUICommand::parentWindow().

Here is the call graph for this function:

◆ icon()

string ProximOptionsCmd::icon ( ) const
virtual

Returns path to the command's icon file.

Returns
Full path to the command's icon file.

Implements GUICommand.

Definition at line 108 of file ProximOptionsCmd.cc.

108  {
109  return "options.png";
110 }

◆ id()

int ProximOptionsCmd::id ( ) const
virtual

Returns id of this command.

Returns
ID for this command to be used in menus and toolbars.

Implements GUICommand.

Definition at line 86 of file ProximOptionsCmd.cc.

86  {
88 }

References ProximConstants::COMMAND_EDIT_OPTIONS.

◆ isEnabled()

bool ProximOptionsCmd::isEnabled ( )
virtual

This command is always executable.

Returns
Always true.

Implements GUICommand.

Definition at line 119 of file ProximOptionsCmd.cc.

119  {
120  return true;
121 }

The documentation for this class was generated from the following files:
ProximConstants::COMMAND_EDIT_OPTIONS
@ COMMAND_EDIT_OPTIONS
Definition: ProximConstants.hh:69
ProximOptionsCmd::ProximOptionsCmd
ProximOptionsCmd()
Definition: ProximOptionsCmd.cc:46
ProximToolbox::mainFrame
static ProximMainFrame * mainFrame()
Definition: ProximToolbox.cc:105
OptionsDialog
Definition: OptionsDialog.hh:60
ProximConstants::COMMAND_NAME_EDIT_OPTIONS
static const std::string COMMAND_NAME_EDIT_OPTIONS
Name of the edit options command.
Definition: ProximConstants.hh:136
ProximMainFrame::createMenubar
void createMenubar()
Definition: ProximMainFrame.cc:223
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition: GUICommand.cc:42
ProximMainFrame::createToolbar
void createToolbar()
Definition: ProximMainFrame.cc:420
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75