|
OpenASIP 2.2
|
#include <OperationDAGDialog.hh>


Public Member Functions | |
| OperationDAGDialog (wxWindow *parent, Operation *op) | |
| virtual | ~OperationDAGDialog () |
| Operation * | operation () const |
Private Types | |
| enum | { ID_EDIT_DAG = 1000 , ID_SAVE_DAG_BUTTON , ID_UNDO_DAG_BUTTON , ID_DELETE_DAG_BUTTON , ID_NEW_DAG_BUTTON , ID_DAG_IMAGE , ID_INDEX_DAG , ID_OK_BUTTON , ID_CANCEL_BUTTON } |
Private Member Functions | |
| OperationDAGDialog (const OperationDAGDialog &) | |
| Copying not allowed. | |
| OperationDAGDialog & | operator= (const OperationDAGDialog &) |
| Assignment not allowed. | |
| wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
| virtual bool | TransferDataToWindow () |
| void | updateIndex () |
| bool | hasDot () |
| void | updateDAG () |
| void | onOK (wxCommandEvent &event) |
| void | onCancel (wxCommandEvent &event) |
| void | doSaveDAG (int index) |
| void | onSaveDAG (wxCommandEvent &event) |
| void | onUndoDAG (wxCommandEvent &event) |
| void | onDeleteDAG (wxCommandEvent &event) |
| void | onNewDAG (wxCommandEvent &event) |
| void | onDAGChange (wxCommandEvent &event) |
| void | onComboBoxChange (wxCommandEvent &event) |
| ObjectState * | saveOperation () |
| void | setTexts () |
| void | setBehaviorLabel () |
Private Attributes | |
| Operation * | operation_ |
| Operation to be created or to be modified. | |
| ObjectState * | orig_ |
| Original operation's ObjectState tree. | |
| wxTextCtrl * | dagEdit_ |
| wxTextCtrl * | editDescription_ |
| wxChoice * | dagIndex_ |
| wxBitmap * | dotImage_ |
| wxStaticBitmap * | dagStaticBitmap_ |
| wxStaticBoxSizer * | dagImageStaticBoxSizer_ |
| wxScrolledWindow * | dagWindow_ |
| bool | dotInstalled_ |
Dialog which is used to create or modify an operation.
Definition at line 51 of file OperationDAGDialog.hh.
|
private |
Component ids.
| Enumerator | |
|---|---|
| ID_EDIT_DAG | |
| ID_SAVE_DAG_BUTTON | |
| ID_UNDO_DAG_BUTTON | |
| ID_DELETE_DAG_BUTTON | |
| ID_NEW_DAG_BUTTON | |
| ID_DAG_IMAGE | |
| ID_INDEX_DAG | |
| ID_OK_BUTTON | |
| ID_CANCEL_BUTTON | |
Definition at line 92 of file OperationDAGDialog.hh.
| OperationDAGDialog::OperationDAGDialog | ( | wxWindow * | parent, |
| Operation * | op | ||
| ) |
Constructor.
| parent | The parent window. |
| op | Operation to be created or modified. |
| module | Module in which operation belongs to. |
| path | Path in which module belongs to. |
Definition at line 91 of file OperationDAGDialog.cc.
|
virtual |
Destructor.
Definition at line 134 of file OperationDAGDialog.cc.
References DialogPosition::DIALOG_PROPERTIES, and DialogPosition::setPosition().

|
private |
Copying not allowed.
|
private |
Creates the contents of the dialog.
| parent | Parent 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 516 of file OperationDAGDialog.cc.
References dagImageStaticBoxSizer_, dagStaticBitmap_, dagWindow_, dotImage_, ID_DAG_IMAGE, ID_DELETE_DAG_BUTTON, ID_EDIT_DAG, ID_INDEX_DAG, ID_NEW_DAG_BUTTON, ID_OK_BUTTON, ID_SAVE_DAG_BUTTON, and ID_UNDO_DAG_BUTTON.
|
private |
Definition at line 389 of file OperationDAGDialog.cc.
References Operation::addDag(), Operation::dagCount(), dagEdit_, dagIndex_, operation_, Operation::setDagCode(), updateDAG(), and updateIndex().
Referenced by onOK(), and onSaveDAG().

|
private |
Tests whether user has program dot is installed.
Definition at line 223 of file OperationDAGDialog.cc.
References dagImageStaticBoxSizer_.
|
private |
Handles the event when Cancel button is pushed.
Definition at line 383 of file OperationDAGDialog.cc.
References Operation::loadState(), operation_, and orig_.

|
private |
Handles the event when ComboBox is changed
Definition at line 503 of file OperationDAGDialog.cc.
References updateDAG().

|
private |
Handles the event when DAG is changed
Definition at line 494 of file OperationDAGDialog.cc.
References ID_SAVE_DAG_BUTTON, and ID_UNDO_DAG_BUTTON.
|
private |
Handles the event when Delete button is pushed.
Definition at line 458 of file OperationDAGDialog.cc.
References Operation::dagCount(), dagEdit_, dagIndex_, operation_, Operation::removeDag(), updateDAG(), and updateIndex().

