OpenASIP
2.2
Loading...
Searching...
No Matches
src
codesign
Proxim
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
*/
46
ProximOptionsCmd::ProximOptionsCmd
():
47
GUICommand
(
ProximConstants
::COMMAND_NAME_EDIT_OPTIONS, NULL) {
48
49
}
50
51
52
/**
53
* The Destructor.
54
*/
55
ProximOptionsCmd::~ProximOptionsCmd
() {
56
}
57
58
59
/**
60
* Executes the command.
61
*
62
* @return True, if the command was succesfully executed, false otherwise.
63
*/
64
bool
65
ProximOptionsCmd::Do
() {
66
67
OptionsDialog
dialog(
68
parentWindow
(), wxGetApp().
options
(), wxGetApp().commandRegistry());
69
70
if
(dialog.ShowModal() == wxID_OK) {
71
if
(wxGetApp().
options
().toolbarVisibility()) {
72
ProximToolbox::mainFrame
()->
createToolbar
();
73
}
74
ProximToolbox::mainFrame
()->
createMenubar
();
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
86
ProximOptionsCmd::id
()
const
{
87
return
ProximConstants::COMMAND_EDIT_OPTIONS
;
88
}
89
90
91
/**
92
* Creates and returns a new instance of this command.
93
*
94
* @return Newly created instance of this command.
95
*/
96
ProximOptionsCmd
*
97
ProximOptionsCmd::create
()
const
{
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
108
ProximOptionsCmd::icon
()
const
{
109
return
"options.png"
;
110
}
111
112
113
/**
114
* This command is always executable.
115
*
116
* @return Always true.
117
*/
118
bool
119
ProximOptionsCmd::isEnabled
() {
120
return
true
;
121
}
GUIOptions.hh
options
static MachInfoCmdLineOptions options
Definition
MachInfo.cc:46
OptionsDialog.hh
ProximConstants.hh
ProximMainFrame.hh
ProximOptionsCmd.hh
ProximToolbox.hh
Proxim.hh
GUICommand
Definition
GUICommand.hh:43
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition
GUICommand.cc:75
OptionsDialog
Definition
OptionsDialog.hh:60
ProximConstants
Definition
ProximConstants.hh:46
ProximConstants::COMMAND_EDIT_OPTIONS
@ COMMAND_EDIT_OPTIONS
Definition
ProximConstants.hh:69
ProximMainFrame::createMenubar
void createMenubar()
Definition
ProximMainFrame.cc:223
ProximMainFrame::createToolbar
void createToolbar()
Definition
ProximMainFrame.cc:420
ProximOptionsCmd
Definition
ProximOptionsCmd.hh:43
ProximOptionsCmd::isEnabled
virtual bool isEnabled()
Definition
ProximOptionsCmd.cc:119
ProximOptionsCmd::~ProximOptionsCmd
virtual ~ProximOptionsCmd()
Definition
ProximOptionsCmd.cc:55
ProximOptionsCmd::ProximOptionsCmd
ProximOptionsCmd()
Definition
ProximOptionsCmd.cc:46
ProximOptionsCmd::icon
virtual std::string icon() const
Definition
ProximOptionsCmd.cc:108
ProximOptionsCmd::id
virtual int id() const
Definition
ProximOptionsCmd.cc:86
ProximOptionsCmd::create
virtual ProximOptionsCmd * create() const
Definition
ProximOptionsCmd.cc:97
ProximOptionsCmd::Do
virtual bool Do()
Definition
ProximOptionsCmd.cc:65
ProximToolbox::mainFrame
static ProximMainFrame * mainFrame()
Definition
ProximToolbox.cc:105
Generated by
1.9.8