Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEOptionsDialog.h>
Public Member Functions | |
long | onCmdCancel (FXObject *, FXSelector, void *) |
called when user press cancel button | |
long | onCmdLoadOptions (FXObject *, FXSelector, void *) |
load options | |
long | onCmdReset (FXObject *, FXSelector, void *) |
called when user press reset button | |
long | onCmdResetDefault (FXObject *, FXSelector, void *) |
reset default | |
long | onCmdRunNetgenerate (FXObject *, FXSelector, void *) |
called when user press reset button | |
long | onCmdSaveOptions (FXObject *, FXSelector, void *) |
save options | |
long | onCmdSearch (FXObject *, FXSelector, void *) |
called when user searches | |
long | onCmdSelectTopic (FXObject *, FXSelector, void *) |
called when user select a topic in the list | |
long | onCmdShowToolTipsMenu (FXObject *, FXSelector, void *) |
enable/disable show toolTip | |
~GNEOptionsDialog () | |
Destructor. | |
Static Public Member Functions | |
static std::pair< int, bool > | Options (GNEApplicationWindow *GNEApp, GUIIcon icon, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer, const char *titleName) |
Constructor for options dialogs. | |
static std::pair< int, bool > | Run (GNEApplicationWindow *GNEApp, GUIIcon icon, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer, const char *titleName) |
Constructor for run dialogs. | |
Protected Member Functions | |
GNEOptionsDialog () | |
FOX needs this. | |
Protected Attributes | |
GNEApplicationWindow * | myGNEApp |
pointer to main window parent | |
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 | |
Private Member Functions | |
GNEOptionsDialog (const GNEOptionsDialog &)=delete | |
Invalidated copy constructor. | |
GNEOptionsDialog (GNEApplicationWindow *GNEApp, GUIIcon icon, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer, const char *titleName, const bool runDialog) | |
Constructor. | |
bool | loadConfiguration (const std::string &file) |
load configuration | |
GNEOptionsDialog & | operator= (const GNEOptionsDialog &)=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< GNEOptionsDialogElements::InputOption * > | myInputOptionEntries |
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 | GNEOptionsDialogElements |
FOX-declaration. | |
@briefA Dialog for setting options (see OptionsCont)
Definition at line 45 of file GNEOptionsDialog.h.
GNEOptionsDialog::~GNEOptionsDialog | ( | ) |
Destructor.
Definition at line 83 of file GNEOptionsDialog.cpp.
|
protected |
FOX needs this.
Definition at line 193 of file GNEOptionsDialog.cpp.
Referenced by Options(), and Run().
|
private |
Constructor.
[in] | GNEApp | netedit App |
[in] | optionsContainer | edited option container |
[in] | originalOptionsContainer | original options container |
[in] | titleName | The title to show |
[in] | icon | windows icon |
[in] | runDialog | check if this is a run dialog |
Definition at line 279 of file GNEOptionsDialog.cpp.
References ACCEPT, GUIDesigns::buildFXButton(), CANCEL, MFXGroupBoxModule::getCollapsableFrame(), OptionsCont::getDescription(), GUIIconSubSys::getIcon(), GUIMainWindow::getStaticTooltipMenu(), OptionsCont::getSubTopics(), OptionsCont::getSubTopicsEntries(), OptionsCont::getTypeName(), OptionsCont::getValueString(), GUIDesignAuxiliarFrame, GUIDesignAuxiliarHorizontalFrame, GUIDesignAuxiliarVerticalFrame, GUIDesignButtonConfiguration, GUIDesignButtonOK, GUIDesignCheckButtonThick, GUIDesignContentsFrame, GUIDesignHeight, GUIDesignHorizontalFrame, GUIDesignHorizontalFrameNoPadding, GUIDesignLabelThickedFixed, GUIDesignMFXCheckableButtonSquare, GUIDesignTextField, GUIDesignTextFieldNCol, GUIDesignTreeListFixedWidth, MID_CANCEL, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_GNE_BUTTON_DEFAULT, MID_GNE_RESET, MID_GNE_RUNNETGENERATE, MID_GNE_SEARCH_USEDESCRIPTION, MID_GNE_SELECT, MID_GNE_SET_ATTRIBUTE, MID_SHOWTOOLTIPS_MENU, myDescriptionSearchCheckButton, myEntriesFrame, myGNEApp, myIgnoredEntries, myIgnoredTopics, myInputOptionEntries, myOptionsContainer, myRootItem, mySearchButton, myShowToolTipsMenu, myTopicsTreeList, myTreeItemTopics, OPEN, RESET, SAVE, MFXCheckableButton::setChecked(), MFXCheckButtonTooltip::setToolTipText(), SHOWTOOLTIPS_MENU, TL, and TREELISTWIDTH.
|
privatedelete |
Invalidated copy constructor.
|
private |
load configuration
Definition at line 252 of file GNEOptionsDialog.cpp.
References OptionsLoader::errorOccurred(), myOptionsContainer, OptionsCont::resetWritable(), TL, StringUtils::transcode(), StringUtils::transcodeToLocal(), WRITE_ERROR, and WRITE_MESSAGE.
Referenced by onCmdLoadOptions().
long GNEOptionsDialog::onCmdCancel | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press cancel button
Definition at line 87 of file GNEOptionsDialog.cpp.
References myInputOptionEntries.
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdLoadOptions | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
load options
Definition at line 169 of file GNEOptionsDialog.cpp.
References loadConfiguration(), myInputOptionEntries, and GNEApplicationWindowHelper::openOptionFileDialog().
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdReset | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press reset button
Definition at line 98 of file GNEOptionsDialog.cpp.
References myInputOptionEntries.
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdResetDefault | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
reset default
Definition at line 184 of file GNEOptionsDialog.cpp.
References myInputOptionEntries.
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdRunNetgenerate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user press reset button
Definition at line 108 of file GNEOptionsDialog.cpp.
References MID_GNE_RUNNETGENERATE, and myGNEApp.
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdSaveOptions | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
save options
Definition at line 155 of file GNEOptionsDialog.cpp.
References myOptionsContainer, GNEApplicationWindowHelper::openOptionFileDialog(), StringUtils::transcodeToLocal(), and OptionsCont::writeConfiguration().
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdSearch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user searches
Definition at line 126 of file GNEOptionsDialog.cpp.
References MFXTextFieldIcon::getText(), mySearchButton, updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdSelectTopic | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
called when user select a topic in the list
Definition at line 117 of file GNEOptionsDialog.cpp.
References MFXTextFieldIcon::getText(), mySearchButton, and updateVisibleEntriesByTopic().
Referenced by FXDEFMAP().
long GNEOptionsDialog::onCmdShowToolTipsMenu | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
enable/disable show toolTip
Definition at line 137 of file GNEOptionsDialog.cpp.
References MFXCheckableButton::amChecked(), MFXStaticToolTip::enableStaticToolTip(), GUIGlChildWindow::getShowToolTipsMenu(), GUIMainWindow::getStaticTooltipMenu(), GNEApplicationWindow::getViewNet(), GNEViewNet::getViewParent(), myGNEApp, myShowToolTipsMenu, and MFXCheckableButton::setChecked().
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
|
static |
Constructor for options dialogs.
[in] | GNEApp | netedit App |
[in] | optionsContainer | edited option container |
[in] | originalOptionsContainer | original options container |
[in] | icon | windows icon |
[in] | name | The title to show |
Definition at line 66 of file GNEOptionsDialog.cpp.
References GNEOptionsDialog(), and myOptionsModified.
Referenced by GNEApplicationWindow::loadOSM(), GNEApplicationWindow::onCmdOpenOptionsDialog(), and GNEApplicationWindow::onCmdOpenSumoOptionsDialog().
|
static |
Constructor for run dialogs.
[in] | GNEApp | netedit App |
[in] | optionsContainer | edited option container |
[in] | originalOptionsContainer | original options container |
[in] | icon | windows icon |
[in] | name | The title to show |
Definition at line 75 of file GNEOptionsDialog.cpp.
References GNEOptionsDialog(), and myOptionsModified.
Referenced by GNEApplicationWindow::onCmdOpenNetgenerateOptionsDialog().
|
private |
update visible entries by search
Definition at line 229 of file GNEOptionsDialog.cpp.
References myDescriptionSearchCheckButton, myEntriesFrame, myInputOptionEntries, and StringUtils::to_lower_case().
Referenced by onCmdSearch().
|
private |
update visible entries by selected topic
Definition at line 201 of file GNEOptionsDialog.cpp.
References myEntriesFrame, myInputOptionEntries, and myTreeItemTopics.
Referenced by onCmdSearch(), and onCmdSelectTopic().
|
friend |
|
private |
checkbox for enable/disable search by description
Definition at line 137 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), and updateVisibleEntriesBySearch().
|
private |
vertical frame for entries
Definition at line 134 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
|
protected |
pointer to main window parent
Definition at line 112 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), onCmdRunNetgenerate(), and onCmdShowToolTipsMenu().
|
private |
ignores entries
Definition at line 152 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog().
|
private |
|
private |
Input option entries.
Definition at line 146 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), onCmdCancel(), onCmdLoadOptions(), onCmdReset(), onCmdResetDefault(), updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().
|
protected |
reference to edited Option container
Definition at line 115 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), GNEOptionsDialogElements::InputFloat::InputFloat(), GNEOptionsDialogElements::InputIntVector::InputIntVector(), GNEOptionsDialogElements::InputString::InputString(), GNEOptionsDialogElements::InputTime::InputTime(), loadConfiguration(), and onCmdSaveOptions().
|
protected |
flag for check if options was modified
Definition at line 121 of file GNEOptionsDialog.h.
|
protected |
reference to original Option container
Definition at line 118 of file GNEOptionsDialog.h.
|
private |
|
private |
search button
Definition at line 140 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), onCmdSearch(), and onCmdSelectTopic().
|
private |
checkable button for show toolTips
Definition at line 125 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), and onCmdShowToolTipsMenu().
|
private |
Topics elements tree.
Definition at line 128 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog().
|
private |
map with topics and their associated FXTreeItem
Definition at line 143 of file GNEOptionsDialog.h.
Referenced by GNEOptionsDialog(), and updateVisibleEntriesByTopic().