OpenASIP 2.2
Loading...
Searching...
No Matches
CostFunctionPluginDialog.hh
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 CostFunctionPluginDialog.hh
26 *
27 * Declaration of CostFunctionPluginDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_COST_FUNCTION_PLUGIN_DIALOG_HH
34#define TTA_COST_FUNCTION_PLUGIN_DIALOG_HH
35
36#include <wx/wx.h>
37#include <wx/listctrl.h>
38
39namespace HDB {
40 class HDBManager;
41}
42
43/**
44 * Dialog for modifying CostFunctionPlugins.
45 */
46class CostFunctionPluginDialog : public wxDialog {
47public:
49 wxWindow* parent, wxWindowID id, HDB::HDBManager& hdb, int pluginID);
50
52private:
53 virtual bool TransferDataToWindow();
54 void onBrowse(wxCommandEvent& event);
55 void onAdd(wxCommandEvent& event);
56 void onModify(wxCommandEvent& event);
57 void onDelete(wxCommandEvent& event);
58 void onOK(wxCommandEvent& event);
59
60 void onDataSelection(wxListEvent& event);
61 int selectedData();
62
63 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
64
65 /// Pointer to the data list widget.
66 wxListCtrl* list_;
67
68 /// HDB containing the plugin.
70 /// Plugin id in the HDB.
71 int id_;
72 /// Plugin name.
73 wxString name_;
74 /// Plugin file path.
75 wxString path_;
76 /// Plugin description string.
77 wxString description_;
78
79 /// Pointer to the type choice widget.
80 wxChoice* typeChoice_;
81
82 /// FU Cost estimator string for the type choicer widget.
83 static const wxString TYPE_COST_FU;
84 /// RF Cost estimator string for the type choicer widget.
85 static const wxString TYPE_COST_RF;
86 /// Decompressor cost estimator string for the type choicer widget.
87 static const wxString TYPE_COST_DECOMP;
88 /// IC&decoder Cost estimator string for the type choicer widget.
89 static const wxString TYPE_COST_ICDEC;
90
91 /// Widget ids.
92 enum {
93 ID_LIST = 10000,
103 ID_LINE
104 };
105
106 DECLARE_EVENT_TABLE()
107};
108
109#endif
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
static const wxString TYPE_COST_DECOMP
Decompressor cost estimator string for the type choicer widget.
wxListCtrl * list_
Pointer to the data list widget.
wxChoice * typeChoice_
Pointer to the type choice widget.
static const wxString TYPE_COST_FU
FU Cost estimator string for the type choicer widget.
void onModify(wxCommandEvent &event)
wxString path_
Plugin file path.
void onOK(wxCommandEvent &event)
static const wxString TYPE_COST_RF
RF Cost estimator string for the type choicer widget.
static const wxString TYPE_COST_ICDEC
IC&decoder Cost estimator string for the type choicer widget.
void onDataSelection(wxListEvent &event)
HDB::HDBManager & hdb_
HDB containing the plugin.
void onAdd(wxCommandEvent &event)
void onDelete(wxCommandEvent &event)
void onBrowse(wxCommandEvent &event)
wxString description_
Plugin description string.