![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEOverwriteElement.h>
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_OK , OK_COPY_REPORT } |
| enum class | OpenType { MODAL , NON_MODAL } |
| Open dialog type. More... | |
Public Member Functions | |
| GNEOverwriteElement (CommonHandler *commonHandler, const GNEAttributeCarrier *AC) | |
| Constructor. | |
| void | runInternalTest (const InternalTestStep::DialogArgument *dialogArgument) |
| run internal test | |
| ~GNEOverwriteElement () | |
| destructor | |
FOX-callbacks | |
| long | onCmdAccept (FXObject *, FXSelector, void *) |
| called when accept or yes button is pressed (can be reimplemented in children) | |
| long | onCmdCancel (FXObject *, FXSelector, void *) |
| called when cancel or no button is pressed (can be reimplemented in children) | |
| long | onCmdAbort (FXObject *, FXSelector, void *) |
| called when abort is called either closing dialog or pressing abort button (can be reimplemented in children) | |
FOX-callbacks | |
| 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) | |
| virtual long | onCmdCopy (FXObject *, FXSelector, void *) |
| called when copy button is pressed (must be reimplemented in children depending of Buttons) | |
| virtual long | onCmdReport (FXObject *, FXSelector, void *) |
| called when report 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 | |
| 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 | |
| GNEApplicationWindow * | myApplicationWindow = nullptr |
| FOX needs this. | |
| FXCheckButton * | myApplySolutionToAllCheckButon = nullptr |
| apply solpution to all checkButton | |
| FXButton * | myBackButton = nullptr |
| back button | |
| FXButton * | myCancelButton = nullptr |
| cancel button | |
| CommonHandler * | myCommonHandler = nullptr |
| pointer to common handler | |
| FXVerticalFrame * | myContentFrame = nullptr |
| content frame | |
| FXButton * | myCopyButton = nullptr |
| copy button | |
| FXButton * | myReportButton = nullptr |
| report button | |
| FXButton * | myResetButton = nullptr |
| reset button | |
| FXWindow * | myRestoringFocusWindow = nullptr |
| FXWindows that restoring focus window. | |
| Result | myResult = Result::CANCEL |
| result to indicate if this dialog was closed accepting or rejecting changes | |
| FXButton * | myRunButton = nullptr |
| run button | |
| DialogType | myType = DialogType::DEFAULT |
| dialog type | |
Private Member Functions | |
| void | buildDialog (GUIIcon titleIcon, Buttons buttons) |
| build dialog | |
| GNEOverwriteElement (const GNEOverwriteElement &)=delete | |
| Invalidated copy constructor. | |
| GNEOverwriteElement & | operator= (const GNEOverwriteElement &)=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 | |
| GNEApplicationWindow * | getApplicationWindow () const |
| get pointer to the application window | |
| FXVerticalFrame * | getContentFrame () const |
| get content frame | |
| void | setRestoringFocusWindow (FXWindow *window) |
| wet FXWindows uses for restoring focus | |
| enum class | ResizeMode { STATIC , RESIZABLE } |
| enum class | Result { ACCEPT , CANCEL , ABORT , ACCEPT_ALL , CANCEL_ALL } |
| list of possible results when closing the dialog More... | |
Definition at line 36 of file GNEOverwriteElement.h.
|
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_OK | |
| OK_COPY_REPORT | |
Definition at line 43 of file GNEDialog.h.
|
stronginherited |
|
stronginherited |
| Enumerator | |
|---|---|
| STATIC | |
| RESIZABLE | |
Definition at line 64 of file GNEDialog.h.
|
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.
| GNEOverwriteElement::GNEOverwriteElement | ( | CommonHandler * | commonHandler, |
| const GNEAttributeCarrier * | AC ) |
Constructor.
Definition at line 34 of file GNEOverwriteElement.cpp.
References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagProperty(), GNETagProperties::getTagStr(), GNEDialog::GNEDialog(), GUIDesignCheckButton, myApplySolutionToAllCheckButon, myCommonHandler, GNEDialog::myContentFrame, GNEDialog::openDialog(), TL, and TLF.
Referenced by GNEOverwriteElement(), and operator=().
| GNEOverwriteElement::~GNEOverwriteElement | ( | ) |
destructor
Definition at line 51 of file GNEOverwriteElement.cpp.
|
privatedelete |
Invalidated copy constructor.
References GNEOverwriteElement().
|
privateinherited |
build dialog
Definition at line 327 of file GNEDialog.cpp.
References ACCEPT, ACCEPT_CANCEL, ACCEPT_CANCEL_RESET, BACK, GUIDesigns::buildFXButton(), CANCEL, COPY, GUIIconSubSys::getIcon(), GITHUB, GUIDesignAuxiliarFrame, GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonDialog, GUIDesignDialogButtonsHorizontalFrame, GUIDesignDialogContentFrame, GUIDesignHorizontalSeparator, MID_GNE_ABORT, MID_GNE_BUTTON_ACCEPT, MID_GNE_BUTTON_ADVANCED, MID_GNE_BUTTON_BACK, MID_GNE_BUTTON_CANCEL, MID_GNE_BUTTON_COPY, MID_GNE_BUTTON_REPORT, MID_GNE_BUTTON_RESET, MID_GNE_BUTTON_RUN, myAbortButton, myAcceptButton, myAdvancedButton, myBackButton, myCancelButton, myContentFrame, myCopyButton, myFocusButton, myReportButton, myResetButton, myRunButton, NO, OK, OK_COPY_REPORT, OPTIONS, RERUN_BACK_OK, RESET, RUN_ADVANCED_CANCEL, RUN_CANCEL_RESET, SAVE, SAVE_DONTSAVE_CANCEL, START, TL, YES, YES_NO, and YES_NO_CANCEL.
|
protectedinherited |
close dialog aborting the changes
Definition at line 295 of file GNEDialog.cpp.
References ABORT, MODAL, myApplicationWindow, myOpenType, myRestoringFocusWindow, myResult, and myTesting.
Referenced by onCmdAbort(), GNEOverwriteElement::onCmdAbort(), GNETemplateElementDialog< T >::onCmdAbort(), and onKeyPress().
|
protectedinherited |
close dialog accepting the changes
Definition at line 255 of file GNEDialog.cpp.
References ACCEPT, MODAL, myApplicationWindow, myOpenType, myRestoringFocusWindow, myResult, and myTesting.
Referenced by GNETemplateElementDialog< T >::acceptElementDialog(), onCmdAccept(), GNEDistributionRefDialog::onCmdAccept(), GNEFileDialog::onCmdAccept(), GNEFixElementsDialog< T >::onCmdAccept(), GNEOverwriteElement::onCmdAccept(), GNEParametersDialog::onCmdAccept(), GNESaveDialog::onCmdAccept(), GNEVClassesDialog::onCmdAccept(), and GNEPythonToolDialog::onCmdRun().
|
protectedinherited |
close dialog declining the changes
Definition at line 275 of file GNEDialog.cpp.
References CANCEL, MODAL, myApplicationWindow, myOpenType, myRestoringFocusWindow, myResult, and myTesting.
Referenced by GNERunDialog::onCmdAbort(), GNEDistributionRefDialog::onCmdAccept(), GNEFixElementsDialog< T >::onCmdAccept(), GNERunNetgenerateDialog::onCmdAccept(), GNERunPythonToolDialog::onCmdAccept(), GNEVClassesDialog::onCmdAccept(), GNENetgenerateDialog::onCmdAdvanced(), GNERunNetgenerateDialog::onCmdBack(), onCmdCancel(), GNEFilePathDialog::onCmdCancel(), GNENeteditOptionsDialog::onCmdCancel(), GNENetgenerateOptionsDialog::onCmdCancel(), GNEOverwriteElement::onCmdCancel(), GNESaveDialog::onCmdCancel(), GNESumoOptionsDialog::onCmdCancel(), GNETemplateElementDialog< T >::onCmdCancel(), GNEVClassesDialog::onCmdCancel(), GNENetgenerateDialog::onCmdRun(), and GNENetgenerateOptionsDialog::onCmdRun().
|
inherited |
get pointer to the application window
Definition at line 102 of file GNEDialog.cpp.
References myApplicationWindow.
Referenced by GNEPythonToolDialog::buildArguments().
|
inherited |
get content frame
Definition at line 108 of file GNEDialog.cpp.
References myContentFrame.
Referenced by GNEColorDialog::GNEColorDialog(), and GNEVClassesDialog::GNEVClassesDialog().
|
inherited |
get result to indicate if this dialog was closed accepting or rejecting changes
Definition at line 96 of file GNEDialog.cpp.
References myResult.
Referenced by GNEDataHandler::checkDuplicatedDataSet(), GNEMeanDataHandler::checkDuplicatedMeanDataElement(), GNEAdditionalHandler::checkElement(), GNERouteHandler::checkElement(), and GNEDistributionFrame::DistributionValuesEditor::onCmdAddRow().
|
virtual |
called when abort is called either closing dialog or pressing abort button (can be reimplemented in children)
Reimplemented from GNEDialog.
Definition at line 83 of file GNEOverwriteElement.cpp.
References GNEDialog::closeDialogAborting(), and myCommonHandler.
|
virtual |
called when accept or yes button is pressed (can be reimplemented in children)
Reimplemented from GNEDialog.
Definition at line 65 of file GNEOverwriteElement.cpp.
References GNEDialog::closeDialogAccepting(), myApplySolutionToAllCheckButon, and myCommonHandler.
|
virtualinherited |
called when advanced button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNENetgenerateDialog.
Definition at line 156 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
virtualinherited |
called when back button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNERunDialog, GNERunNetgenerateDialog, GNERunNetgenerateDialog, GNERunPythonToolDialog, and GNERunPythonToolDialog.
Definition at line 150 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
virtual |
called when cancel or no button is pressed (can be reimplemented in children)
Reimplemented from GNEDialog.
Definition at line 74 of file GNEOverwriteElement.cpp.
References GNEDialog::closeDialogCanceling(), myApplySolutionToAllCheckButon, and myCommonHandler.
|
virtualinherited |
called when copy button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNECrashDialog.
Definition at line 162 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
virtualinherited |
called when report button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNECrashDialog.
Definition at line 168 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
virtualinherited |
called when reset button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNEAttributeCarrierDialog, GNECalibratorDialog, GNEColorDialog, GNEFilePathDialog, GNEGeometryPointDialog, GNENeteditOptionsDialog, GNENetgenerateOptionsDialog, GNEParametersDialog, GNEPythonToolDialog, GNERerouterDialog, GNERerouterIntervalDialog, GNESumoOptionsDialog, GNETemplateElementDialog< T >, GNETemplateElementDialog< elementDialogType >, GNETemplateElementDialog< GNEAdditional >, GNETemplateElementDialog< GNEAttributeCarrier >, GNETemplateElementDialog< GNEDemandElement >, GNEVariableSpeedSignDialog, GNEVClassesDialog, and GNEVehicleTypeDialog.
Definition at line 138 of file GNEDialog.cpp.
Referenced by GNEFixElementsDialog< GNEAdditional * >::buildDialog(), and FXDEFMAP().
|
virtualinherited |
called when run button is pressed (must be reimplemented in children depending of Buttons)
Reimplemented in GNENetgenerateDialog, GNENetgenerateOptionsDialog, GNEPythonToolDialog, and GNERunDialog.
Definition at line 144 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
inherited |
called when user presses a key on the dialog
Definition at line 174 of file GNEDialog.cpp.
References closeDialogAborting(), myApplicationWindow, and myTesting.
Referenced by FXDEFMAP().
|
inherited |
called when user releases a key on the dialog
Definition at line 190 of file GNEDialog.cpp.
Referenced by FXDEFMAP().
|
protectedinherited |
open dialog
Definition at line 200 of file GNEDialog.cpp.
Referenced by GNEAboutDialog::GNEAboutDialog(), GNEBasicDialog::GNEBasicDialog(), GNEColorDialog::GNEColorDialog(), GNECrashDialog::GNECrashDialog(), GNEDistributionRefDialog::GNEDistributionRefDialog(), GNEFileDialog::GNEFileDialog(), GNEFilePathDialog::GNEFilePathDialog(), GNEHelpAttributesDialog::GNEHelpAttributesDialog(), GNENeteditOptionsDialog::GNENeteditOptionsDialog(), GNENetgenerateDialog::GNENetgenerateDialog(), GNENetgenerateOptionsDialog::GNENetgenerateOptionsDialog(), GNEOverwriteElement::GNEOverwriteElement(), GNEParametersDialog::GNEParametersDialog(), GNEPythonToolDialog::GNEPythonToolDialog(), GNERunNetgenerateDialog::GNERunNetgenerateDialog(), GNERunPythonToolDialog::GNERunPythonToolDialog(), GNESaveDialog::GNESaveDialog(), GNESumoOptionsDialog::GNESumoOptionsDialog(), GNEUndoListDialog::GNEUndoListDialog(), and GNEVClassesDialog::GNEVClassesDialog().
|
privatedelete |
Invalidated assignment operator.
References GNEOverwriteElement().
|
virtual |
run internal test
Implements GNEDialog.
Definition at line 56 of file GNEOverwriteElement.cpp.
References InternalTestStep::DialogArgument::getCustomAction(), and myApplySolutionToAllCheckButon.
|
inherited |
wet FXWindows uses for restoring focus
Definition at line 114 of file GNEDialog.cpp.
References myRestoringFocusWindow.
Referenced by GNEFileDialog::GNEFileDialog().
|
protectedinherited |
update icon
Definition at line 321 of file GNEDialog.cpp.
References GUIIconSubSys::getIcon().
Referenced by GNEFileDialog::GNEFileDialog().
|
protectedinherited |
update title
Definition at line 315 of file GNEDialog.cpp.
Referenced by GNEFileDialog::GNEFileDialog().
|
protectedinherited |
|
protectedinherited |
accept button
Definition at line 155 of file GNEDialog.h.
Referenced by buildDialog(), GNEFileDialog::GNEFileDialog(), GNEDistributionRefDialog::onCmdSetProbability(), GNEDistributionRefDialog::onCmdSetReference(), and GNERunDialog::updateDialogButtons().
|
protectedinherited |
advanced button
Definition at line 173 of file GNEDialog.h.
Referenced by buildDialog(), and GNENetgenerateDialog::updateRunButtons().
|
protectedinherited |
FOX needs this.
pointer to the main window
Definition at line 146 of file GNEDialog.h.
Referenced by closeDialogAborting(), closeDialogAccepting(), closeDialogCanceling(), getApplicationWindow(), GNEFixElementsDialog< T >::getApplicationWindow(), GNEDialog(), GNEDialog(), GNENetgenerateDialog::GNENetgenerateDialog(), GNEUndoListDialog::GNEUndoListDialog(), GNERunDialog::onCmdAbort(), GNEParametersDialog::onCmdAccept(), GNERunNetgenerateDialog::onCmdAccept(), GNERunPythonToolDialog::onCmdAccept(), GNENetgenerateDialog::onCmdAdvanced(), GNERunNetgenerateDialog::onCmdBack(), GNERunPythonToolDialog::onCmdBack(), GNEPythonToolDialog::onCmdLoad(), GNENetgenerateDialog::onCmdOpenOutputFile(), GNENetgenerateDialog::onCmdRun(), GNENetgenerateOptionsDialog::onCmdRun(), GNEPythonToolDialog::onCmdRun(), GNERunDialog::onCmdRun(), GNEPythonToolDialog::onCmdSave(), GNERunDialog::onCmdSaveLog(), GNEUndoListDialog::onCmdSelectRow(), GNENetgenerateDialog::onCmdSetGridNetwork(), GNENetgenerateDialog::onCmdSetOutput(), GNENetgenerateDialog::onCmdSetRandomNetwork(), GNENetgenerateDialog::onCmdSetRandomNetworkGridNetwork(), GNENetgenerateDialog::onCmdSetSpiderNetwork(), GNEPythonToolDialog::onCmdShowToolTipsMenu(), onKeyPress(), GNERunDialog::updateDialogButtons(), and GNEUndoListDialog::updateList().
|
protected |
apply solpution to all checkButton
Definition at line 67 of file GNEOverwriteElement.h.
Referenced by GNEOverwriteElement(), onCmdAccept(), onCmdCancel(), and runInternalTest().
|
protectedinherited |
back button
Definition at line 170 of file GNEDialog.h.
Referenced by buildDialog(), and GNERunDialog::updateDialogButtons().
|
protectedinherited |
|
protected |
pointer to common handler
Definition at line 64 of file GNEOverwriteElement.h.
Referenced by GNEOverwriteElement(), onCmdAbort(), onCmdAccept(), and onCmdCancel().
|
protectedinherited |
content frame
Definition at line 152 of file GNEDialog.h.
Referenced by buildDialog(), getContentFrame(), GNEAboutDialog::GNEAboutDialog(), GNEBasicDialog::GNEBasicDialog(), GNECrashDialog::GNECrashDialog(), GNEDistributionRefDialog::GNEDistributionRefDialog(), GNEFilePathDialog::GNEFilePathDialog(), GNEFixElementsDialog< T >::GNEFixElementsDialog(), GNEHelpAttributesDialog::GNEHelpAttributesDialog(), GNENetgenerateDialog::GNENetgenerateDialog(), GNEOverwriteElement::GNEOverwriteElement(), GNEParametersDialog::GNEParametersDialog(), GNEPythonToolDialog::GNEPythonToolDialog(), GNERunDialog::GNERunDialog(), GNESaveDialog::GNESaveDialog(), and GNEUndoListDialog::GNEUndoListDialog().
|
protectedinherited |
copy button
Definition at line 176 of file GNEDialog.h.
Referenced by buildDialog(), and GNECrashDialog::GNECrashDialog().
|
privateinherited |
focus button, used for focusing the default button when dialog is opened
Definition at line 207 of file GNEDialog.h.
Referenced by buildDialog().
|
privateinherited |
open type
Definition at line 210 of file GNEDialog.h.
Referenced by closeDialogAborting(), closeDialogAccepting(), closeDialogCanceling(), GNEDialog(), and GNEDialog().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
FXWindows that restoring focus window.
Definition at line 149 of file GNEDialog.h.
Referenced by closeDialogAborting(), closeDialogAccepting(), closeDialogCanceling(), and setRestoringFocusWindow().
|
protectedinherited |
result to indicate if this dialog was closed accepting or rejecting changes
Definition at line 185 of file GNEDialog.h.
Referenced by closeDialogAborting(), closeDialogAccepting(), closeDialogCanceling(), getResult(), GNESaveDialog::onCmdAccept(), and GNESaveDialog::onCmdCancel().
|
protectedinherited |
run button
Definition at line 167 of file GNEDialog.h.
Referenced by buildDialog(), GNERunDialog::updateDialogButtons(), and GNENetgenerateDialog::updateRunButtons().
|
privateinherited |
flag to indicate if this dialog is being tested using internal test
Definition at line 213 of file GNEDialog.h.
Referenced by closeDialogAborting(), closeDialogAccepting(), closeDialogCanceling(), and onKeyPress().
|
protectedinherited |