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

GNEApplicationWindow * getGNEApplicationWindow () const
 get pointer to GNEApplicationWindow
 
const GNEPythonTool * getPythonTool () const
 get python tool
 
 GNEPythonToolDialog (GNEApplicationWindow *GNEApp)
 Constructor.
 
void openDialog (GNEPythonTool *tool)
 open dialog
 
 ~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.
 

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
 

Private Member Functions

 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.
 

Detailed Description

Dialog for python tool dialog.

Definition at line 43 of file GNEPythonToolDialog.h.

Constructor & Destructor Documentation

◆ GNEPythonToolDialog() [1/3]

◆ ~GNEPythonToolDialog()

GNEPythonToolDialog::~GNEPythonToolDialog ( )

destructor

Definition at line 104 of file GNEPythonToolDialog.cpp.

◆ GNEPythonToolDialog() [2/3]

GNEPythonToolDialog::GNEPythonToolDialog ( )
protected

FOX needs this.

Definition at line 259 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 337 of file GNEPythonToolDialog.cpp.

References MARGING, 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 265 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:

◆ getArgumentFrameLeft()

FXVerticalFrame * GNEPythonToolDialog::getArgumentFrameLeft ( ) const
protected

get argument frame left

Definition at line 409 of file GNEPythonToolDialog.cpp.

References myArgumentFrameLeft.

◆ getArgumentFrameRight()

FXVerticalFrame * GNEPythonToolDialog::getArgumentFrameRight ( ) const
protected

get argument frame right

Definition at line 415 of file GNEPythonToolDialog.cpp.

References myArgumentFrameRight.

◆ getGNEApplicationWindow()

GNEApplicationWindow * GNEPythonToolDialog::getGNEApplicationWindow ( ) const

get pointer to GNEApplicationWindow

Definition at line 134 of file GNEPythonToolDialog.cpp.

References myGNEApp.

◆ getNumRowColums()

int GNEPythonToolDialog::getNumRowColums ( ) const
protected

get number of row colums

Definition at line 402 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 355 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 367 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 140 of file GNEPythonToolDialog.cpp.

References myPythonTool.

◆ onCmdCancel()

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

event after press cancel button

Definition at line 206 of file GNEPythonToolDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdLoad()

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

load options

Definition at line 176 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 214 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 197 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 164 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 189 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 146 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 224 of file GNEPythonToolDialog.cpp.

References myArguments.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ openDialog()

◆ operator=()

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

Invalidated assignment operator.

Friends And Related Symbol Documentation

◆ GNEPythonToolDialogElements

FOX-declaration.

declare friend class

Definition at line 48 of file GNEPythonToolDialog.h.

Field Documentation

◆ myArgumentFrameLeft

FXVerticalFrame* GNEPythonToolDialog::myArgumentFrameLeft = nullptr
private

argument frame left

Definition at line 167 of file GNEPythonToolDialog.h.

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

◆ myArgumentFrameRight

FXVerticalFrame* GNEPythonToolDialog::myArgumentFrameRight = nullptr
private

argument frame right

Definition at line 170 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 148 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 151 of file GNEPythonToolDialog.h.

Referenced by buildArguments().

◆ myCustomToolsOptions

OptionsCont GNEPythonToolDialog::myCustomToolsOptions
protected

custom tools options

Definition at line 130 of file GNEPythonToolDialog.h.

◆ myGNEApp

◆ myGroupedCheckButton

FXCheckButton* GNEPythonToolDialog::myGroupedCheckButton = nullptr
private

check button to enable/diasble grouping

Definition at line 164 of file GNEPythonToolDialog.h.

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

◆ myPythonTool

GNEPythonTool* GNEPythonToolDialog::myPythonTool = nullptr
private

python tool

Definition at line 173 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 158 of file GNEPythonToolDialog.h.

Referenced by onCmdShowToolTipsMenu(), and openDialog().

◆ mySortedCheckButton

FXCheckButton* GNEPythonToolDialog::mySortedCheckButton = nullptr
private

check button to enable/diasble sorting

Definition at line 161 of file GNEPythonToolDialog.h.

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


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