OpenASIP
2.0
|
#include <FUPortDialog.hh>
Public Member Functions | |
FUPortDialog (wxWindow *parent, TTAMachine::FUPort *port) | |
~FUPortDialog () | |
Protected Member Functions | |
virtual bool | TransferDataToWindow () |
Private Types | |
enum | { ID_NAME =10000, ID_WIDTH, ID_INPUT_SOCKET, ID_OUTPUT_SOCKET, ID_TRIGGERS, ID_HELP, ID_LABEL_NAME, ID_LABEL_WIDTH, ID_LABEL_INPUT_SOCKET, ID_LABEL_OUTPUT_SOCKET, ID_LINE } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
void | updateSockets () |
void | onOK (wxCommandEvent &event) |
void | onCancel (wxCommandEvent &event) |
void | onSocketChoice (wxCommandEvent &event) |
void | onHelp (wxCommandEvent &event) |
void | onName (wxCommandEvent &event) |
void | setTexts () |
Private Attributes | |
TTAMachine::FUPort * | port_ |
Function unit port to modify. More... | |
wxString | name_ |
Name of the port. More... | |
int | width_ |
Width of the port. More... | |
bool | triggers_ |
Trigger attribute of the port. More... | |
wxChoice * | inputSocketChoice_ |
Input socket choice control. More... | |
wxChoice * | outputSocketChoice_ |
Output socket choice control. More... | |
TTAMachine::Socket * | oldInput_ |
Original input socket of the port. More... | |
TTAMachine::Socket * | oldOutput_ |
Original output socket of the port. More... | |
Dialog for querying port parameters from the user.
Definition at line 44 of file FUPortDialog.hh.
|
private |
Enumerator | |
---|---|
ID_NAME | |
ID_WIDTH | |
ID_INPUT_SOCKET | |
ID_OUTPUT_SOCKET | |
ID_TRIGGERS | |
ID_HELP | |
ID_LABEL_NAME | |
ID_LABEL_WIDTH | |
ID_LABEL_INPUT_SOCKET | |
ID_LABEL_OUTPUT_SOCKET | |
ID_LINE |
Definition at line 81 of file FUPortDialog.hh.
FUPortDialog::FUPortDialog | ( | wxWindow * | parent, |
TTAMachine::FUPort * | port | ||
) |
The Constructor.
parent | Parent window of the dialog. |
port | Port to modify. |
Definition at line 76 of file FUPortDialog.cc.
FUPortDialog::~FUPortDialog | ( | ) |
|
private |
Creates contents of the dialog window. Initially generated with wxDesigner, the code will be cleaned up later.
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 377 of file FUPortDialog.cc.
|
private |
Resets the original input and output sockets for the port and closes the dialog.
Definition at line 249 of file FUPortDialog.cc.
|
private |
|
private |
Disables OK-button if the name field is empty.
Definition at line 354 of file FUPortDialog.cc.
References assert.
|
private |
Validates input in the controls, and updates the port object.
Definition at line 265 of file FUPortDialog.cc.
References ProDeTextGenerator::COMP_A_PORT, ProDeTextGenerator::COMP_FUNCTION_UNIT, ProDeTextGenerator::COMP_PORT, ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), machine, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, TTAMachine::Port::name(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().
|
private |
Updates the port object when user changes input/output socket selection.
Definition at line 328 of file FUPortDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::item(), ProDeConstants::NONE, and WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 117 of file FUPortDialog.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_PORT_DIALOG_TITLE, ProDeTextGenerator::TXT_LABEL_INPUT_SOCKET, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_LABEL_OUTPUT_SOCKET, ProDeTextGenerator::TXT_LABEL_TRIGGERS, and ProDeTextGenerator::TXT_LABEL_WIDTH.
|
protectedvirtual |
Transfers data from the port object to the dialog widgets.
Definition at line 160 of file FUPortDialog.cc.
References WxConversion::toWxString().
|
private |
Updates input and output socket choicers.
Definition at line 179 of file FUPortDialog.cc.
References MachineTester::canConnect(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Socket::direction(), TTAMachine::Socket::INPUT, TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), ProDeConstants::NONE, TTAMachine::Socket::OUTPUT, and WxConversion::toWxString().
|
private |
Input socket choice control.
Definition at line 72 of file FUPortDialog.hh.
|
private |
Name of the port.
Definition at line 66 of file FUPortDialog.hh.
|
private |
Original input socket of the port.
Definition at line 77 of file FUPortDialog.hh.
|
private |
Original output socket of the port.
Definition at line 79 of file FUPortDialog.hh.
|
private |
Output socket choice control.
Definition at line 74 of file FUPortDialog.hh.
|
private |
Function unit port to modify.
Definition at line 64 of file FUPortDialog.hh.
|
private |
Trigger attribute of the port.
Definition at line 70 of file FUPortDialog.hh.
|
private |
Width of the port.
Definition at line 68 of file FUPortDialog.hh.