|
private |
Handles the event when New button is pushed.
Definition at line 479 of file OperationDAGDialog.cc.
References Operation::dagCount(), dagEdit_, dagImageStaticBoxSizer_, dagIndex_, ID_DELETE_DAG_BUTTON, ID_NEW_DAG_BUTTON, ID_SAVE_DAG_BUTTON, ID_UNDO_DAG_BUTTON, and operation_.

|
private |
Handles the event when OK button is pushed.
Definition at line 371 of file OperationDAGDialog.cc.
References Operation::dagCount(), doSaveDAG(), and operation_.

|
private |
Handles the event when Save button is pushed.
Definition at line 421 of file OperationDAGDialog.cc.
References dagIndex_, doSaveDAG(), ID_DELETE_DAG_BUTTON, ID_SAVE_DAG_BUTTON, ID_UNDO_DAG_BUTTON, and operation_.

|
private |
Handles the event when Undo button is pushed.
Definition at line 439 of file OperationDAGDialog.cc.
References Operation::dagCount(), dagEdit_, dagIndex_, ID_DELETE_DAG_BUTTON, ID_SAVE_DAG_BUTTON, ID_UNDO_DAG_BUTTON, operation_, and updateDAG().

| Operation * OperationDAGDialog::operation | ( | ) | const |
Returns operation object of dialog.
Definition at line 149 of file OperationDAGDialog.cc.
References operation_.
|
private |
Assignment not allowed.
|
private |
|
private |
|
private |
Set texts to all widgets.
Definition at line 157 of file OperationDAGDialog.cc.
References ID_DELETE_DAG_BUTTON, ID_NEW_DAG_BUTTON, ID_SAVE_DAG_BUTTON, ID_UNDO_DAG_BUTTON, OSEdTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_BUTTON_DELETE, OSEdTextGenerator::TXT_BUTTON_NEW, OSEdTextGenerator::TXT_BUTTON_SAVE, OSEdTextGenerator::TXT_BUTTON_UNDO, and OSEdTextGenerator::TXT_PROPERTY_DIALOG_TITLE.

|
privatevirtual |
Transfers data to window.
Definition at line 187 of file OperationDAGDialog.cc.
|
private |
Updates TextCtrl for DAG
Definition at line 243 of file OperationDAGDialog.cc.
References FileSystem::createTempDirectory(), Operation::dag(), Operation::dagCode(), dagEdit_, Operation::dagError(), dagImageStaticBoxSizer_, dagIndex_, dagStaticBitmap_, dagWindow_, debugLog, dotImage_, dotInstalled_, ID_DELETE_DAG_BUTTON, ID_NEW_DAG_BUTTON, ID_SAVE_DAG_BUTTON, ID_UNDO_DAG_BUTTON, OperationDAG::isNull(), operation_, FileSystem::removeFileOrDirectory(), TCEString::replace(), and GraphBase< GraphNode, GraphEdge >::writeToDotFile().
Referenced by doSaveDAG(), onComboBoxChange(), onDeleteDAG(), and onUndoDAG().

|
private |
Updates the DAG list.
Definition at line 195 of file OperationDAGDialog.cc.
References Operation::dagCount(), dagIndex_, operation_, and WxConversion::toWxString().
Referenced by doSaveDAG(), and onDeleteDAG().

|
private |
Definition at line 110 of file OperationDAGDialog.hh.
Referenced by doSaveDAG(), onDeleteDAG(), onNewDAG(), onUndoDAG(), and updateDAG().
|
private |
Definition at line 123 of file OperationDAGDialog.hh.
Referenced by createContents(), hasDot(), onNewDAG(), and updateDAG().
|
private |
Definition at line 116 of file OperationDAGDialog.hh.
Referenced by doSaveDAG(), onDeleteDAG(), onNewDAG(), onSaveDAG(), onUndoDAG(), updateDAG(), and updateIndex().
|
private |
Definition at line 122 of file OperationDAGDialog.hh.
Referenced by createContents(), and updateDAG().
|
private |
Definition at line 126 of file OperationDAGDialog.hh.
Referenced by createContents(), and updateDAG().
|
private |
Definition at line 119 of file OperationDAGDialog.hh.
Referenced by createContents(), and updateDAG().
|
private |
Definition at line 128 of file OperationDAGDialog.hh.
Referenced by updateDAG().
|
private |
Definition at line 113 of file OperationDAGDialog.hh.
|
private |
Operation to be created or to be modified.
Definition at line 105 of file OperationDAGDialog.hh.
Referenced by doSaveDAG(), onCancel(), onDeleteDAG(), onNewDAG(), onOK(), onSaveDAG(), onUndoDAG(), operation(), updateDAG(), and updateIndex().
|
private |
Original operation's ObjectState tree.
Definition at line 107 of file OperationDAGDialog.hh.
Referenced by onCancel().