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

#include <GNEOptionsEditor.h>

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

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

OptionsContmyCopyOfOptionsContainer = nullptr
 copy of edited Option container, used for reset
GNEDialogmyDialog = nullptr
 reference to dialog
OptionsContmyOptionsContainer
 reference to edited Option container
bool myOptionsModified = false
 flag for check if options was modified
const OptionsContmyOriginalOptionsContainer
 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
GNEOptionsEditoroperator= (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

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< GNEOptionsEditorRow::OptionRow * > myOptionRowEntries
 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 GNEOptionsEditorRow
 FOX-declaration.

Detailed Description

Definition at line 43 of file GNEOptionsEditor.h.

Constructor & Destructor Documentation

◆ GNEOptionsEditor() [1/3]

GNEOptionsEditor::GNEOptionsEditor ( GNEDialog * dialog,
const std::string & titleName,
OptionsCont & optionsContainer,
const OptionsCont & originalOptionsContainer )

◆ ~GNEOptionsEditor()

GNEOptionsEditor::~GNEOptionsEditor ( )

Destructor.

Definition at line 161 of file GNEOptionsEditor.cpp.

References myCopyOfOptionsContainer.

◆ GNEOptionsEditor() [2/3]

GNEOptionsEditor::GNEOptionsEditor ( )
protected

FOX needs this.

Definition at line 273 of file GNEOptionsEditor.cpp.

References myOptionsContainer, and myOriginalOptionsContainer.

◆ GNEOptionsEditor() [3/3]

GNEOptionsEditor::GNEOptionsEditor ( const GNEOptionsEditor & )
privatedelete

Invalidated copy constructor.

References GNEOptionsEditor().

Member Function Documentation

◆ isOptionModified()

bool GNEOptionsEditor::isOptionModified ( ) const

check if option was modified

Definition at line 173 of file GNEOptionsEditor.cpp.

References myOptionsModified.

Referenced by GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ loadConfiguration()

bool GNEOptionsEditor::loadConfiguration ( const std::string & file)
private

load configuration

Definition at line 331 of file GNEOptionsEditor.cpp.

References OptionsLoader::errorOccurred(), myOptionsContainer, TL, StringUtils::transcode(), StringUtils::transcodeToLocal(), WRITE_ERROR, and WRITE_MESSAGE.

Referenced by onCmdLoadOptions().

Here is the caller graph for this function:

◆ onCmdLoadOptions()

long GNEOptionsEditor::onCmdLoadOptions ( FXObject * ,
FXSelector ,
void *  )

load options

Definition at line 245 of file GNEOptionsEditor.cpp.

References GNEDialog::ACCEPT, GNEFileDialog::LOAD_SINGLE, loadConfiguration(), myDialog, myOptionRowEntries, GNEFileDialog::NETEDIT, TL, and SUMOXMLDefinitions::XMLFileExtensions.

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ onCmdResetDefault()

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

reset default

Definition at line 264 of file GNEOptionsEditor.cpp.

References myOptionRowEntries.

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ onCmdSaveOptions()

long GNEOptionsEditor::onCmdSaveOptions ( FXObject * ,
FXSelector ,
void *  )

save options

Definition at line 227 of file GNEOptionsEditor.cpp.

References GNEDialog::ACCEPT, myDialog, myOptionsContainer, GNEFileDialog::NETEDIT, GNEFileDialog::SAVE, TL, StringUtils::transcodeToLocal(), and SUMOXMLDefinitions::XMLFileExtensions.

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ onCmdSearch()

long GNEOptionsEditor::onCmdSearch ( FXObject * ,
FXSelector ,
void *  )

called when user searches

Definition at line 196 of file GNEOptionsEditor.cpp.

References mySearchButton, updateVisibleEntriesBySearch(), and updateVisibleEntriesByTopic().

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ onCmdSelectTopic()

long GNEOptionsEditor::onCmdSelectTopic ( FXObject * ,
FXSelector ,
void *  )

called when user select a topic in the list

Definition at line 187 of file GNEOptionsEditor.cpp.

References mySearchButton, and updateVisibleEntriesByTopic().

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ onCmdShowToolTipsMenu()

long GNEOptionsEditor::onCmdShowToolTipsMenu ( FXObject * ,
FXSelector ,
void *  )

enable/disable show toolTip

Definition at line 207 of file GNEOptionsEditor.cpp.

References myDialog, and myShowToolTipsMenu.

Referenced by FXDEFMAP(), and GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

References GNEOptionsEditor().

◆ resetAllOptions()

void GNEOptionsEditor::resetAllOptions ( )

reset options

Definition at line 178 of file GNEOptionsEditor.cpp.

References myOptionRowEntries, and myOptionsModified.

Referenced by GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ runInternalTest()

void GNEOptionsEditor::runInternalTest ( const InternalTestStep::DialogArgument * dialogArgument)

run internal test

Definition at line 167 of file GNEOptionsEditor.cpp.

Referenced by GNEOptionsEditorRow.

Here is the caller graph for this function:

◆ updateVisibleEntriesBySearch()

void GNEOptionsEditor::updateVisibleEntriesBySearch ( std::string searchText)
private

update visible entries by search

Definition at line 308 of file GNEOptionsEditor.cpp.

References myDescriptionSearchCheckButton, myEntriesFrame, myOptionRowEntries, and StringUtils::to_lower_case().

Referenced by onCmdSearch().

Here is the caller graph for this function:

◆ updateVisibleEntriesByTopic()

bool GNEOptionsEditor::updateVisibleEntriesByTopic ( )
private

update visible entries by selected topic

Definition at line 280 of file GNEOptionsEditor.cpp.

References myEntriesFrame, myOptionRowEntries, and myTreeItemTopics.

Referenced by onCmdSearch(), and onCmdSelectTopic().

Here is the caller graph for this function:

◆ GNEOptionsEditorRow

Field Documentation

◆ myCopyOfOptionsContainer

OptionsCont* GNEOptionsEditor::myCopyOfOptionsContainer = nullptr
protected

copy of edited Option container, used for reset

Definition at line 107 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), and ~GNEOptionsEditor().

◆ myDescriptionSearchCheckButton

MFXCheckButtonTooltip* GNEOptionsEditor::myDescriptionSearchCheckButton = nullptr
private

checkbox for enable/disable search by description

Definition at line 129 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), and updateVisibleEntriesBySearch().

◆ myDialog

GNEDialog* GNEOptionsEditor::myDialog = nullptr
protected

reference to dialog

Definition at line 101 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), onCmdLoadOptions(), onCmdSaveOptions(), and onCmdShowToolTipsMenu().

◆ myEntriesFrame

FXVerticalFrame* GNEOptionsEditor::myEntriesFrame = nullptr
private

vertical frame for entries

Definition at line 126 of file GNEOptionsEditor.h.

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

◆ myIgnoredEntries

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

ignores entries

Definition at line 144 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor().

◆ myIgnoredTopics

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

ignores topics

Definition at line 141 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor().

◆ myOptionRowEntries

std::vector<GNEOptionsEditorRow::OptionRow*> GNEOptionsEditor::myOptionRowEntries
private

◆ myOptionsContainer

OptionsCont& GNEOptionsEditor::myOptionsContainer
protected

reference to edited Option container

Definition at line 104 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), GNEOptionsEditor(), loadConfiguration(), and onCmdSaveOptions().

◆ myOptionsModified

bool GNEOptionsEditor::myOptionsModified = false
protected

flag for check if options was modified

Definition at line 113 of file GNEOptionsEditor.h.

Referenced by isOptionModified(), and resetAllOptions().

◆ myOriginalOptionsContainer

const OptionsCont& GNEOptionsEditor::myOriginalOptionsContainer
protected

reference to original Option container, used for restoring

Definition at line 110 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), and GNEOptionsEditor().

◆ myRootItem

FXTreeItem* GNEOptionsEditor::myRootItem = nullptr
private

root item

Definition at line 123 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor().

◆ mySearchButton

MFXTextFieldSearch* GNEOptionsEditor::mySearchButton = nullptr
private

search button

Definition at line 132 of file GNEOptionsEditor.h.

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

◆ myShowToolTipsMenu

MFXCheckableButton* GNEOptionsEditor::myShowToolTipsMenu = nullptr
private

checkable button for show toolTips

Definition at line 117 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), and onCmdShowToolTipsMenu().

◆ myTopicsTreeList

FXTreeList* GNEOptionsEditor::myTopicsTreeList = nullptr
private

Topics elements tree.

Definition at line 120 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor().

◆ myTreeItemTopics

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

map with topics and their associated FXTreeItem

Definition at line 135 of file GNEOptionsEditor.h.

Referenced by GNEOptionsEditor(), and updateVisibleEntriesByTopic().


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