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

Abstract dialog for tools. More...

#include <GNERunPythonToolDialog.h>

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

Public Member Functions

GNEApplicationWindowgetGNEApp () const
 get to GNEApplicationWindow
 
 GNERunPythonToolDialog (GNEApplicationWindow *GNEApp)
 FOX-declaration.
 
void runTool (GNEPythonTool *tool)
 run tool (this open windows)
 
 ~GNERunPythonToolDialog ()
 destructor
 
FOX-callbacks
long onCmdSaveLog (FXObject *, FXSelector, void *)
 event after press save button
 
long onCmdAbort (FXObject *, FXSelector, void *)
 event after press abort button
 
long onCmdRerun (FXObject *, FXSelector, void *)
 event after press rerun button
 
long onCmdBack (FXObject *, FXSelector, void *)
 event after press back button
 
long onCmdClose (FXObject *, FXSelector, void *)
 event after press close button
 
long onThreadEvent (FXObject *, FXSelector, void *)
 called when the thread signals an event
 

Protected Member Functions

 GNERunPythonToolDialog ()
 FOX needs this.
 
void updateDialog ()
 update toolDialog
 

Private Member Functions

 GNERunPythonToolDialog (const GNERunPythonToolDialog &)=delete
 Invalidated copy constructor.
 
GNERunPythonToolDialogoperator= (const GNERunPythonToolDialog &)=delete
 Invalidated assignment operator.
 

Private Attributes

FXButton * myAbortButton = nullptr
 abort button
 
FXButton * myBackButton = nullptr
 back button
 
FXButton * myCloseButton = nullptr
 close button
 
MFXSynchQue< GUIEvent * > myEvents
 List of received events.
 
GNEApplicationWindowmyGNEApp
 pointer to GNEApplicationWindow
 
GNEPythonToolmyPythonTool = nullptr
 tool
 
FXButton * myRerunButton = nullptr
 rerun button
 
GNERunPythonToolmyRunTool = nullptr
 thread for running tool
 
FXText * myText = nullptr
 text
 
FXEX::MFXThreadEvent myThreadEvent
 io-event with the runner thread
 

Detailed Description

Abstract dialog for tools.

Definition at line 44 of file GNERunPythonToolDialog.h.

Constructor & Destructor Documentation

◆ GNERunPythonToolDialog() [1/3]

◆ ~GNERunPythonToolDialog()

GNERunPythonToolDialog::~GNERunPythonToolDialog ( )

destructor

Definition at line 103 of file GNERunPythonToolDialog.cpp.

◆ GNERunPythonToolDialog() [2/3]

GNERunPythonToolDialog::GNERunPythonToolDialog ( )
protected

FOX needs this.

Definition at line 242 of file GNERunPythonToolDialog.cpp.

◆ GNERunPythonToolDialog() [3/3]

GNERunPythonToolDialog::GNERunPythonToolDialog ( const GNERunPythonToolDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ getGNEApp()

GNEApplicationWindow * GNERunPythonToolDialog::getGNEApp ( ) const

get to GNEApplicationWindow

Definition at line 107 of file GNERunPythonToolDialog.cpp.

References myGNEApp.

◆ onCmdAbort()

long GNERunPythonToolDialog::onCmdAbort ( FXObject *  ,
FXSelector  ,
void *   
)

event after press abort button

Definition at line 163 of file GNERunPythonToolDialog.cpp.

References GNERunPythonTool::abortTool(), and myRunTool.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdBack()

long GNERunPythonToolDialog::onCmdBack ( FXObject *  ,
FXSelector  ,
void *   
)

event after press back button

Definition at line 185 of file GNERunPythonToolDialog.cpp.

References GNEPythonTool::getMenuCommand(), MID_GNE_OPENPYTHONTOOLDIALOG, myGNEApp, myPythonTool, and onCmdClose().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdClose()

long GNERunPythonToolDialog::onCmdClose ( FXObject *  obj,
FXSelector  ,
void *   
)

event after press close button

Definition at line 193 of file GNERunPythonToolDialog.cpp.

References GNERunPythonTool::abortTool(), GNEPythonTool::getMenuCommand(), MID_GNE_POSTPROCESSINGPYTHONTOOL, myCloseButton, myGNEApp, myPythonTool, and myRunTool.

Referenced by FXDEFMAP(), and onCmdBack().

Here is the caller graph for this function:

◆ onCmdRerun()

long GNERunPythonToolDialog::onCmdRerun ( FXObject *  ,
FXSelector  ,
void *   
)

event after press rerun button

Definition at line 171 of file GNERunPythonToolDialog.cpp.

References myPythonTool, myRunTool, myText, and GNERunPythonTool::runTool().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSaveLog()

long GNERunPythonToolDialog::onCmdSaveLog ( FXObject *  ,
FXSelector  ,
void *   
)

event after press save button

Definition at line 149 of file GNERunPythonToolDialog.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), myText, and GNEApplicationWindowHelper::saveToolLog().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onThreadEvent()

