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

#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 runInternalTest (const InternalTestStep::DialogTest *modalArguments)
 run internal test
 
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.
 
FXuint openModalDialog (InternalTest *internalTests, FXuint placement=PLACEMENT_CURSOR)
 Run modal invocation of the dialog.
 
void updateDialog ()
 update toolDialog
 
FOX-callbacks
long onCmdAccept (FXObject *, FXSelector, void *)
 called when accept button is pressed
 
long onCmdCancel (FXObject *, FXSelector, void *)
 called when cancel button is pressed (or dialog is closed)
 
long onCmdInternalTest (FXObject *, FXSelector, void *ptr)
 event used in internal tests
 

Protected Attributes

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
 
 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

Definition at line 41 of file GNERunPythonToolDialog.h.

Constructor & Destructor Documentation

◆ GNERunPythonToolDialog() [1/3]

◆ ~GNERunPythonToolDialog()

GNERunPythonToolDialog::~GNERunPythonToolDialog ( )

destructor

Definition at line 107 of file GNERunPythonToolDialog.cpp.

◆ GNERunPythonToolDialog() [2/3]

GNERunPythonToolDialog::GNERunPythonToolDialog ( )
protected

FOX needs this.

Definition at line 252 of file GNERunPythonToolDialog.cpp.

◆ GNERunPythonToolDialog() [3/3]

GNERunPythonToolDialog::GNERunPythonToolDialog ( const GNERunPythonToolDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ execute()

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

make execute private

Definition at line 128 of file MFXDialogBox.cpp.

◆ getGNEApp()

GNEApplicationWindow * GNERunPythonToolDialog::getGNEApp ( ) const

get to GNEApplicationWindow

Definition at line 117 of file GNERunPythonToolDialog.cpp.

References myGNEApp.

◆ onCmdAbort()

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

event after press abort button

Definition at line 173 of file GNERunPythonToolDialog.cpp.

References GNERunPythonTool::abortTool(), and myRunTool.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ 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:

◆ onCmdBack()

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

event after press back button

Definition at line 195 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:

◆ onCmdCancel()

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

called when cancel button is pressed (or dialog is closed)

Definition at line 104 of file MFXDialogBox.cpp.

References MFXDialogBox::myTesting.

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

Here is the caller graph for this function:

◆ onCmdClose()

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

event after press close button

Definition at line 203 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:

◆ 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:

◆ onCmdRerun()

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

event after press rerun button

Definition at line 181 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 159 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 217 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:

◆ 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=()

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

Invalidated assignment operator.

◆ runInternalTest()

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

run internal test

Reimplemented from MFXDialogBox.

Definition at line 111 of file GNERunPythonToolDialog.cpp.

◆ runTool()

void GNERunPythonToolDialog::runTool ( GNEPythonTool tool)

run tool (this open windows)

Definition at line 123 of file GNERunPythonToolDialog.cpp.

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

◆ updateDialog()

void GNERunPythonToolDialog::updateDialog ( )
protected

update toolDialog

Definition at line 140 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 105 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myBackButton

FXButton* GNERunPythonToolDialog::myBackButton = nullptr
private

back button

Definition at line 111 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myCloseButton

FXButton* GNERunPythonToolDialog::myCloseButton = nullptr
private

close button

Definition at line 114 of file GNERunPythonToolDialog.h.

Referenced by onCmdClose(), and updateDialog().

◆ myEvents

MFXSynchQue<GUIEvent*> GNERunPythonToolDialog::myEvents
private

List of received events.

Definition at line 117 of file GNERunPythonToolDialog.h.

Referenced by onThreadEvent().

◆ myGNEApp

GNEApplicationWindow* GNERunPythonToolDialog::myGNEApp
private

pointer to GNEApplicationWindow

Definition at line 93 of file GNERunPythonToolDialog.h.

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

◆ myPythonTool

GNEPythonTool* GNERunPythonToolDialog::myPythonTool = nullptr
private

tool

Definition at line 96 of file GNERunPythonToolDialog.h.

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

◆ myRerunButton

FXButton* GNERunPythonToolDialog::myRerunButton = nullptr
private

rerun button

Definition at line 108 of file GNERunPythonToolDialog.h.

Referenced by updateDialog().

◆ myRunTool

GNERunPythonTool* GNERunPythonToolDialog::myRunTool = nullptr
private

thread for running tool

Definition at line 99 of file GNERunPythonToolDialog.h.

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

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

◆ myText

FXText* GNERunPythonToolDialog::myText = nullptr
private

text

Definition at line 102 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 120 of file GNERunPythonToolDialog.h.


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