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

#include <GNEOptionsDialog.h>

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

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

GNEApplicationWindowmyGNEApp
 pointer to main window parent
 
OptionsContmyOptionsContainer
 reference to edited Option container
 
bool myOptionsModified = false
 flag for check if options was modified
 
const OptionsContmyOriginalOptionsContainer
 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
 
GNEOptionsDialogoperator= (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

MFXCheckButtonTooltipmyDescriptionSearchCheckButton = 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
 
MFXTextFieldSearchmySearchButton = nullptr
 search button
 
MFXCheckableButtonmyShowToolTipsMenu = 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.
 

Detailed Description

@briefA Dialog for setting options (see OptionsCont)

Definition at line 45 of file GNEOptionsDialog.h.

Constructor & Destructor Documentation

◆ ~GNEOptionsDialog()

GNEOptionsDialog::~GNEOptionsDialog ( )

Destructor.

Definition at line 83 of file GNEOptionsDialog.cpp.

◆ GNEOptionsDialog() [1/3]

GNEOptionsDialog::GNEOptionsDialog ( )
protected

FOX needs this.

Definition at line 193 of file GNEOptionsDialog.cpp.

Referenced by Options(), and Run().

Here is the caller graph for this function:

◆ GNEOptionsDialog() [2/3]

GNEOptionsDialog::GNEOptionsDialog ( GNEApplicationWindow GNEApp,
GUIIcon  icon,
OptionsCont optionsContainer,
const OptionsCont originalOptionsContainer,
const char *  titleName,
const bool  runDialog 
)
private

Constructor.

Parameters
[in]GNEAppnetedit App
[in]optionsContaineredited option container
[in]originalOptionsContaineroriginal options container
[in]titleNameThe title to show
[in]iconwindows icon
[in]runDialogcheck 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.

◆ GNEOptionsDialog() [3/3]

GNEOptionsDialog::GNEOptionsDialog ( const GNEOptionsDialog )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ loadConfiguration()

bool GNEOptionsDialog::loadConfiguration ( const std::string &  file)
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().

Here is the caller graph for this function:

◆ onCmdCancel()

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().

Here is the caller graph for this function:

◆ onCmdLoadOptions()

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().

Here is the caller graph for this function:

◆ onCmdReset()

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().

Here is the caller graph for this function:

◆ onCmdResetDefault()

long GNEOptionsDialog::onCmdResetDefault ( FXObject *  ,
FXSelector  ,
void *   
)

reset default

Definition at line 184 of file GNEOptionsDialog.cpp.

References myInputOptionEntries.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdRunNetgenerate()

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().

Here is the caller graph for this function:

◆ onCmdSaveOptions()

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().

Here is the caller graph for this function:

◆ onCmdSearch()

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().

Here is the caller graph for this function:

◆ onCmdSelectTopic()

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().

Here is the caller graph for this function:

◆ onCmdShowToolTipsMenu()

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().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ Options()

std::pair< int, bool > GNEOptionsDialog::Options ( GNEApplicationWindow GNEApp,
GUIIcon  icon,
OptionsCont optionsContainer,
const OptionsCont originalOptionsContainer,
const char *  titleName 
)
static

Constructor for options dialogs.

Parameters
[in]GNEAppnetedit App
[in]optionsContaineredited option container
[in]originalOptionsContaineroriginal options container
[in]iconwindows icon
[in]nameThe title to show
Returns
pair with int (TRUE, FALSE) depending of execution, and bool for check if options were modified

Definition at line 66 of file GNEOptionsDialog.cpp.

References GNEOptionsDialog(), and myOptionsModified.

Referenced by GNEApplicationWindow::loadOSM(), GNEApplicationWindow::onCmdOpenOptionsDialog(), and GNEApplicationWindow::onCmdOpenSumoOptionsDialog().

Here is the caller graph for this function:

◆ Run()

std::pair< int, bool > GNEOptionsDialog::Run ( GNEApplicationWindow GNEApp,
GUIIcon  icon,
OptionsCont optionsContainer,
const OptionsCont originalOptionsContainer,
const char *  titleName 
)
static

Constructor for run dialogs.

Parameters
[in]GNEAppnetedit App
[in]optionsContaineredited option container
[in]originalOptionsContaineroriginal options container
[in]iconwindows icon
[in]nameThe title to show
Returns
pair with int (TRUE, FALSE) depending of execution, and bool for check if options were modified

Definition at line 75 of file GNEOptionsDialog.cpp.

References GNEOptionsDialog(), and myOptionsModified.

Referenced by GNEApplicationWindow::onCmdOpenNetgenerateOptionsDialog().

Here is the caller graph for this function:

◆ updateVisibleEntriesBySearch()

void GNEOptionsDialog::updateVisibleEntriesBySearch ( std::string  searchText)
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().

Here is the caller graph for this function:

◆ updateVisibleEntriesByTopic()

bool GNEOptionsDialog::updateVisibleEntriesByTopic ( )
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().

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ GNEOptionsDialogElements

FOX-declaration.

declare friend class

Definition at line 50 of file GNEOptionsDialog.h.

Field Documentation

◆ myDescriptionSearchCheckButton

MFXCheckButtonTooltip* GNEOptionsDialog::myDescriptionSearchCheckButton = nullptr
private

checkbox for enable/disable search by description

Definition at line 137 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), and updateVisibleEntriesBySearch().

◆ myEntriesFrame

FXVerticalFrame* GNEOptionsDialog::myEntriesFrame = nullptr
private

vertical frame for entries

Definition at line 134 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().

◆ myGNEApp

GNEApplicationWindow* GNEOptionsDialog::myGNEApp
protected

pointer to main window parent

Definition at line 112 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), onCmdRunNetgenerate(), and onCmdShowToolTipsMenu().

◆ myIgnoredEntries

const std::set<std::string> GNEOptionsDialog::myIgnoredEntries = {"geometry.remove", "edges.join", "geometry.split", "ramps.guess", "ramps.set"}
private

ignores entries

Definition at line 152 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog().

◆ myIgnoredTopics

const std::set<std::string> GNEOptionsDialog::myIgnoredTopics = {"Configuration"}
private

ignores topics

Definition at line 149 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog().

◆ myInputOptionEntries

std::vector<GNEOptionsDialogElements::InputOption*> GNEOptionsDialog::myInputOptionEntries
private

◆ myOptionsContainer

◆ myOptionsModified

bool GNEOptionsDialog::myOptionsModified = false
protected

flag for check if options was modified

Definition at line 121 of file GNEOptionsDialog.h.

Referenced by Options(), and Run().

◆ myOriginalOptionsContainer

const OptionsCont& GNEOptionsDialog::myOriginalOptionsContainer
protected

reference to original Option container

Definition at line 118 of file GNEOptionsDialog.h.

◆ myRootItem

FXTreeItem* GNEOptionsDialog::myRootItem = nullptr
private

root item

Definition at line 131 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog().

◆ mySearchButton

MFXTextFieldSearch* GNEOptionsDialog::mySearchButton = nullptr
private

search button

Definition at line 140 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), onCmdSearch(), and onCmdSelectTopic().

◆ myShowToolTipsMenu

MFXCheckableButton* GNEOptionsDialog::myShowToolTipsMenu = nullptr
private

checkable button for show toolTips

Definition at line 125 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), and onCmdShowToolTipsMenu().

◆ myTopicsTreeList

FXTreeList* GNEOptionsDialog::myTopicsTreeList = nullptr
private

Topics elements tree.

Definition at line 128 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog().

◆ myTreeItemTopics

std::map<FXTreeItem*, std::string> GNEOptionsDialog::myTreeItemTopics
private

map with topics and their associated FXTreeItem

Definition at line 143 of file GNEOptionsDialog.h.

Referenced by GNEOptionsDialog(), and updateVisibleEntriesByTopic().


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