![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEDialogACChooser.h>
Public Member Functions | |
GUIGlObject * | getObject () const |
Returns the chosen (selected) object. More... | |
GNEDialogACChooser (GNEViewParent *viewParent, FXIcon *icon, const std::string &title, const std::vector< GNEAttributeCarrier *> &ACs) | |
Constructor. More... | |
void | show () |
sets the focus after the window is created to work-around bug in libfox More... | |
~GNEDialogACChooser () | |
Destructor. More... | |
FOX-callbacks | |
long | onCmdCenter (FXObject *, FXSelector, void *) |
Callback: The selected item shall be centered within the calling view. More... | |
long | onCmdTrack (FXObject *, FXSelector, void *) |
Callback: The selected vehicle shall be tracked within the calling view. More... | |
long | onCmdClose (FXObject *, FXSelector, void *) |
Callback: The dialog shall be closed. More... | |
long | onChgText (FXObject *, FXSelector, void *) |
Callback: Something has been typed into the the field. More... | |
long | onCmdText (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. More... | |
long | onListKeyPress (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. More... | |
long | onCmdFilter (FXObject *, FXSelector, void *) |
Callback: Hides unselected items if pressed. More... | |
long | onCmdToggleSelection (FXObject *, FXSelector, void *) |
Callback: Toggle selection status of current object. More... | |
long | onCmdLocateByName (FXObject *, FXSelector, void *) |
Callback: Toggle locator by name. More... | |
Protected Member Functions | |
std::string | getObjectName (GUIGlObject *o) const override |
retrieve name for the given object (special case for TLS) More... | |
GNEDialogACChooser () | |
FOX needs this. More... | |
void | refreshList (const std::vector< GUIGlID > &ids) |
update the list with the given ids More... | |
void | toggleSelection (int listIndex) override |
toggle selection (handled differently in NETEDIT) More... | |
Private Attributes | |
std::vector< GNEAttributeCarrier * > | myACs |
list of displayed ACs More... | |
bool | myLocateTLS |
whether the current locator is for TLS More... | |
GNEViewParent * | myViewParent |
Instances of this class are windows that display the list of instances from a given artifact like vehicles, edges or junctions and allow one of their items
Definition at line 50 of file GNEDialogACChooser.h.
GNEDialogACChooser::GNEDialogACChooser | ( | GNEViewParent * | viewParent, |
FXIcon * | icon, | ||
const std::string & | title, | ||
const std::vector< GNEAttributeCarrier *> & | ACs | ||
) |
Constructor.
[in] | viewParent | GNEViewParent of Netedit |
[in] | icon | The icon to use |
[in] | title | The title to use |
[in] | ACs | list of choosen ACs |
Definition at line 37 of file GNEDialogACChooser.cpp.
References GUIDialog_GLObjChooser::refreshList().
GNEDialogACChooser::~GNEDialogACChooser | ( | ) |
Destructor.
Definition at line 52 of file GNEDialogACChooser.cpp.
References GNEViewParent::eraseACChooserDialog(), and myViewParent.
|
inlineprotected |
FOX needs this.
Definition at line 66 of file GNEDialogACChooser.h.
References getObjectName(), and toggleSelection().
|
inlineinherited |
Returns the chosen (selected) object.
Definition at line 75 of file GUIDialog_GLObjChooser.h.
References GUIDialog_GLObjChooser::getObjectName(), GUIDialog_GLObjChooser::mySelected, GUIDialog_GLObjChooser::onChgText(), GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdClose(), GUIDialog_GLObjChooser::onCmdFilter(), GUIDialog_GLObjChooser::onCmdLocateByName(), GUIDialog_GLObjChooser::onCmdText(), GUIDialog_GLObjChooser::onCmdToggleSelection(), GUIDialog_GLObjChooser::onCmdTrack(), GUIDialog_GLObjChooser::onListKeyPress(), GUIDialog_GLObjChooser::refreshList(), GUIDialog_GLObjChooser::show(), and GUIDialog_GLObjChooser::toggleSelection().
|
overrideprotectedvirtual |
retrieve name for the given object (special case for TLS)
Reimplemented from GUIDialog_GLObjChooser.
Definition at line 69 of file GNEDialogACChooser.cpp.
References NBNode::getControllingTLS(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), GUIDialog_GLObjChooser::getObjectName(), and myLocateTLS.
Referenced by GNEDialogACChooser().
|
inherited |
Callback: Something has been typed into the the field.
Definition at line 143 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myCenterButton, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myLocateByName, GUIDialog_GLObjChooser::myTextEntry, and GUIDialog_GLObjChooser::myTrackButton.
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: The selected item shall be centered within the calling view.
Definition at line 109 of file GUIDialog_GLObjChooser.cpp.
References GUIGlChildWindow::getView(), GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, GUIGlChildWindow::setView(), and GUISUMOAbstractView::stopTrack().
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: The dialog shall be closed.
Definition at line 136 of file GUIDialog_GLObjChooser.cpp.
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: Hides unselected items if pressed.
Definition at line 202 of file GUIDialog_GLObjChooser.cpp.
References flag, GUIIconSubSys::getIcon(), ICON_FLAG, GUIDialog_GLObjChooser::myList, and GUIDialog_GLObjChooser::refreshList().
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: Toggle locator by name.
Definition at line 263 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObjectStorage::getObjectBlocking(), GUIDialog_GLObjChooser::getObjectName(), GUIGlObjectStorage::gIDStorage, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myLocateByName, GUIDialog_GLObjChooser::myTextEntry, GUIDialog_GLObjChooser::refreshList(), and GUIGlObjectStorage::unblockObject().
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 177 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlChildWindow::setView().
Referenced by GUIDialog_GLObjChooser::getObject(), and GUIDialog_GLObjChooser::onListKeyPress().
|
inherited |
Callback: Toggle selection status of current object.
Definition at line 245 of file GUIDialog_GLObjChooser.cpp.
References flag, GUIIconSubSys::getIcon(), GUIGlChildWindow::getView(), ICON_FLAG, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIDialog_GLObjChooser::toggleSelection().
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: The selected vehicle shall be tracked within the calling view.
Definition at line 120 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObject::getType(), GUIGlChildWindow::getView(), GUIGlObjectStorage::gIDStorage, GLO_VEHICLE, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, GUIGlChildWindow::setView(), GUISUMOAbstractView::startTrack(), and GUIGlObjectStorage::unblockObject().
Referenced by GUIDialog_GLObjChooser::getObject().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 188 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::onCmdText().
Referenced by GUIDialog_GLObjChooser::getObject().
|
protectedinherited |
update the list with the given ids
Definition at line 226 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObjectStorage::getObjectBlocking(), GUIDialog_GLObjChooser::getObjectName(), GUIGlObjectStorage::gIDStorage, ICON_FLAG, GUIGlChildWindow::isSelected(), GUIDialog_GLObjChooser::myIDs, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlObjectStorage::unblockObject().
Referenced by GUIDialog_GLObjChooser::getObject(), GNEDialogACChooser(), GUIDialog_GLObjChooser::onCmdFilter(), and GUIDialog_GLObjChooser::onCmdLocateByName().
|
inherited |
sets the focus after the window is created to work-around bug in libfox
Definition at line 102 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myTextEntry.
Referenced by GUIDialog_GLObjChooser::getObject().
|
overrideprotectedvirtual |
toggle selection (handled differently in NETEDIT)
Reimplemented from GUIDialog_GLObjChooser.
Definition at line 58 of file GNEDialogACChooser.cpp.
References GNEAttributeCarrier::isAttributeCarrierSelected(), myACs, GNEAttributeCarrier::selectAttributeCarrier(), and GNEAttributeCarrier::unselectAttributeCarrier().
Referenced by GNEDialogACChooser().
|
private |
list of displayed ACs
Definition at line 75 of file GNEDialogACChooser.h.
Referenced by toggleSelection().
|
private |
whether the current locator is for TLS
Definition at line 80 of file GNEDialogACChooser.h.
Referenced by getObjectName().
|
private |
Definition at line 76 of file GNEDialogACChooser.h.
Referenced by ~GNEDialogACChooser().