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

#include <GNECrashDialog.h>

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

Public Types

basic dialog type
enum class  Buttons {
  OK , YES_NO , YES_NO_CANCEL , ACCEPT ,
  ACCEPT_CANCEL , ACCEPT_CANCEL_RESET , SAVE_DONTSAVE_CANCEL , RUN_CANCEL_RESET ,
  RUN_ADVANCED_CANCEL , RERUN_BACK_CLOSE , OK_COPY_REPORT
}
 
enum class  OpenType { MODAL , NON_MODAL }
 Open dialog type. More...
 

Public Member Functions

 GNECrashDialog (GNEApplicationWindow *applicationWindow, const ProcessError &processError)
 Constructor.
 
long onClipboardRequest (FXObject *sender, FXSelector sel, void *ptr)
 called when clipboard is request
 
long onCmdCopy (FXObject *, FXSelector, void *)
 called when copy button is pressed
 
long onCmdReport (FXObject *, FXSelector, void *)
 called when report button is pressed
 
void runInternalTest (const InternalTestStep::DialogArgument *dialogArgument)
 run internal test
 
 ~GNECrashDialog ()
 Destructor.
 
FOX-callbacks
virtual long onCmdAccept (FXObject *, FXSelector, void *)
 called when accept or yes button is pressed (can be reimplemented in children)
 
virtual long onCmdCancel (FXObject *, FXSelector, void *)
 called when cancel or no button is pressed (can be reimplemented in children)
 
virtual long onCmdAbort (FXObject *, FXSelector, void *)
 called when abort is called either closing dialog or pressing abort button (can be reimplemented in children)
 
virtual long onCmdReset (FXObject *, FXSelector, void *)
 called when reset button is pressed (must be reimplemented in children depending of Buttons)
 
virtual long onCmdRun (FXObject *, FXSelector, void *)
 called when run button is pressed (must be reimplemented in children depending of Buttons)
 
virtual long onCmdBack (FXObject *, FXSelector, void *)
 called when back button is pressed (must be reimplemented in children depending of Buttons)
 
virtual long onCmdAdvanced (FXObject *, FXSelector, void *)
 called when advanced button is pressed (must be reimplemented in children depending of Buttons)
 
long onKeyPress (FXObject *obj, FXSelector sel, void *ptr)
 called when user presses a key on the dialog
 
long onKeyRelease (FXObject *obj, FXSelector sel, void *ptr)
 called when user releases a key on the dialog
 

Protected Member Functions

long closeDialogAborting ()
 close dialog aborting the changes
 
long closeDialogAccepting ()
 close dialog accepting the changes
 
long closeDialogCanceling ()
 close dialog declining the changes
 
 FOX_CONSTRUCTOR (GNECrashDialog)
 FOX needs this.
 
void openDialog (FXWindow *focusableElement=nullptr)
 open dialog
 
void updateIcon (GUIIcon newIcon)
 update icon
 
void updateTitle (const std::string &newTitle)
 update title
 

Protected Attributes

FXButton * myAbortButton = nullptr
 abort button
 
FXButton * myAcceptButton = nullptr
 accept button
 
FXButton * myAdvancedButton = nullptr
 advanced button
 
GNEApplicationWindowmyApplicationWindow = nullptr
 FOX needs this.
 
FXButton * myBackButton = nullptr
 back button
 
FXButton * myCancelButton = nullptr
 cancel button
 
FXVerticalFrame * myContentFrame = nullptr
 content frame
 
FXButton * myCopyButton = nullptr
 copy button
 
MFXTextFieldIconmyExceptionTextField = nullptr
 exception text field
 
FXButton * myReportButton = nullptr
 report button
 
FXButton * myResetButton = nullptr
 reset button
 
Result myResult = Result::CANCEL
 result to indicate if this dialog was closed accepting or rejecting changes
 
FXButton * myRunButton = nullptr
 run button
 
std::string myTraceText
 trace text
 
DialogType myType = DialogType::DEFAULT
 dialog type
 

