OpenASIP
2.0
|
#include <OTAFormatListDialog.hh>
Public Member Functions | |
OTAFormatListDialog (wxWindow *parent, TTAMachine::Machine *machine) | |
virtual | ~OTAFormatListDialog () |
Private Types | |
enum | { ID_OTA_FORMAT_LIST = 10000, ID_OPERATION_LIST, ID_LINE, ID_HELP, ID_ADD_OTA_FORMAT, ID_DELETE_OTA_FORMAT, ID_ADD_OPERATION, ID_EDIT_OPERATION, ID_DELETE_OPERATION, ID_NAME, ID_LABEL_NAME } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
virtual bool | TransferDataToWindow () |
void | updateOperationList () |
void | onOTAFormatSelection (wxListEvent &event) |
void | onOperationSelection (wxListEvent &event) |
void | onOTAFormatName (wxCommandEvent &event) |
void | onAddOTAFormat (wxCommandEvent &event) |
void | onDeleteOTAFormat (wxCommandEvent &event) |
void | onAddOperation (wxCommandEvent &event) |
void | onEditOperation (wxCommandEvent &event) |
void | onDeleteOperation (wxCommandEvent &event) |
void | setTexts () |
bool | validFormatName () const |
TTAMachine::OperationTriggeredFormat * | selectedOTAFormat () |
std::string | selectedOperation () |
Private Attributes | |
TTAMachine::Machine * | machine_ |
Parent machine of the instruction OTAFormats. More... | |
wxStaticBoxSizer * | OTAFormatSizer_ |
Box sizer around the OTAFormat list. More... | |
wxStaticBoxSizer * | operationSizer_ |
Box sizer around the operation list. More... | |
wxListCtrl * | OTAFormatList_ |
Widget for list of OTAFormats. More... | |
wxListCtrl * | operationList_ |
Widget for list of operations in the selected OTAFormat. More... | |
wxString | OTAFormatName_ |
Name of the new OTAFormat. More... | |
Dialog for listing and editing instruction OTAFormats in a machine.
Definition at line 44 of file OTAFormatListDialog.hh.
|
private |
Enumerator | |
---|---|
ID_OTA_FORMAT_LIST | |
ID_OPERATION_LIST | |
ID_LINE | |
ID_HELP | |
ID_ADD_OTA_FORMAT | |
ID_DELETE_OTA_FORMAT | |
ID_ADD_OPERATION | |
ID_EDIT_OPERATION | |
ID_DELETE_OPERATION | |
ID_NAME | |
ID_LABEL_NAME |
Definition at line 80 of file OTAFormatListDialog.hh.
OTAFormatListDialog::OTAFormatListDialog | ( | wxWindow * | parent, |
TTAMachine::Machine * | machine | ||
) |
The Constructor.
parent | Parent window of the dialog. |
machine | Parent machine of the instruction OTAFormats. |
Definition at line 70 of file OTAFormatListDialog.cc.
|
virtual |
|
private |
Creates the dialog window contents.
This method was generated with wxDesigner.
parent | The dialog window. |
call_fit | If true, fits the contents inside the dialog. |
set_sizer | If true, sets the main sizer as dialog contents. |
Definition at line 409 of file OTAFormatListDialog.cc.
|
private |
Handles the add Operation button event.
Definition at line 374 of file OTAFormatListDialog.cc.
References assert.
|
private |
Handles the Add tempalte button event.
Adds a new OTAFormat to the machine.
Definition at line 299 of file OTAFormatListDialog.cc.
References assert, ProDeTextGenerator::COMP_AN_OTA_FORMAT, ProDeTextGenerator::COMP_MACHINE, ProDeTextGenerator::COMP_OTA_FORMAT, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ProDeTextGenerator::instance(), machine, ProDeTextGenerator::MSG_ERROR_SAME_NAME, Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().
|
private |
Handles the delete Operation button event.
Definition at line 389 of file OTAFormatListDialog.cc.
References assert.
|
private |
Deletes the selected OTAFormat.
Definition at line 239 of file OTAFormatListDialog.cc.
References dummy.
|
private |
|
private |
Updates the edit/delete Operation buttons when the Operation selection changes.
Definition at line 226 of file OTAFormatListDialog.cc.
|
private |
Enables and disables the Add OTAFormat button when text is entered in the OTAFormat name widget.
Definition at line 352 of file OTAFormatListDialog.cc.
References assert, and TTAMachine::Machine::Navigator< ComponentType >::count().
|
private |
Updates the Operation list when the OTAFormat selection changes.
Definition at line 212 of file OTAFormatListDialog.cc.
|
private |
Returns name of the selected Operation.
Definition at line 274 of file OTAFormatListDialog.cc.
References WidgetTools::lcStringSelection().
|
private |
Returns pointer to the selected OperationTriggeredFormat.
Definition at line 253 of file OTAFormatListDialog.cc.
|
private |
Sets texts for widgets.
Definition at line 102 of file OTAFormatListDialog.cc.
References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), WidgetTools::setWidgetLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_ADD, GUITextGenerator::TXT_BUTTON_ADD_DIALOG, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_COLUMN_NAME, ProDeTextGenerator::TXT_COLUMN_OTA_OPERATION, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_OTA_FORMATS_BOX, ProDeTextGenerator::TXT_OTA_FORMATS_DIALOG_TITLE, and ProDeTextGenerator::TXT_OTA_FORMATS_OPERATIONS_BOX.
|
privatevirtual |
Transfers data from the machine to the dialog widgets.
Definition at line 164 of file OTAFormatListDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toWxString().
|
private |
Updates the OTAFormat Operation list.
Definition at line 183 of file OTAFormatListDialog.cc.
References dummy, TTAMachine::OperationTriggeredFormat::operation(), TTAMachine::OperationTriggeredFormat::operationCount(), and WxConversion::toWxString().
|
private |
Definition at line 280 of file OTAFormatListDialog.cc.
|
private |
Parent machine of the instruction OTAFormats.
Definition at line 67 of file OTAFormatListDialog.hh.
|
private |
Widget for list of operations in the selected OTAFormat.
Definition at line 75 of file OTAFormatListDialog.hh.
|
private |
Box sizer around the operation list.
Definition at line 71 of file OTAFormatListDialog.hh.
|
private |
Widget for list of OTAFormats.
Definition at line 73 of file OTAFormatListDialog.hh.
|
private |
Name of the new OTAFormat.
Definition at line 77 of file OTAFormatListDialog.hh.
|
private |
Box sizer around the OTAFormat list.
Definition at line 69 of file OTAFormatListDialog.hh.