long GNERunPythonToolDialog::onThreadEvent ( FXObject *  ,
FXSelector  ,
void *   
)

called when the thread signals an event

Definition at line 207 of file GNERunPythonToolDialog.cpp.

References MFXSynchQue< T, Container >::empty(), ERROR_OCCURRED, GUIEvent_Message::getMsg(), GUIEvent::getOwnType(), MESSAGE_OCCURRED, myEvents, myText, OUTPUT_OCCURRED, MFXSynchQue< T, Container >::pop(), TOOL_ENDED, MFXSynchQue< T, Container >::top(), and updateDialog().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ runTool()

void GNERunPythonToolDialog::runTool ( GNEPythonTool tool)

run tool (this open windows)

Definition at line 113 of file GNERunPythonToolDialog.cpp.

References GNEPythonTool::getToolName(), myPythonTool, myRunTool, myText, and GNERunPythonTool::runTool().

◆ updateDialog()

void GNERunPythonToolDialog::updateDialog ( )
protected

update toolDialog

Definition at line 130 of file GNERunPythonToolDialog.cpp.

References GNERunPythonTool::isRunning(), myAbortButton, myBackButton, myCloseButton, myRerunButton, and myRunTool.

Referenced by onThreadEvent().

Here is the caller graph for this function:

Field Documentation

◆ myAbortButton

FXButton* GNERunPythonToolDialog::myAbortButton = nullptr
private

abort button

Definition at line 104 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myBackButton

FXButton* GNERunPythonToolDialog::myBackButton = nullptr
private

back button

Definition at line 110 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myCloseButton

FXButton* GNERunPythonToolDialog::myCloseButton = nullptr
private

close button

Definition at line 113 of file GNERunPythonToolDialog.h.

Referenced by onCmdClose(), and updateDialog().

◆ myEvents

MFXSynchQue<GUIEvent*> GNERunPythonToolDialog::myEvents
private

List of received events.

Definition at line 116 of file GNERunPythonToolDialog.h.

Referenced by onThreadEvent().

◆ myGNEApp

GNEApplicationWindow* GNERunPythonToolDialog::myGNEApp
private

pointer to GNEApplicationWindow

Definition at line 92 of file GNERunPythonToolDialog.h.

Referenced by getGNEApp(), onCmdBack(), and onCmdClose().

◆ myPythonTool

GNEPythonTool* GNERunPythonToolDialog::myPythonTool = nullptr
private

tool

Definition at line 95 of file GNERunPythonToolDialog.h.

Referenced by onCmdBack(), onCmdClose(), onCmdRerun(), and runTool().

◆ myRerunButton

FXButton* GNERunPythonToolDialog::myRerunButton = nullptr
private

rerun button

Definition at line 107 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myRunTool

GNERunPythonTool* GNERunPythonToolDialog::myRunTool = nullptr
private

thread for running tool

Definition at line 98 of file GNERunPythonToolDialog.h.

Referenced by onCmdAbort(), onCmdClose(), onCmdRerun(), runTool(), and updateDialog().

◆ myText

FXText* GNERunPythonToolDialog::myText = nullptr
private

text

Definition at line 101 of file GNERunPythonToolDialog.h.

Referenced by onCmdRerun(), onCmdSaveLog(), onThreadEvent(), and runTool().

◆ myThreadEvent

FXEX::MFXThreadEvent GNERunPythonToolDialog::myThreadEvent
private

io-event with the runner thread

Definition at line 119 of file GNERunPythonToolDialog.h.


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