Private Member Functions

void buildDialog (GUIIcon titleIcon, Buttons buttons)
 build dialog
 
 GNECrashDialog (const GNECrashDialog &)=delete
 Invalidated copy constructor.
 
GNECrashDialogoperator= (const GNECrashDialog &src)=delete
 Invalidated assignment operator.
 

Private Attributes

FXButton * myFocusButton = nullptr
 focus button, used for focusing the default button when dialog is opened
 
OpenType myOpenType
 open type
 
bool myTesting = false
 flag to indicate if this dialog is being tested using internal test
 

Resize mode

Result getResult () const
 get result to indicate if this dialog was closed accepting or rejecting changes
 
GNEApplicationWindowgetApplicationWindow () const
 get pointer to the application window
 
FXVerticalFrame * getContentFrame () const
 get content frame
 
enum class  ResizeMode { STATIC , RESIZABLE }
 
enum class  Result {
  ACCEPT , CANCEL , ABORT , ACCEPT_ALL ,
  CANCEL_ALL
}
 list of possible results when closing the dialog More...
 

Detailed Description

Definition at line 37 of file GNECrashDialog.h.

Member Enumeration Documentation

◆ Buttons

enum class GNEDialog::Buttons
stronginherited
Enumerator
OK 
YES_NO 
YES_NO_CANCEL 
ACCEPT 
ACCEPT_CANCEL 
ACCEPT_CANCEL_RESET 
SAVE_DONTSAVE_CANCEL 
RUN_CANCEL_RESET 
RUN_ADVANCED_CANCEL 
RERUN_BACK_CLOSE 
OK_COPY_REPORT 

Definition at line 43 of file GNEDialog.h.

◆ OpenType

enum class GNEDialog::OpenType
stronginherited

Open dialog type.

Enumerator
MODAL 
NON_MODAL 

Definition at line 58 of file GNEDialog.h.

◆ ResizeMode

enum class GNEDialog::ResizeMode
stronginherited
Enumerator
STATIC 
RESIZABLE 

Definition at line 64 of file GNEDialog.h.

◆ Result

enum class GNEDialog::Result
stronginherited

list of possible results when closing the dialog

Enumerator
ACCEPT 
CANCEL 
ABORT 
ACCEPT_ALL 
CANCEL_ALL 

Definition at line 70 of file GNEDialog.h.

Constructor & Destructor Documentation

◆ GNECrashDialog() [1/2]

GNECrashDialog::GNECrashDialog ( GNEApplicationWindow applicationWindow,
const ProcessError processError 
)

Constructor.

Definition at line 56 of file GNECrashDialog.cpp.

References EMPTY, GUIDesignLabel, GUIDesignTextField, and TL.

◆ ~GNECrashDialog()

GNECrashDialog::~GNECrashDialog ( )

Destructor.

Definition at line 82 of file GNECrashDialog.cpp.

◆ GNECrashDialog() [2/2]

GNECrashDialog::GNECrashDialog ( const GNECrashDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ buildDialog()

◆ closeDialogAborting()

long GNEDialog::closeDialogAborting ( )
protectedinherited

close dialog aborting the changes

Definition at line 281 of file GNEDialog.cpp.

References GNEDialog::ABORT, GNEDialog::MODAL, GNEDialog::myApplicationWindow, GNEDialog::myOpenType, GNEDialog::myResult, and GNEDialog::myTesting.

Referenced by GNEOverwriteElement::onCmdAbort(), GNETemplateElementDialog< T >::onCmdAbort(), GNEDialog::onCmdAbort(), and GNEDialog::onKeyPress().

Here is the caller graph for this function:

◆ closeDialogAccepting()

long GNEDialog::closeDialogAccepting ( )
protectedinherited

◆ closeDialogCanceling()

◆ FOX_CONSTRUCTOR()

GNECrashDialog::FOX_CONSTRUCTOR ( GNECrashDialog  )
protected

FOX needs this.

◆ getApplicationWindow()

◆ getContentFrame()

FXVerticalFrame * GNEDialog::getContentFrame ( ) const
inherited

get content frame

Definition at line 108 of file GNEDialog.cpp.

References GNEDialog::myContentFrame.

Referenced by GNEVClassesDialog::GNEVClassesDialog().

Here is the caller graph for this function:

◆ getResult()

GNEDialog::Result GNEDialog::getResult ( ) const
inherited

get result to indicate if this dialog was closed accepting or rejecting changes

Definition at line 96 of file GNEDialog.cpp.

References GNEDialog::myResult.

Referenced by GNEDataHandler::checkDuplicatedDataSet(), GNEMeanDataHandler::checkDuplicatedMeanDataElement(), GNEAdditionalHandler::checkElement(), GNERouteHandler::checkElement(), and GNEDistributionFrame::DistributionValuesEditor::onCmdAddRow().

Here is the caller graph for this function:

◆ onClipboardRequest()

long GNECrashDialog::onClipboardRequest ( FXObject *  sender,
FXSelector  sel,
void *  ptr 
)

called when clipboard is request

Definition at line 113 of file GNECrashDialog.cpp.

References myTraceText.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdAbort()

long GNEDialog::onCmdAbort ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

called when abort is called either closing dialog or pressing abort button (can be reimplemented in children)

Reimplemented in GNEOverwriteElement, GNETemplateElementDialog< T >, GNETemplateElementDialog< elementDialogType >, GNETemplateElementDialog< GNEAdditional >, GNETemplateElementDialog< GNEAttributeCarrier >, GNETemplateElementDialog< GNEDemandElement >, GNERunDialog, GNERunNetgenerateDialog, and GNERunPythonToolDialog.

Definition at line 126 of file GNEDialog.cpp.

References GNEDialog::closeDialogAborting().

Referenced by FXDEFMAP(), and GNEDialog::openDialog().

Here is the caller graph for this function:

◆ onCmdAccept()

◆ onCmdAdvanced()

long GNEDialog::onCmdAdvanced ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

called when advanced button is pressed (must be reimplemented in children depending of Buttons)

Reimplemented in GNENetgenerateDialog.

Definition at line 150 of file GNEDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdBack()

long GNEDialog::onCmdBack ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

called when back button is pressed (must be reimplemented in children depending of Buttons)

Reimplemented in GNERunNetgenerateDialog, GNERunPythonToolDialog, GNERunNetgenerateDialog, GNERunPythonToolDialog, and GNERunDialog.

Definition at line 144 of file GNEDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCancel()

long GNEDialog::onCmdCancel ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

called when cancel or no button is pressed (can be reimplemented in children)

Reimplemented in GNEOverwriteElement, GNETemplateElementDialog< T >, GNETemplateElementDialog< elementDialogType >, GNETemplateElementDialog< GNEAdditional >, GNETemplateElementDialog< GNEAttributeCarrier >, GNETemplateElementDialog< GNEDemandElement >, GNEFilePathDialog, GNESaveDialog, GNEVClassesDialog, GNENeteditOptionsDialog, GNENetgenerateOptionsDialog, GNESumoOptionsDialog, GNERunNetgenerateDialog, GNERunPythonToolDialog, and GNEGeometryPointDialog.

Definition at line 120 of file GNEDialog.cpp.

References GNEDialog::closeDialogCanceling().

Referenced by FXDEFMAP(), FXDEFMAP(), and GNEDialog::openDialog().

Here is the caller graph for this function:

◆ onCmdCopy()

long GNECrashDialog::onCmdCopy ( FXObject *  ,
FXSelector  ,
void *   
)
virtual

called when copy button is pressed

Reimplemented from GNEDialog.

Definition at line 93 of file GNECrashDialog.cpp.

◆ onCmdReport()

long GNECrashDialog::onCmdReport ( FXObject *  ,
FXSelector  ,
void *   
)
virtual

called when report button is pressed

Reimplemented from GNEDialog.

Definition at line 106 of file GNECrashDialog.cpp.

References MFXLinkLabel::fxexecute().

◆ onCmdReset()

long GNEDialog::onCmdReset ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

◆ onCmdRun()

long GNEDialog::onCmdRun ( FXObject *  ,
FXSelector  ,
void *   
)
virtualinherited

called when run button is pressed (must be reimplemented in children depending of Buttons)

Reimplemented in GNERunDialog, GNENetgenerateDialog, and GNEPythonToolDialog.

Definition at line 138 of file GNEDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onKeyPress()

long GNEDialog::onKeyPress ( FXObject *  obj,
FXSelector  sel,
void *  ptr 
)
inherited

called when user presses a key on the dialog

Definition at line 168 of file GNEDialog.cpp.

References GNEDialog::closeDialogAborting(), GNEApplicationWindow::getInternalTest(), GNEDialog::myApplicationWindow, and GNEDialog::myTesting.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onKeyRelease()

long GNEDialog::onKeyRelease ( FXObject *  obj,
FXSelector  sel,
void *  ptr 
)
inherited

called when user releases a key on the dialog

Definition at line 184 of file GNEDialog.cpp.

References GNEApplicationWindow::getInternalTest(), GNEDialog::myApplicationWindow, and GNEDialog::myTesting.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ openDialog()

void GNEDialog::openDialog ( FXWindow *  focusableElement = nullptr)
protectedinherited

open dialog

Definition at line 194 of file GNEDialog.cpp.

References InternalTestStep::DialogArgument::ABORT, InternalTestStep::DialogArgument::ACCEPT, InternalTestStep::DialogArgument::CANCEL, InternalTestStep::DIALOG, GNEApplicationWindow::getInternalTest(), GNEDialog::MODAL, GNEDialog::myApplicationWindow, GNEDialog::myFocusButton, GNEDialog::myOpenType, GNEDialog::myTesting, GNEDialog::myType, GNEDialog::onCmdAbort(), GNEDialog::onCmdAccept(), GNEDialog::onCmdCancel(), GNEDialog::onCmdReset(), InternalTestStep::DialogArgument::RESET, GNEDialog::runInternalTest(), and InternalTest::setNextStep().

Referenced by GNEAboutDialog::GNEAboutDialog(), GNEAttributeCarrierDialog::GNEAttributeCarrierDialog(), GNEBasicDialog::GNEBasicDialog(), GNECalibratorDialog::GNECalibratorDialog(), GNEFileDialog::GNEFileDialog(), GNEFilePathDialog::GNEFilePathDialog(), GNEFixAdditionalElementsDialog::GNEFixAdditionalElementsDialog(), GNEFixDemandElementsDialog::GNEFixDemandElementsDialog(), GNEFixNetworkElements::GNEFixNetworkElements(), GNEHelpAttributesDialog::GNEHelpAttributesDialog(), GNENeteditOptionsDialog::GNENeteditOptionsDialog(), GNENetgenerateOptionsDialog::GNENetgenerateOptionsDialog(), GNEOverwriteElement::GNEOverwriteElement(), GNEParametersDialog::GNEParametersDialog(), GNERerouterDialog::GNERerouterDialog(), GNERerouterIntervalDialog::GNERerouterIntervalDialog(), GNERunNetgenerateDialog::GNERunNetgenerateDialog(), GNERunPythonToolDialog::GNERunPythonToolDialog(), GNESaveDialog::GNESaveDialog(), GNESumoOptionsDialog::GNESumoOptionsDialog(), GNEVariableSpeedSignDialog::GNEVariableSpeedSignDialog(), GNEVClassesDialog::GNEVClassesDialog(), and GNEVehicleTypeDialog::GNEVehicleTypeDialog().

Here is the caller graph for this function:

◆ operator=()

GNECrashDialog & GNECrashDialog::operator= ( const GNECrashDialog src)
privatedelete

Invalidated assignment operator.

◆ runInternalTest()

void GNECrashDialog::runInternalTest ( const InternalTestStep::DialogArgument dialogArgument)
virtual

run internal test

Implements GNEDialog.

Definition at line 87 of file GNECrashDialog.cpp.

◆ updateIcon()

void GNEDialog::updateIcon ( GUIIcon  newIcon)
protectedinherited

update icon

Definition at line 303 of file GNEDialog.cpp.

References GUIIconSubSys::getIcon().

Referenced by GNEFileDialog::GNEFileDialog().

Here is the caller graph for this function:

◆ updateTitle()

void GNEDialog::updateTitle ( const std::string &  newTitle)
protectedinherited

update title

Definition at line 297 of file GNEDialog.cpp.

Referenced by GNEFileDialog::GNEFileDialog().

Here is the caller graph for this function:

Field Documentation

◆ myAbortButton

FXButton* GNEDialog::myAbortButton = nullptr
protectedinherited

abort button

Definition at line 155 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myAcceptButton

FXButton* GNEDialog::myAcceptButton = nullptr
protectedinherited

accept button

Definition at line 149 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog(), GNEFileDialog::GNEFileDialog(), and GNERunDialog::updateDialogButtons().

◆ myAdvancedButton

FXButton* GNEDialog::myAdvancedButton = nullptr
protectedinherited

advanced button

Definition at line 167 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog(), and GNENetgenerateDialog::updateRunButtons().

◆ myApplicationWindow

◆ myBackButton

FXButton* GNEDialog::myBackButton = nullptr
protectedinherited

back button

Definition at line 164 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog(), and GNERunDialog::updateDialogButtons().

◆ myCancelButton

FXButton* GNEDialog::myCancelButton = nullptr
protectedinherited

cancel button

Definition at line 152 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myContentFrame

◆ myCopyButton

FXButton* GNEDialog::myCopyButton = nullptr
protectedinherited

copy button

Definition at line 170 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myExceptionTextField

MFXTextFieldIcon* GNECrashDialog::myExceptionTextField = nullptr
protected

exception text field

Definition at line 64 of file GNECrashDialog.h.

◆ myFocusButton

FXButton* GNEDialog::myFocusButton = nullptr
privateinherited

focus button, used for focusing the default button when dialog is opened

Definition at line 201 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog(), and GNEDialog::openDialog().

◆ myOpenType

OpenType GNEDialog::myOpenType
privateinherited

◆ myReportButton

FXButton* GNEDialog::myReportButton = nullptr
protectedinherited

report button

Definition at line 173 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myResetButton

FXButton* GNEDialog::myResetButton = nullptr
protectedinherited

reset button

Definition at line 158 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myResult

Result GNEDialog::myResult = Result::CANCEL
protectedinherited

result to indicate if this dialog was closed accepting or rejecting changes

Definition at line 179 of file GNEDialog.h.

Referenced by GNEDialog::closeDialogAborting(), GNEDialog::closeDialogAccepting(), GNEDialog::closeDialogCanceling(), GNEDialog::getResult(), GNESaveDialog::onCmdAccept(), and GNESaveDialog::onCmdCancel().

◆ myRunButton

FXButton* GNEDialog::myRunButton = nullptr
protectedinherited

◆ myTesting

bool GNEDialog::myTesting = false
privateinherited

flag to indicate if this dialog is being tested using internal test

Definition at line 207 of file GNEDialog.h.

Referenced by GNEDialog::closeDialogAborting(), GNEDialog::closeDialogAccepting(), GNEDialog::closeDialogCanceling(), GNEDialog::onKeyPress(), GNEDialog::onKeyRelease(), and GNEDialog::openDialog().

◆ myTraceText

std::string GNECrashDialog::myTraceText
protected

trace text

Definition at line 67 of file GNECrashDialog.h.

Referenced by onClipboardRequest().

◆ myType

DialogType GNEDialog::myType = DialogType::DEFAULT
protectedinherited

dialog type

Definition at line 176 of file GNEDialog.h.

Referenced by GNEDialog::openDialog().


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