OpenASIP
2.0
|
#include <FUGuardDialog.hh>
Public Member Functions | |
FUGuardDialog (wxWindow *parent, TTAMachine::Bus *bus, TTAMachine::PortGuard *guard=NULL) | |
virtual | ~FUGuardDialog () |
virtual bool | TransferDataToWindow () |
Private Types | |
enum | { ID_LABEL_NAME = 10000, ID_LABEL_PORT, ID_FU_NAME, ID_FU_PORT, ID_INVERTED, ID_HELP, ID_LINE } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
void | onFUChoice (wxCommandEvent &event) |
void | onOK (wxCommandEvent &event) |
void | onCancel (wxCommandEvent &event) |
TTAMachine::FunctionUnit * | selectedFU () const |
TTAMachine::FUPort * | selectedPort () const |
void | setTexts () |
Private Attributes | |
wxChoice * | nameChoice_ |
Choice widget for the function unit selection. More... | |
wxChoice * | portChoice_ |
Choice widget for the port selection. More... | |
wxCheckBox * | invertedBox_ |
Checkbox widget for the inverted flag. More... | |
bool | inverted_ |
Inverted flag for the guard. More... | |
bool | newInverted_ |
Modified inverted flag. More... | |
TTAMachine::FUPort * | port_ |
Port of the guard. More... | |
TTAMachine::Bus * | bus_ |
Parent bus of the guard. More... | |
bool | adding_ |
True if a new guard is being added, false otherwise. More... | |
Dialog for editing function unit port guard properties.
Definition at line 47 of file FUGuardDialog.hh.
|
private |
Enumerator | |
---|---|
ID_LABEL_NAME | |
ID_LABEL_PORT | |
ID_FU_NAME | |
ID_FU_PORT | |
ID_INVERTED | |
ID_HELP | |
ID_LINE |
Definition at line 84 of file FUGuardDialog.hh.
FUGuardDialog::FUGuardDialog | ( | wxWindow * | parent, |
TTAMachine::Bus * | bus, | ||
TTAMachine::PortGuard * | guard = NULL |
||
) |
The Constructor.
parent | Parent window of the dialog. |
guard | Port guard to edit. |
Definition at line 65 of file FUGuardDialog.cc.
References assert, TTAMachine::Machine::Navigator< ComponentType >::count(), and TTAMachine::Machine::Navigator< ComponentType >::item().
|
virtual |
|
private |
Creates contents of the dialog window.
Code generated with wxDesigner.
parent | Parent dialog of the contents. |
call_fit | If true, fits sizer in dialog window. |
set_sizer | If true, sets sizer as dialog's sizer. |
Definition at line 320 of file FUGuardDialog.cc.
|
private |
|
private |
Updates the port choice when the function unit selection is changed.
Definition at line 208 of file FUGuardDialog.cc.
References TTAMachine::Port::name(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), and WxConversion::toWxString().
|
private |
Updates the guard object when the OK-button is pressed.
Closes the dialog.
Definition at line 266 of file FUGuardDialog.cc.
References ProDeTextGenerator::instance(), ProDeTextGenerator::MSG_ERROR, ProDeTextGenerator::MSG_ERROR_GUARD_EXISTS, Texts::TextGenerator::text(), and WxConversion::toWxString().
|
private |
Returns a pointer to the selected function unit.
Definition at line 234 of file FUGuardDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toString().
|
private |
Returns a pointer to the selected function unit port.
Definition at line 249 of file FUGuardDialog.cc.
References WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 130 of file FUGuardDialog.cc.
References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_FU_GUARD_DIALOG_TITLE, ProDeTextGenerator::TXT_LABEL_FU_NAME, ProDeTextGenerator::TXT_LABEL_INVERTED, and ProDeTextGenerator::TXT_LABEL_PORT_NAME.
|
virtual |
Transfers data from the guard object to the dialog widgets.
Definition at line 167 of file FUGuardDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toWxString().
|
private |
True if a new guard is being added, false otherwise.
Definition at line 81 of file FUGuardDialog.hh.
|
private |
Parent bus of the guard.
Definition at line 79 of file FUGuardDialog.hh.
|
private |
Inverted flag for the guard.
Definition at line 73 of file FUGuardDialog.hh.
|
private |
Checkbox widget for the inverted flag.
Definition at line 70 of file FUGuardDialog.hh.
|
private |
Choice widget for the function unit selection.
Definition at line 66 of file FUGuardDialog.hh.
|
private |
Modified inverted flag.
Definition at line 75 of file FUGuardDialog.hh.
|
private |
Port of the guard.
Definition at line 77 of file FUGuardDialog.hh.
|
private |
Choice widget for the port selection.
Definition at line 68 of file FUGuardDialog.hh.