OpenASIP  2.0
ProximOptionsCmd.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file ProximOptionsCmd.cc
26  *
27  * Implementation of ProximOptionsCmd class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include "ProximOptionsCmd.hh"
34 #include "OptionsDialog.hh"
35 #include "ProximConstants.hh"
36 #include "GUIOptions.hh"
37 #include "Proxim.hh"
38 #include "ProximMainFrame.hh"
39 #include "ProximToolbox.hh"
40 
41 using std::string;
42 
43 /**
44  * The Constructor.
45  */
47  GUICommand(ProximConstants::COMMAND_NAME_EDIT_OPTIONS, NULL) {
48 
49 }
50 
51 
52 /**
53  * The Destructor.
54  */
56 }
57 
58 
59 /**
60  * Executes the command.
61  *
62  * @return True, if the command was succesfully executed, false otherwise.
63  */
64 bool
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 }
78 
79 
80 /**
81  * Returns id of this command.
82  *
83  * @return ID for this command to be used in menus and toolbars.
84  */
85 int
88 }
89 
90 
91 /**
92  * Creates and returns a new instance of this command.
93  *
94  * @return Newly created instance of this command.
95  */
98  return new ProximOptionsCmd();
99 }
100 
101 
102 /**
103  * Returns path to the command's icon file.
104  *
105  * @return Full path to the command's icon file.
106  */
107 string
109  return "options.png";
110 }
111 
112 
113 /**
114  * This command is always executable.
115  *
116  * @return Always true.
117  */
118 bool
120  return true;
121 }
ProximOptionsCmd::create
virtual ProximOptionsCmd * create() const
Definition: ProximOptionsCmd.cc:97
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.hh
GUIOptions.hh
OptionsDialog
Definition: OptionsDialog.hh:60
Proxim.hh
ProximOptionsCmd::~ProximOptionsCmd
virtual ~ProximOptionsCmd()
Definition: ProximOptionsCmd.cc:55
ProximOptionsCmd::isEnabled
virtual bool isEnabled()
Definition: ProximOptionsCmd.cc:119
ProximToolbox.hh
GUICommand
Definition: GUICommand.hh:43
ProximOptionsCmd.hh
ProximOptionsCmd::icon
virtual std::string icon() const
Definition: ProximOptionsCmd.cc:108
ProximMainFrame::createMenubar
void createMenubar()
Definition: ProximMainFrame.cc:223
ProximOptionsCmd::id
virtual int id() const
Definition: ProximOptionsCmd.cc:86
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
ProximConstants
Definition: ProximConstants.hh:46
ProximMainFrame::createToolbar
void createToolbar()
Definition: ProximMainFrame.cc:420
ProximConstants.hh
ProximOptionsCmd::Do
virtual bool Do()
Definition: ProximOptionsCmd.cc:65
ProximMainFrame.hh
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75
ProximOptionsCmd
Definition: ProximOptionsCmd.hh:43