![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Dialog for python tool dialog. More...
#include <GNEPythonToolDialog.h>
Data Structures | |
| class | CategoryOptions |
| internal class used for sorting options by categories More... | |
Public Member Functions | |
| GNEApplicationWindow * | getGNEApplicationWindow () const |
| get pointer to GNEApplicationWindow | |
| const GNEPythonTool * | getPythonTool () const |
| get python tool | |
| GNEPythonToolDialog (GNEApplicationWindow *GNEApp) | |
| Constructor. | |
| void | openDialog (GNEPythonTool *tool) |
| open dialog | |
| void | runInternalTest (const InternalTestStep::DialogTest *modalArguments) |
| run internal test | |
| ~GNEPythonToolDialog () | |
| destructor | |
FOX-callbacks | |
| long | onCmdShowToolTipsMenu (FXObject *, FXSelector, void *) |
| enable/disable show toolTip | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| save options | |
| long | onCmdLoad (FXObject *, FXSelector, void *) |
| load options | |
| long | onCmdSetVisualization (FXObject *, FXSelector, void *) |
| set visualization (sorting and grouping) | |
| long | onCmdRun (FXObject *, FXSelector, void *) |
| event after press run button | |
| long | onCmdCancel (FXObject *, FXSelector, void *) |
| event after press cancel button | |
| long | onCmdReset (FXObject *, FXSelector, void *) |
| event after press reset button | |
| long | onUpdRequiredAttributes (FXObject *sender, FXSelector, void *) |
| event for check if required attributes was set | |
Protected Member Functions | |
| void | adjustParameterColumn () |
| adjust parameter column | |
| void | buildArguments (bool sortByName, bool groupedByCategories) |
| build arguments | |
| FXVerticalFrame * | getArgumentFrameLeft () const |
| get argument frame left | |
| FXVerticalFrame * | getArgumentFrameRight () const |
| get argument frame right | |
| int | getNumRowColums () const |
| get number of row colums | |
| std::vector< GNEPythonToolDialog::CategoryOptions > | getOptions (OptionsCont &optionsCont) const |
| get options | |
| std::vector< CategoryOptions > | getOptionsByCategories (OptionsCont &optionsCont) const |
| get options sorted by category | |
| GNEPythonToolDialog () | |
| FOX needs this. | |
| FXuint | openModalDialog (InternalTest *internalTests, FXuint placement=PLACEMENT_CURSOR) |
| Run modal invocation of the dialog. | |
FOX-callbacks | |
| long | onCmdAccept (FXObject *, FXSelector, void *) |
| called when accept button is pressed | |
| long | onCmdInternalTest (FXObject *, FXSelector, void *ptr) |
| event used in internal tests | |
Protected Attributes | |
| std::vector< GNEPythonToolDialogElements::Argument * > | myArguments |
| list of arguments sorted by categories | |
| std::vector< GNEPythonToolDialogElements::Category * > | myCategories |
| list of categories | |
| OptionsCont | myCustomToolsOptions |
| custom tools options | |
| bool | myTesting = false |
| flag to indicate if this dialog is being tested using internal test | |
Private Member Functions | |
| FXuint | execute (FXuint placement=PLACEMENT_CURSOR) |
| make execute private | |
| GNEPythonToolDialog (const GNEPythonToolDialog &)=delete | |
| Invalidated copy constructor. | |
| GNEPythonToolDialog & | operator= (const GNEPythonToolDialog &)=delete |
| Invalidated assignment operator. | |
Private Attributes | |
| FXVerticalFrame * | myArgumentFrameLeft = nullptr |
| argument frame left | |
| FXVerticalFrame * | myArgumentFrameRight = nullptr |
| argument frame right | |
| GNEApplicationWindow * | myGNEApp |
| pointer to GNEApplicationWindow | |
| FXCheckButton * | myGroupedCheckButton = nullptr |
| check button to enable/diasble grouping | |
| GNEPythonTool * | myPythonTool = nullptr |
| python tool | |
| MFXCheckableButton * | myShowToolTipsMenu = nullptr |
| menu for tooltips menu | |
| FXCheckButton * | mySortedCheckButton = nullptr |
| check button to enable/diasble sorting | |
Friends | |
| class | GNEPythonToolDialogElements |
| FOX-declaration. | |
Dialog for python tool dialog.
Definition at line 44 of file GNEPythonToolDialog.h.
| GNEPythonToolDialog::GNEPythonToolDialog | ( | GNEApplicationWindow * | GNEApp | ) |
Constructor.
Definition at line 62 of file GNEPythonToolDialog.cpp.
References ACCEPT, GUIDesigns::buildFXButton(), CANCEL, GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonAccept, GUIDesignButtonCancel, GUIDesignButtonConfiguration, GUIDesignButtonReset, GUIDesignCheckButton, GUIDesignContentsFrame, GUIDesignHorizontalFrame, GUIDesignHorizontalFrameNoPadding, GUIDesignLabelFixed, GUIDesignMFXCheckableButtonSquare, GUIDesignScrollWindow, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_GNE_BUTTON_CANCEL, MID_GNE_BUTTON_RESET, MID_GNE_BUTTON_RUN, MID_GNE_SET_ATTRIBUTE, MID_SHOWTOOLTIPS_MENU, OPEN, RESET, SAVE, SHOWTOOLTIPS_MENU, TL, and TOOL_PYTHON.
| GNEPythonToolDialog::~GNEPythonToolDialog | ( | ) |
destructor
Definition at line 108 of file GNEPythonToolDialog.cpp.
|
protected |
FOX needs this.
Definition at line 269 of file GNEPythonToolDialog.cpp.
|
privatedelete |
Invalidated copy constructor.
|
protected |
adjust parameter column
Definition at line 347 of file GNEPythonToolDialog.cpp.
References MARGIN, and myArguments.
Referenced by buildArguments().
|
protected |
build arguments
Definition at line 275 of file GNEPythonToolDialog.cpp.
References adjustParameterColumn(), getOptions(), getOptionsByCategories(), GNEPythonTool::getToolsOptions(), myArgumentFrameLeft, myArgumentFrameRight, myArguments, myCategories, and myPythonTool.
Referenced by onCmdLoad(), onCmdSetVisualization(), and openDialog().
|
privateinherited |
make execute private
Definition at line 128 of file MFXDialogBox.cpp.
|
protected |
get argument frame left
Definition at line 419 of file GNEPythonToolDialog.cpp.
References myArgumentFrameLeft.
|
protected |
get argument frame right
Definition at line 425 of file GNEPythonToolDialog.cpp.
References myArgumentFrameRight.
| GNEApplicationWindow * GNEPythonToolDialog::getGNEApplicationWindow | ( | ) | const |
get pointer to GNEApplicationWindow
Definition at line 144 of file GNEPythonToolDialog.cpp.
References myGNEApp.
|
protected |
get number of row colums
Definition at line 412 of file GNEPythonToolDialog.cpp.
References MAXNUMCOLUMNS, myArguments, and NUMROWSBYCOLUMN.
|
protected |
get options
Definition at line 365 of file GNEPythonToolDialog.cpp.
References GNEPythonToolDialog::CategoryOptions::addOption().
Referenced by buildArguments().
|
protected |
get options sorted by category
Definition at line 377 of file GNEPythonToolDialog.cpp.
Referenced by buildArguments().
| const GNEPythonTool * GNEPythonToolDialog::getPythonTool | ( | ) | const |
|
inherited |
called when accept button is pressed
Definition at line 93 of file MFXDialogBox.cpp.
References MFXDialogBox::myTesting.
Referenced by FXDEFMAP(), and GNEAllowVClassesDialog::onCmdAccept().
| long GNEPythonToolDialog::onCmdCancel | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
event after press cancel button
Definition at line 216 of file GNEPythonToolDialog.cpp.
Referenced by FXDEFMAP().
|
inherited |
event used in internal tests
Definition at line 115 of file MFXDialogBox.cpp.
References MFXDialogBox::runInternalTest().
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdLoad | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
load options
Definition at line 186 of file GNEPythonToolDialog.cpp.
References buildArguments(), GNEPythonTool::loadConfiguration(), myGroupedCheckButton, myPythonTool, mySortedCheckButton, and GNEApplicationWindowHelper::openOptionFileDialog().
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdReset | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
event after press reset button
Definition at line 224 of file GNEPythonToolDialog.cpp.
References myArguments.
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdRun | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
event after press run button
Definition at line 207 of file GNEPythonToolDialog.cpp.
References GNEPythonTool::getMenuCommand(), MID_GNE_RUNPYTHONTOOL, myGNEApp, and myPythonTool.
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdSave | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
save options
Definition at line 174 of file GNEPythonToolDialog.cpp.
References myPythonTool, GNEApplicationWindowHelper::openOptionFileDialog(), and GNEPythonTool::saveConfiguration().
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdSetVisualization | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
set visualization (sorting and grouping)
Definition at line 199 of file GNEPythonToolDialog.cpp.
References buildArguments(), myGroupedCheckButton, and mySortedCheckButton.
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onCmdShowToolTipsMenu | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
enable/disable show toolTip
Definition at line 156 of file GNEPythonToolDialog.cpp.
References MFXCheckableButton::amChecked(), MFXStaticToolTip::enableStaticToolTip(), GUIGlChildWindow::getShowToolTipsMenu(), GUIMainWindow::getStaticTooltipMenu(), GNEApplicationWindow::getViewNet(), GNEViewNet::getViewParent(), myGNEApp, myShowToolTipsMenu, and MFXCheckableButton::setChecked().
Referenced by FXDEFMAP().
| long GNEPythonToolDialog::onUpdRequiredAttributes | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | |||
| ) |
event for check if required attributes was set
Definition at line 234 of file GNEPythonToolDialog.cpp.
References myArguments.
Referenced by FXDEFMAP().
| void GNEPythonToolDialog::openDialog | ( | GNEPythonTool * | tool | ) |
open dialog
Definition at line 112 of file GNEPythonToolDialog.cpp.
References buildArguments(), GNEPythonTool::getToolName(), GUIDesignHeight, myArgumentFrameLeft, myGroupedCheckButton, myPythonTool, myShowToolTipsMenu, mySortedCheckButton, MFXCheckableButton::setChecked(), and GNEPythonTool::setCurrentValues().
|
inherited |
Run modal invocation of the dialog.
Definition at line 64 of file MFXDialogBox.cpp.
References InternalTest::getCurrentStep(), InternalTestStep::getModalDialogTestSteps(), and MFXDialogBox::myTesting.
Referenced by GNETLSEditorFrame::TLSAttributes::onCmdParametersDialog(), GNEAllowVClassesDialog::openDialog(), GNEFixElementsDialog::openFixDialog(), GNEOptionsDialog::Options(), and GNEOptionsDialog::Run().
|
privatedelete |
Invalidated assignment operator.
|
virtual |
run internal test
Reimplemented from MFXDialogBox.
Definition at line 138 of file GNEPythonToolDialog.cpp.
|
friend |
|
private |
argument frame left
Definition at line 171 of file GNEPythonToolDialog.h.
Referenced by buildArguments(), getArgumentFrameLeft(), and openDialog().
|
private |
argument frame right
Definition at line 174 of file GNEPythonToolDialog.h.
Referenced by buildArguments(), and getArgumentFrameRight().
|
protected |
list of arguments sorted by categories
Definition at line 152 of file GNEPythonToolDialog.h.
Referenced by adjustParameterColumn(), buildArguments(), getNumRowColums(), onCmdReset(), and onUpdRequiredAttributes().
|
protected |
list of categories
Definition at line 155 of file GNEPythonToolDialog.h.
Referenced by buildArguments().
|
protected |
custom tools options
Definition at line 134 of file GNEPythonToolDialog.h.
|
private |
pointer to GNEApplicationWindow
Definition at line 159 of file GNEPythonToolDialog.h.
Referenced by GNEPythonToolDialogElements::Argument::Argument(), GNEPythonToolDialogElements::EdgeVectorArgument::EdgeVectorArgument(), GNEPythonToolDialogElements::FileNameArgument::FileNameArgument(), getGNEApplicationWindow(), onCmdRun(), and onCmdShowToolTipsMenu().
|
private |
check button to enable/diasble grouping
Definition at line 168 of file GNEPythonToolDialog.h.
Referenced by onCmdLoad(), onCmdSetVisualization(), and openDialog().
|
private |
python tool
Definition at line 177 of file GNEPythonToolDialog.h.
Referenced by buildArguments(), getPythonTool(), onCmdLoad(), onCmdRun(), onCmdSave(), and openDialog().
|
private |
menu for tooltips menu
Definition at line 162 of file GNEPythonToolDialog.h.
Referenced by onCmdShowToolTipsMenu(), and openDialog().
|
private |
check button to enable/diasble sorting
Definition at line 165 of file GNEPythonToolDialog.h.
Referenced by onCmdLoad(), onCmdSetVisualization(), and openDialog().
|
protectedinherited |
flag to indicate if this dialog is being tested using internal test
Definition at line 66 of file MFXDialogBox.h.
Referenced by MFXDialogBox::onCmdAccept(), MFXDialogBox::onCmdCancel(), and MFXDialogBox::openModalDialog().