![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEOptionsEditor.h>
Public Member Functions | |
| GNEOptionsEditor (GNEDialog *dialog, const std::string &titleName, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer) | |
| Constructor. | |
| bool | isOptionModified () const |
| check if option was modified | |
| void | resetAllOptions () |
| reset options | |
| void | runInternalTest (const InternalTestStep::DialogArgument *dialogArgument) |
| run internal test | |
| ~GNEOptionsEditor () | |
| Destructor. | |
FOX-callbacks | |
| long | onCmdSelectTopic (FXObject *, FXSelector, void *) |
| called when user select a topic in the list | |
| long | onCmdSearch (FXObject *, FXSelector, void *) |
| called when user searches | |
| long | onCmdShowToolTipsMenu (FXObject *, FXSelector, void *) |
| enable/disable show toolTip | |
| long | onCmdSaveOptions (FXObject *, FXSelector, void *) |
| save options | |
| long | onCmdLoadOptions (FXObject *, FXSelector, void *) |
| load options | |
| long | onCmdResetDefault (FXObject *, FXSelector, void *) |
| reset default | |
Protected Member Functions | |
| GNEOptionsEditor () | |
| FOX needs this. | |
Protected Attributes | |
| OptionsCont * | myCopyOfOptionsContainer = nullptr |
| copy of edited Option container, used for reset | |
| GNEDialog * | myDialog = nullptr |
| reference to dialog | |
| OptionsCont & | myOptionsContainer |
| reference to edited Option container | |
| bool | myOptionsModified = false |
| flag for check if options was modified | |
| const OptionsCont & | myOriginalOptionsContainer |
| reference to original Option container, used for restoring | |
Private Member Functions | |
| GNEOptionsEditor (const GNEOptionsEditor &)=delete | |
| Invalidated copy constructor. | |
| bool | loadConfiguration (const std::string &file) |
| load configuration | |
| GNEOptionsEditor & | operator= (const GNEOptionsEditor &)=delete |
| Invalidated assignment operator. | |
| void | updateVisibleEntriesBySearch (std::string searchText) |
| update visible entries by search | |
| bool | updateVisibleEntriesByTopic () |
| update visible entries by selected topic | |
Private Attributes | |
| MFXCheckButtonTooltip * | myDescriptionSearchCheckButton = nullptr |
| checkbox for enable/disable search by description | |
| FXVerticalFrame * | myEntriesFrame = nullptr |
| vertical frame for entries | |
| const std::set< std::string > | myIgnoredEntries = {"geometry.remove", "edges.join", "geometry.split", "ramps.guess", "ramps.set"} |
| ignores entries | |
| const std::set< std::string > | myIgnoredTopics = {"Configuration"} |
| ignores topics | |
| std::vector< GNEOptionsEditorRow::OptionRow * > | myOptionRowEntries |
| Input option entries. | |
| FXTreeItem * | myRootItem = nullptr |
| root item | |
| MFXTextFieldSearch * | mySearchButton = nullptr |
| search button | |
| MFXCheckableButton * | myShowToolTipsMenu = nullptr |
| checkable button for show toolTips | |
| FXTreeList * | myTopicsTreeList = nullptr |
| Topics elements tree. | |
| std::map< FXTreeItem *, std::string > | myTreeItemTopics |
| map with topics and their associated FXTreeItem | |
Friends | |
| class | GNEOptionsEditorRow |
| FOX-declaration. | |
Definition at line 43 of file GNEOptionsEditor.h.
| GNEOptionsEditor::GNEOptionsEditor | ( | GNEDialog * | dialog, |
| const std::string & | titleName, | ||
| OptionsCont & | optionsContainer, | ||
| const OptionsCont & | originalOptionsContainer | ||
| ) |
Constructor.
| [in] | dialog | GNEDialog in which this editor is shown |
| [in] | titleName | The title to show |
| [in] | optionsContainer | edited option container |
| [in] | originalOptionsContainer | original options container used for restoring |
Definition at line 65 of file GNEOptionsEditor.cpp.
References MFXGroupBoxModule::getCollapsableFrame(), GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignAuxiliarHorizontalFrame, GUIDesignAuxiliarVerticalFrame, GUIDesignButtonConfiguration, GUIDesignCheckButtonThick, GUIDesignHeight, GUIDesignHorizontalFrameNoPadding, GUIDesignLabelThickedFixed, GUIDesignMFXCheckableButtonSquare, GUIDesignTextField, GUIDesignTreeListFixedWidth, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_GNE_BUTTON_DEFAULT, MID_GNE_SEARCH_USEDESCRIPTION, MID_GNE_SELECT, MID_GNE_SET_ATTRIBUTE, MID_SHOWTOOLTIPS_MENU, OPEN, RESET, SAVE, SHOWTOOLTIPS_MENU, TL, and TREELISTWIDTH.
| GNEOptionsEditor::~GNEOptionsEditor | ( | ) |
Destructor.
Definition at line 161 of file GNEOptionsEditor.cpp.
References myCopyOfOptionsContainer.
|
protected |
FOX needs this.
Definition at line 271 of file GNEOptionsEditor.cpp.
|
privatedelete |
Invalidated copy constructor.
| bool GNEOptionsEditor::isOptionModified | ( | ) | const |
check if option was modified
Definition at line 173 of file GNEOptionsEditor.cpp.
References myOptionsModified.
Referenced by GNENeteditOptionsDialog::isOptionModified(), GNENetgenerateOptionsDialog::isOptionModified(), and GNESumoOptionsDialog::isOptionModified().
|
private |
load configuration
Definition at line 329 of file GNEOptionsEditor.cpp.
References OptionsLoader::errorOccurred(), myOptionsContainer, OptionsCont::resetWritable(), TL, StringUtils::transcode(), StringUtils::transcodeToLocal(), WRITE_ERROR, and WRITE_MESSAGE.
Referenced by onCmdLoadOptions().
| long GNEOptionsEditor::onCmdLoadOptions | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
load options
Definition at line 244 of file GNEOptionsEditor.cpp.
References GNEDialog::ACCEPT, GNEDialog::getApplicationWindow(), GNEFileDialog::LOAD_SINGLE, loadConfiguration(), myDialog, myOptionRowEntries, GNEFileDialog::NETEDIT, TL, and SUMOXMLDefinitions::XMLFileExtensions.
Referenced by FXDEFMAP().
| long GNEOptionsEditor::onCmdResetDefault | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
reset default
Definition at line 262 of file GNEOptionsEditor.cpp.
References myOptionRowEntries.
Referenced by FXDEFMAP().
| long GNEOptionsEditor::onCmdSaveOptions | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
save options
Definition at line 227 of file GNEOptionsEditor.cpp.
References GNEDialog::ACCEPT, GNEDialog::getApplicationWindow(), myDialog, myOptionsContainer, GNEFileDialog::NETEDIT, GNEFileDialog::SAVE, TL, StringUtils::transcodeToLocal(), OptionsCont::writeConfiguration(), and SUMOXMLDefinitions::XMLFileExtensions.
Referenced by FXDEFMAP().
| long GNEOptionsEditor::onCmdSearch | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
called when user searches
Definition at line 196 of file GNEOptionsEditor.cpp.
References MFXTextFieldIcon::getText(), mySearchButton, updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
Referenced by FXDEFMAP().
| long GNEOptionsEditor::onCmdSelectTopic | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
called when user select a topic in the list
Definition at line 187 of file GNEOptionsEditor.cpp.
References MFXTextFieldIcon::getText(), mySearchButton, and updateVisibleEntriesByTopic().
Referenced by FXDEFMAP().
| long GNEOptionsEditor::onCmdShowToolTipsMenu | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
enable/disable show toolTip
Definition at line 207 of file GNEOptionsEditor.cpp.
References MFXCheckableButton::amChecked(), MFXStaticToolTip::enableStaticToolTip(), GNEDialog::getApplicationWindow(), GUIMainWindow::getStaticTooltipMenu(), GNEApplicationWindow::getViewNet(), myDialog, myShowToolTipsMenu, and MFXCheckableButton::setChecked().
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
| void GNEOptionsEditor::resetAllOptions | ( | ) |
reset options
Definition at line 178 of file GNEOptionsEditor.cpp.
References myOptionRowEntries, and myOptionsModified.
Referenced by GNENeteditOptionsDialog::onCmdCancel(), GNENetgenerateOptionsDialog::onCmdCancel(), GNESumoOptionsDialog::onCmdCancel(), GNENeteditOptionsDialog::onCmdReset(), GNENetgenerateOptionsDialog::onCmdReset(), and GNESumoOptionsDialog::onCmdReset().
| void GNEOptionsEditor::runInternalTest | ( | const InternalTestStep::DialogArgument * | dialogArgument | ) |
run internal test
Definition at line 167 of file GNEOptionsEditor.cpp.
Referenced by GNENeteditOptionsDialog::runInternalTest(), GNENetgenerateOptionsDialog::runInternalTest(), and GNESumoOptionsDialog::runInternalTest().
|
private |
update visible entries by search
Definition at line 306 of file GNEOptionsEditor.cpp.
References myDescriptionSearchCheckButton, myEntriesFrame, myOptionRowEntries, and StringUtils::to_lower_case().
Referenced by onCmdSearch().
|
private |
update visible entries by selected topic
Definition at line 278 of file GNEOptionsEditor.cpp.
References myEntriesFrame, myOptionRowEntries, and myTreeItemTopics.
Referenced by onCmdSearch(), and onCmdSelectTopic().
|
friend |
|
protected |
copy of edited Option container, used for reset
Definition at line 107 of file GNEOptionsEditor.h.
Referenced by ~GNEOptionsEditor().
|
private |
checkbox for enable/disable search by description
Definition at line 129 of file GNEOptionsEditor.h.
Referenced by updateVisibleEntriesBySearch().
|
protected |
reference to dialog
Definition at line 101 of file GNEOptionsEditor.h.
Referenced by onCmdLoadOptions(), onCmdSaveOptions(), and onCmdShowToolTipsMenu().
|
private |
vertical frame for entries
Definition at line 126 of file GNEOptionsEditor.h.
Referenced by updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
|
private |
ignores entries
Definition at line 144 of file GNEOptionsEditor.h.
|
private |
ignores topics
Definition at line 141 of file GNEOptionsEditor.h.
|
private |
Input option entries.
Definition at line 138 of file GNEOptionsEditor.h.
Referenced by onCmdLoadOptions(), onCmdResetDefault(), resetAllOptions(), updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
|
protected |
reference to edited Option container
Definition at line 104 of file GNEOptionsEditor.h.
Referenced by loadConfiguration(), onCmdSaveOptions(), GNEOptionsEditorRow::OptionFloat::OptionFloat(), GNEOptionsEditorRow::OptionIntVector::OptionIntVector(), GNEOptionsEditorRow::OptionString::OptionString(), and GNEOptionsEditorRow::OptionTime::OptionTime().
|
protected |
flag for check if options was modified
Definition at line 113 of file GNEOptionsEditor.h.
Referenced by isOptionModified(), and resetAllOptions().
|
protected |
reference to original Option container, used for restoring
Definition at line 110 of file GNEOptionsEditor.h.
|
private |
root item
Definition at line 123 of file GNEOptionsEditor.h.
|
private |
search button
Definition at line 132 of file GNEOptionsEditor.h.
Referenced by onCmdSearch(), and onCmdSelectTopic().
|
private |
checkable button for show toolTips
Definition at line 117 of file GNEOptionsEditor.h.
Referenced by onCmdShowToolTipsMenu().
|
private |
Topics elements tree.
Definition at line 120 of file GNEOptionsEditor.h.
|
private |
map with topics and their associated FXTreeItem
Definition at line 135 of file GNEOptionsEditor.h.
Referenced by updateVisibleEntriesByTopic().