OpenASIP  2.0
OSEdOptionsCmd.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 OSEdOptionsCmd.cc
26  *
27  * Definition of OSEdOptionsCmd class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include "OSEdOptionsCmd.hh"
34 #include "OSEdConstants.hh"
35 #include "OSEdOptionsDialog.hh"
36 
37 using std::string;
38 
39 /**
40  * Constructor.
41  */
43  GUICommand(OSEdConstants::CMD_NAME_OPTIONS, NULL) {
44 }
45 
46 /**
47  * Destructor.
48  */
50 }
51 
52 /**
53  * Returns the id of the command.
54  *
55  * @return The id of the command.
56  */
57 int
60 }
61 
62 /**
63  * Creates a new command.
64  *
65  * @return New command.
66  */
69  return new OSEdOptionsCmd();
70 }
71 
72 /**
73  * Executes the command.
74  *
75  * @return True if execution is successful.
76  */
77 bool
80  dialog.ShowModal();
81  return true;
82 }
83 
84 /**
85  * Return true if command is enabled.
86  *
87  * @return Always true.
88  */
89 bool
91  return true;
92 }
93 
94 /**
95  * Return icon path.
96  *
97  * @return Empty string (icons not used).
98  */
99 string
101  return "";
102 }
OSEdOptionsCmd::isEnabled
virtual bool isEnabled()
Definition: OSEdOptionsCmd.cc:90
OSEdOptionsCmd::icon
virtual std::string icon() const
Definition: OSEdOptionsCmd.cc:100
OSEdOptionsCmd.hh
OSEdOptionsCmd::id
virtual int id() const
Definition: OSEdOptionsCmd.cc:58
OSEdOptionsCmd::create
virtual GUICommand * create() const
Definition: OSEdOptionsCmd.cc:68
OSEdConstants.hh
OSEdOptionsDialog
Definition: OSEdOptionsDialog.hh:41
GUICommand
Definition: GUICommand.hh:43
OSEdConstants
Definition: OSEdConstants.hh:45
OSEdConstants::CMD_OPTIONS
@ CMD_OPTIONS
Option command id.
Definition: OSEdConstants.hh:102
OSEdOptionsDialog.hh
OSEdOptionsCmd::Do
virtual bool Do()
Definition: OSEdOptionsCmd.cc:78
OSEdOptionsCmd::~OSEdOptionsCmd
virtual ~OSEdOptionsCmd()
Definition: OSEdOptionsCmd.cc:49
OSEdOptionsCmd::OSEdOptionsCmd
OSEdOptionsCmd()
Definition: OSEdOptionsCmd.cc:42
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75