Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEPythonToolDialog Class Reference

Dialog for python tool dialog. More...

#include <GNEPythonToolDialog.h>

Inheritance diagram for GNEPythonToolDialog:
[legend]
Collaboration diagram for GNEPythonToolDialog:
[legend]

Data Structures

class  CategoryOptions
 internal class used for sorting options by categories More...
 

Public Member Functions

GNEApplicationWindowgetGNEApplicationWindow () const
 get pointer to GNEApplicationWindow
 
const GNEPythonToolgetPythonTool () 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::CategoryOptionsgetOptions (OptionsCont &optionsCont) const
 get options
 
std::vector< CategoryOptionsgetOptionsByCategories (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.
 
GNEPythonToolDialogoperator= (const GNEPythonToolDialog &)=delete
 Invalidated assignment operator.
 

Private Attributes

FXVerticalFrame * myArgumentFrameLeft = nullptr
 argument frame left
 
FXVerticalFrame * myArgumentFrameRight = nullptr
 argument frame right
 
GNEApplicationWindowmyGNEApp
 pointer to GNEApplicationWindow
 
FXCheckButton * myGroupedCheckButton = nullptr
 check button to enable/diasble grouping
 
GNEPythonToolmyPythonTool = nullptr
 python tool
 
MFXCheckableButtonmyShowToolTipsMenu = nullptr
 menu for tooltips menu
 
FXCheckButton * mySortedCheckButton = nullptr
 check button to enable/diasble sorting
 

Friends

class GNEPythonToolDialogElements
 FOX-declaration.
 

Detailed Description

Dialog for python tool dialog.

Definition at line 44 of file GNEPythonToolDialog.h.

Constructor & Destructor Documentation

◆ GNEPythonToolDialog() [1/3]

◆ ~GNEPythonToolDialog()

GNEPythonToolDialog::~GNEPythonToolDialog ( )

destructor

Definition at line 108 of file GNEPythonToolDialog.cpp.

◆ GNEPythonToolDialog() [2/3]

GNEPythonToolDialog::GNEPythonToolDialog ( )
protected

FOX needs this.

Definition at line 269 of file GNEPythonToolDialog.cpp.

◆ GNEPythonToolDialog() [3/3]

GNEPythonToolDialog::GNEPythonToolDialog ( const GNEPythonToolDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ adjustParameterColumn()

void GNEPythonToolDialog::adjustParameterColumn ( )
protected

adjust parameter column

Definition at line 347 of file GNEPythonToolDialog.cpp.

References MARGIN, and myArguments.

Referenced by buildArguments().

Here is the caller graph for this function:

◆ buildArguments()

void GNEPythonToolDialog::buildArguments ( bool  sortByName,
bool  groupedByCategories 
)
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().

Here is the caller graph for this function:

◆ execute()

FXuint MFXDialogBox::execute ( FXuint  placement = PLACEMENT_CURSOR)
privateinherited

make execute private

Definition at line 128 of file MFXDialogBox.cpp.

◆ getArgumentFrameLeft()

FXVerticalFrame * GNEPythonToolDialog::getArgumentFrameLeft ( ) const
protected

get argument frame left

Definition at line 419 of file GNEPythonToolDialog.cpp.

References myArgumentFrameLeft.

◆ getArgumentFrameRight()

FXVerticalFrame * GNEPythonToolDialog::getArgumentFrameRight ( ) const
protected

get argument frame right

Definition at line 425 of file GNEPythonToolDialog.cpp.

References myArgumentFrameRight.

◆ getGNEApplicationWindow()

GNEApplicationWindow * GNEPythonToolDialog::getGNEApplicationWindow ( ) const

get pointer to GNEApplicationWindow

Definition at line 144 of file GNEPythonToolDialog.cpp.

References myGNEApp.

◆ getNumRowColums()

int GNEPythonToolDialog::getNumRowColums ( ) const
protected

get number of row colums

Definition at line 412 of file GNEPythonToolDialog.cpp.

References MAXNUMCOLUMNS, myArguments, and NUMROWSBYCOLUMN.

◆ getOptions()

std::vector< GNEPythonToolDialog::CategoryOptions > GNEPythonToolDialog::getOptions ( OptionsCont optionsCont) const
protected

get options

Definition at line 365 of file GNEPythonToolDialog.cpp.

References GNEPythonToolDialog::CategoryOptions::addOption().

Referenced by buildArguments().

Here is the caller graph for this function:

◆ getOptionsByCategories()

std::vector< GNEPythonToolDialog::CategoryOptions > GNEPythonToolDialog::getOptionsByCategories ( OptionsCont optionsCont) const
protected

get options sorted by category

Definition at line 377 of file GNEPythonToolDialog.cpp.

Referenced by buildArguments().

Here is the caller graph for this function:

◆ getPythonTool()

const GNEPythonTool * GNEPythonToolDialog::getPythonTool ( ) const

get python tool

Definition at line 150 of file GNEPythonToolDialog.cpp.

References myPythonTool.

◆ onCmdAccept()

long MFXDialogBox::onCmdAccept ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

called when accept button is pressed

Definition at line 93 of file MFXDialogBox.cpp.

References MFXDialogBox::myTesting.

Referenced by FXDEFMAP(), and GNEAllowVClassesDialog::onCmdAccept().

Here is the caller graph for this function:

◆ onCmdCancel()

long GNEPythonToolDialog::onCmdCancel ( FXObject *  ,
FXSelector  ,
void *   
)

event after press cancel button

Definition at line 216 of file GNEPythonToolDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdInternalTest()

long MFXDialogBox::onCmdInternalTest ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

event used in internal tests

Definition at line 115 of file MFXDialogBox.cpp.

References MFXDialogBox::runInternalTest().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdLoad()

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().

Here is the caller graph for this function:

◆ onCmdReset()

long GNEPythonToolDialog::onCmdReset ( FXObject *  ,
FXSelector  ,
void *   
)

event after press reset button

Definition at line 224 of file GNEPythonToolDialog.cpp.

References myArguments.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdRun()

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().

Here is the caller graph for this function:

◆ onCmdSave()

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().

Here is the caller graph for this function:

◆ onCmdSetVisualization()

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().

Here is the caller graph for this function:

◆ onCmdShowToolTipsMenu()

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().

Here is the caller graph for this function:

◆ onUpdRequiredAttributes()

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().

Here is the caller graph for this function:

◆ openDialog()

◆ openModalDialog()

FXuint MFXDialogBox::openModalDialog ( InternalTest internalTests,
FXuint  placement = PLACEMENT_CURSOR 
)
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().

Here is the caller graph for this function:

◆ operator=()

GNEPythonToolDialog & GNEPythonToolDialog::operator= ( const GNEPythonToolDialog )
privatedelete

Invalidated assignment operator.

◆ runInternalTest()

void GNEPythonToolDialog::runInternalTest ( const InternalTestStep::DialogTest modalArguments)
virtual

run internal test

Reimplemented from MFXDialogBox.

Definition at line 138 of file GNEPythonToolDialog.cpp.

Friends And Related Symbol Documentation

◆ GNEPythonToolDialogElements

FOX-declaration.

declare friend class

Definition at line 49 of file GNEPythonToolDialog.h.

Field Documentation

◆ myArgumentFrameLeft

FXVerticalFrame* GNEPythonToolDialog::myArgumentFrameLeft = nullptr
private

argument frame left

Definition at line 171 of file GNEPythonToolDialog.h.

Referenced by buildArguments(), getArgumentFrameLeft(), and openDialog().

◆ myArgumentFrameRight

FXVerticalFrame* GNEPythonToolDialog::myArgumentFrameRight = nullptr
private

argument frame right

Definition at line 174 of file GNEPythonToolDialog.h.

Referenced by buildArguments(), and getArgumentFrameRight().

◆ myArguments

std::vector<GNEPythonToolDialogElements::Argument*> GNEPythonToolDialog::myArguments
protected

list of arguments sorted by categories

Definition at line 152 of file GNEPythonToolDialog.h.

Referenced by adjustParameterColumn(), buildArguments(), getNumRowColums(), onCmdReset(), and onUpdRequiredAttributes().

◆ myCategories

std::vector<GNEPythonToolDialogElements::Category*> GNEPythonToolDialog::myCategories
protected

list of categories

Definition at line 155 of file GNEPythonToolDialog.h.

Referenced by buildArguments().

◆ myCustomToolsOptions

OptionsCont GNEPythonToolDialog::myCustomToolsOptions
protected

custom tools options

Definition at line 134 of file GNEPythonToolDialog.h.

◆ myGNEApp

◆ myGroupedCheckButton

FXCheckButton* GNEPythonToolDialog::myGroupedCheckButton = nullptr
private

check button to enable/diasble grouping

Definition at line 168 of file GNEPythonToolDialog.h.

Referenced by onCmdLoad(), onCmdSetVisualization(), and openDialog().

◆ myPythonTool

GNEPythonTool* GNEPythonToolDialog::myPythonTool = nullptr
private

python tool

Definition at line 177 of file GNEPythonToolDialog.h.

Referenced by buildArguments(), getPythonTool(), onCmdLoad(), onCmdRun(), onCmdSave(), and openDialog().

◆ myShowToolTipsMenu

MFXCheckableButton* GNEPythonToolDialog::myShowToolTipsMenu = nullptr
private

menu for tooltips menu

Definition at line 162 of file GNEPythonToolDialog.h.

Referenced by onCmdShowToolTipsMenu(), and openDialog().

◆ mySortedCheckButton

FXCheckButton* GNEPythonToolDialog::mySortedCheckButton = nullptr
private

check button to enable/diasble sorting

Definition at line 165 of file GNEPythonToolDialog.h.

Referenced by onCmdLoad(), onCmdSetVisualization(), and openDialog().

◆ myTesting

bool MFXDialogBox::myTesting = false
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().


The documentation for this class was generated from the following files: