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

#include <GNESingleParametersDialog.h>

Inheritance diagram for GNESingleParametersDialog:
Collaboration diagram for GNESingleParametersDialog:

Data Structures

class  ParametersOperations
 
class  ParametersValues
 FOX-declaration. More...
 

Public Types

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

Public Member Functions

 GNESingleParametersDialog (GNEApplicationWindow *applicationWindow, GNEVehicleTypeDialog::VTypeAttributes::VTypeAttributeRow *VTypeAttributeRow)
 Constructor for Vehicle Type Row (Vehicle Type Dialog)
 
 GNESingleParametersDialog (GNEApplicationWindow *applicationWindow, NBLoadedSUMOTLDef *TLDef)
 Constructor for attribute carriers (used in GNETLSEditorFrame)
 
 GNESingleParametersDialog (GNEAttributeCarrier *attributeCarrier)
 Constructor for attribute carriers (used in GNECreateEdgeFrame)
 
 GNESingleParametersDialog (GNEAttributesEditorType *attributesEditor)
 Constructor for attributes editor.
 
void runInternalTest (const InternalTestStep::DialogArgument *dialogArgument)
 run internal test
 
 ~GNESingleParametersDialog ()
 destructor
 
FOX-callbacks
long onCmdAccept (FXObject *, FXSelector, void *)
 event after press accept button
 
long onCmdReset (FXObject *, FXSelector, void *)
 event after press reset button
 
FOX-callbacks
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 onCmdRun (FXObject *, FXSelector, void *)
 called when run button is pressed (must be reimplemented in children)
 
virtual long onCmdBack (FXObject *, FXSelector, void *)
 called when back button is pressed (must be reimplemented in children)
 
virtual long onCmdAdvanced (FXObject *, FXSelector, void *)
 called when advanced button is pressed (must be reimplemented in children)
 
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
 
void openDialog ()
 open dialog
 

Protected Attributes

FXButton * myAbortButton = nullptr
 abort button
 
FXButton * myAcceptButton = nullptr
 accept button
 
FXButton * myAdvancedButton = nullptr
 advanced button
 
GNEApplicationWindowmyApplicationWindow = nullptr
 FOX needs this.
 
GNEAttributeCarriermyAttributeCarrier = nullptr
 pointer to GNEAttributeCarrier
 
GNEAttributesEditorTypemyAttributesEditor = nullptr
 FOX need this.
 
FXButton * myBackButton = nullptr
 back button
 
FXButton * myCancelButton = nullptr
 cancel button
 
FXVerticalFrame * myContentFrame = nullptr
 content frame
 
ParametersOperationsmyParametersOperations = nullptr
 pointer to parameters operations
 
ParametersValuesmyParametersValues = nullptr
 pointer to parameters values
 
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
 
NBLoadedSUMOTLDefmyTLDef = nullptr
 pointer to TLDef
 
GNEVehicleTypeDialog::VTypeAttributes::VTypeAttributeRowVTypeAttributeRow = nullptr
 pointer to VTypeAttributeRow
 

Private Member Functions

void buildDialog (GUIIcon titleIcon, Buttons buttons)
 build dialog
 
 GNESingleParametersDialog (const GNESingleParametersDialog &)=delete
 Invalidated copy constructor.
 
GNESingleParametersDialogoperator= (const GNESingleParametersDialog &)=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 }
 list of possible results when closing the dialog More...
 

Detailed Description

Definition at line 41 of file GNESingleParametersDialog.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 
KEEPNEW_KEEPOLD_CANCEL 
RUN_CANCEL_RESET 
RUN_ADVANCED_CANCEL 
RERUN_BACK_CLOSE 

Definition at line 41 of file GNEDialog.h.

◆ OpenType

enum class GNEDialog::OpenType
stronginherited

Open dialog type.

Enumerator
MODAL 
NON_MODAL 

Definition at line 56 of file GNEDialog.h.

◆ ResizeMode

enum class GNEDialog::ResizeMode
stronginherited
Enumerator
STATIC 
RESIZABLE 

Definition at line 62 of file GNEDialog.h.

◆ Result

enum class GNEDialog::Result
stronginherited

list of possible results when closing the dialog

Enumerator
ACCEPT 
CANCEL 
ABORT 

Definition at line 68 of file GNEDialog.h.

Constructor & Destructor Documentation

◆ GNESingleParametersDialog() [1/5]

◆ GNESingleParametersDialog() [2/5]

◆ GNESingleParametersDialog() [3/5]

◆ GNESingleParametersDialog() [4/5]

GNESingleParametersDialog::GNESingleParametersDialog ( GNEApplicationWindow applicationWindow,
NBLoadedSUMOTLDef TLDef 
)

◆ ~GNESingleParametersDialog()

GNESingleParametersDialog::~GNESingleParametersDialog ( )

destructor

Definition at line 540 of file GNESingleParametersDialog.cpp.

◆ GNESingleParametersDialog() [5/5]

GNESingleParametersDialog::GNESingleParametersDialog ( const GNESingleParametersDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ buildDialog()

◆ closeDialogAborting()

long GNEDialog::closeDialogAborting ( )
protectedinherited

close dialog aborting the changes

Definition at line 250 of file GNEDialog.cpp.

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

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

Here is the caller graph for this function:

◆ closeDialogAccepting()

long GNEDialog::closeDialogAccepting ( )
protectedinherited

◆ closeDialogCanceling()

◆ getApplicationWindow()

GNEApplicationWindow * GNEDialog::getApplicationWindow ( ) const
inherited

get pointer to the application window

Definition at line 93 of file GNEDialog.cpp.

References GNEDialog::myApplicationWindow.

Referenced by GNEPythonToolDialog::buildArguments(), and GNEOptionsEditor::onCmdShowToolTipsMenu().

Here is the caller graph for this function:

◆ getContentFrame()

FXVerticalFrame * GNEDialog::getContentFrame ( ) const
inherited

get content frame

Definition at line 99 of file GNEDialog.cpp.

References GNEDialog::myContentFrame.

Referenced by GNEAllowVClassesDialog::GNEAllowVClassesDialog().

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 87 of file GNEDialog.cpp.

References GNEDialog::myResult.

Referenced by GNEApplicationWindow::onCmdOpenAdditionalElements(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), and GNEApplicationWindow::onCmdOpenMeanDataElements().

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 GNETemplateElementDialog< T >, GNETemplateElementDialog< elementDialogType >, GNETemplateElementDialog< GNEAdditional >, GNETemplateElementDialog< GNEAttributeCarrier >, GNETemplateElementDialog< GNEDemandElement >, GNERunDialog, GNERunNetgenerateDialog, and GNERunPythonToolDialog.

Definition at line 117 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)

Reimplemented in GNENetgenerateDialog.

Definition at line 141 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)

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

Definition at line 135 of file GNEDialog.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCancel()

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

◆ onCmdReset()

long GNESingleParametersDialog::onCmdReset ( FXObject *  ,
FXSelector  ,
void *   
)
virtual

◆ onCmdRun()

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

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

Reimplemented in GNERunDialog, GNENetgenerateDialog, and GNEPythonToolDialog.

Definition at line 129 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 147 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 163 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 ( )
protectedinherited

open dialog

Definition at line 173 of file GNEDialog.cpp.

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

Referenced by GNEAboutDialog::GNEAboutDialog(), GNEAllowVClassesDialog::GNEAllowVClassesDialog(), GNEAttributeCarrierDialog::GNEAttributeCarrierDialog(), GNEBasicDialog::GNEBasicDialog(), GNECalibratorDialog::GNECalibratorDialog(), GNEFixAdditionalElementsDialog::GNEFixAdditionalElementsDialog(), GNEFixDemandElementsDialog::GNEFixDemandElementsDialog(), GNEFixNetworkElements::GNEFixNetworkElements(), GNEHelpAttributesDialog::GNEHelpAttributesDialog(), GNEKeepElementsDialog::GNEKeepElementsDialog(), GNEMultipleParametersDialog::GNEMultipleParametersDialog(), GNENeteditOptionsDialog::GNENeteditOptionsDialog(), GNENetgenerateOptionsDialog::GNENetgenerateOptionsDialog(), GNERerouterDialog::GNERerouterDialog(), GNERerouterIntervalDialog::GNERerouterIntervalDialog(), GNERunNetgenerateDialog::GNERunNetgenerateDialog(), GNERunPythonToolDialog::GNERunPythonToolDialog(), GNESingleParametersDialog(), GNESingleParametersDialog(), GNESingleParametersDialog(), GNESingleParametersDialog(), GNESumoOptionsDialog::GNESumoOptionsDialog(), GNEVariableSpeedSignDialog::GNEVariableSpeedSignDialog(), and GNEVehicleTypeDialog::GNEVehicleTypeDialog().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ runInternalTest()

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

run internal test

Implements GNEDialog.

Definition at line 544 of file GNESingleParametersDialog.cpp.

Field Documentation

◆ myAbortButton

FXButton* GNEDialog::myAbortButton = nullptr
protectedinherited

abort button

Definition at line 145 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myAcceptButton

FXButton* GNEDialog::myAcceptButton = nullptr
protectedinherited

accept button

Definition at line 139 of file GNEDialog.h.

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

◆ myAdvancedButton

FXButton* GNEDialog::myAdvancedButton = nullptr
protectedinherited

advanced button

Definition at line 157 of file GNEDialog.h.

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

◆ myApplicationWindow

◆ myAttributeCarrier

GNEAttributeCarrier* GNESingleParametersDialog::myAttributeCarrier = nullptr
protected

◆ myAttributesEditor

GNEAttributesEditorType* GNESingleParametersDialog::myAttributesEditor = nullptr
protected

FOX need this.

pointer to attributes editor

Definition at line 264 of file GNESingleParametersDialog.h.

Referenced by onCmdAccept(), and onCmdReset().

◆ myBackButton

FXButton* GNEDialog::myBackButton = nullptr
protectedinherited

back button

Definition at line 154 of file GNEDialog.h.

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

◆ myCancelButton

FXButton* GNEDialog::myCancelButton = nullptr
protectedinherited

cancel button

Definition at line 142 of file GNEDialog.h.

Referenced by GNEDialog::buildDialog().

◆ myContentFrame

◆ myFocusButton

FXButton* GNEDialog::myFocusButton = nullptr
privateinherited

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

Definition at line 176 of file GNEDialog.h.

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

◆ myOpenType

OpenType GNEDialog::myOpenType
privateinherited

◆ myParametersOperations

ParametersOperations* GNESingleParametersDialog::myParametersOperations = nullptr
protected

◆ myParametersValues

ParametersValues* GNESingleParametersDialog::myParametersValues = nullptr
protected

◆ myResetButton

FXButton* GNEDialog::myResetButton = nullptr
protectedinherited

reset button

Definition at line 148 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 160 of file GNEDialog.h.

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

◆ 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 182 of file GNEDialog.h.

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

◆ myTLDef

NBLoadedSUMOTLDef* GNESingleParametersDialog::myTLDef = nullptr
protected

pointer to TLDef

Definition at line 273 of file GNESingleParametersDialog.h.

Referenced by onCmdAccept(), and onCmdReset().

◆ VTypeAttributeRow

GNEVehicleTypeDialog::VTypeAttributes::VTypeAttributeRow* GNESingleParametersDialog::VTypeAttributeRow = nullptr
protected

pointer to VTypeAttributeRow

Definition at line 267 of file GNESingleParametersDialog.h.

Referenced by GNESingleParametersDialog(), onCmdAccept(), and onCmdReset().


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