OpenASIP 2.2
|
#include <ImmediateSlotDialog.hh>
Public Member Functions | |
ImmediateSlotDialog (wxWindow *parent, TTAMachine::Machine *machine) | |
virtual | ~ImmediateSlotDialog () |
Private Types | |
enum | { ID_SLOT_LIST = 10000 , ID_NAME , ID_LABEL_NAME , ID_LABE_NAME , ID_ADD_SLOT , ID_DELETE_SLOT , ID_LINE , ID_HELP } |
Private Member Functions | |
virtual bool | TransferDataToWindow () |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
void | updateSlotList () |
void | onAddSlot (wxCommandEvent &event) |
void | onDeleteSlot (wxCommandEvent &event) |
void | onSlotName (wxCommandEvent &event) |
void | onSlotSelection (wxListEvent &event) |
void | setTexts () |
Private Attributes | |
TTAMachine::Machine * | machine_ |
Parent machine of the immediate slots. | |
wxListCtrl * | slotList_ |
Immediate slot list widget. | |
wxString | slotName_ |
Text in the slot name widget. | |
Dialog for modifying immediate slots in a machine.
Definition at line 47 of file ImmediateSlotDialog.hh.
|
private |
Enumerator | |
---|---|
ID_SLOT_LIST | |
ID_NAME | |
ID_LABEL_NAME | |
ID_LABE_NAME | |
ID_ADD_SLOT | |
ID_DELETE_SLOT | |
ID_LINE | |
ID_HELP |
Definition at line 69 of file ImmediateSlotDialog.hh.
ImmediateSlotDialog::ImmediateSlotDialog | ( | wxWindow * | parent, |
TTAMachine::Machine * | machine | ||
) |
The Constructor.
parent | Parent window of the dialog. |
machine | Parent Machine of the immediate slots. |
Definition at line 67 of file ImmediateSlotDialog.cc.
|
virtual |
|
private |
Creates the dialog contents.
parent | Parent dialog of the contents. |
call_fit | If true, fits the contents inside the dialog. |
set_sizer | If true, sets the main sizer as dialog contents. |
Definition at line 276 of file ImmediateSlotDialog.cc.
References ID_ADD_SLOT, ID_DELETE_SLOT, ID_HELP, ID_LABEL_NAME, ID_LINE, ID_NAME, and ID_SLOT_LIST.
|
private |
Adds a new slot to the machine when "Add" button is pressed.
Definition at line 193 of file ImmediateSlotDialog.cc.
References TTAMachine::Machine::busNavigator(), ProDeTextGenerator::COMP_A_BUS, ProDeTextGenerator::COMP_AN_IMM_SLOT, ProDeTextGenerator::COMP_IMM_SLOT, ProDeTextGenerator::COMP_MACHINE, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::immediateSlotNavigator(), ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), machine_, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, slotName_, Texts::TextGenerator::text(), WxConversion::toString(), WxConversion::toWxString(), and TransferDataToWindow().
|
private |
Deletes the selected immediate slot.
Definition at line 167 of file ImmediateSlotDialog.cc.
References dummy, TTAMachine::Machine::immediateSlotNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, onSlotSelection(), slotList_, and TransferDataToWindow().
|
private |
Enables and disables the "Add" button when text is entered in the slot name widget.
Definition at line 252 of file ImmediateSlotDialog.cc.
References ID_ADD_SLOT, and slotName_.
|
private |
Enables and disables the delete button according to slot list selection.
Definition at line 154 of file ImmediateSlotDialog.cc.
References ID_DELETE_SLOT, and slotList_.
Referenced by onDeleteSlot().
|
private |
Sets widget texts.
Definition at line 99 of file ImmediateSlotDialog.cc.
References ID_ADD_SLOT, ID_DELETE_SLOT, ID_HELP, ID_NAME, GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), slotList_, Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_ADD, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_COLUMN_NAME, ProDeTextGenerator::TXT_IMMEDIATE_SLOT_DIALOG_TITLE, and ProDeTextGenerator::TXT_LABEL_NAME.
|
privatevirtual |
Transfers data from the machine model to the dialog widgets.
Definition at line 134 of file ImmediateSlotDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::immediateSlotNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, slotList_, and WxConversion::toWxString().
Referenced by onAddSlot(), and onDeleteSlot().
|
private |
|
private |
Parent machine of the immediate slots.
Definition at line 63 of file ImmediateSlotDialog.hh.
Referenced by onAddSlot(), onDeleteSlot(), and TransferDataToWindow().
|
private |
Immediate slot list widget.
Definition at line 65 of file ImmediateSlotDialog.hh.
Referenced by onDeleteSlot(), onSlotSelection(), setTexts(), and TransferDataToWindow().
|
private |
Text in the slot name widget.
Definition at line 67 of file ImmediateSlotDialog.hh.
Referenced by onAddSlot(), and onSlotName().