![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEAdditionalFrame.h>
Public Member Functions | |
void | abortConsecutiveLaneSelector () |
abort selection of consecutive lanes More... | |
bool | addSelectedLane (GNELane *lane, const Position &clickedPosition) |
return true if lane can be selected as consecutive lane More... | |
const RGBColor & | getSelectedLaneColor () const |
get selected lane color More... | |
const std::vector< std::pair< GNELane *, double > > & | getSelectedLanes () const |
get current selected lanes More... | |
void | hideSelectorLaneParentsModul () |
hide SelectorLaneParents More... | |
bool | isSelectingLanes () const |
return true if modul is selecting lane More... | |
bool | isShown () const |
return true if modul is shown More... | |
void | removeLastSelectedLane () |
remove last added point More... | |
SelectorLaneParents (GNEAdditionalFrame *additionalFrameParent) | |
FOX-declaration. More... | |
void | showSelectorLaneParentsModul () |
show SelectorLaneParents modul More... | |
void | startConsecutiveLaneSelector (GNELane *lane, const Position &clickedPosition) |
start selection of consecutive lanes More... | |
bool | stopConsecutiveLaneSelector () |
stop selection of consecutive lanes More... | |
~SelectorLaneParents () | |
destructor More... | |
FOX-callbacks | |
Called when the user press stop selection button | |
long | onCmdStopSelection (FXObject *, FXSelector, void *) |
long | onCmdAbortSelection (FXObject *, FXSelector, void *) |
Called when the user press abort selection button. More... | |
Protected Member Functions | |
SelectorLaneParents () | |
FOX needs this. More... | |
Private Member Functions | |
bool | isLaneSelected (GNELane *lane) const |
check if certain lane is selected More... | |
Private Attributes | |
FXButton * | myAbortSelectingButton |
button for abort selecting More... | |
GNEAdditionalFrame * | myAdditionalFrameParent |
pointer to additionalFrameParent More... | |
RGBColor | myCandidateLaneColor |
color for candidate lanes More... | |
std::vector< GNELane * > | myCandidateLanes |
Vector with the colored lanes. More... | |
RGBColor | mySelectedLaneColor |
color for selected lanes More... | |
std::vector< std::pair< GNELane *, double > > | mySelectedLanes |
Vector with the selected lanes and the clicked position. More... | |
FXButton * | myStopSelectingButton |
button for stop selecting More... | |
Definition at line 42 of file GNEAdditionalFrame.h.
GNEAdditionalFrame::SelectorLaneParents::SelectorLaneParents | ( | GNEAdditionalFrame * | additionalFrameParent | ) |
FOX-declaration.
constructor
Definition at line 72 of file GNEAdditionalFrame.cpp.
References RGBColor::GREEN, GUIDesignButton, MID_GNE_ADDITIONALFRAME_ABORTSELECTION, and MID_GNE_ADDITIONALFRAME_STOPSELECTION.
GNEAdditionalFrame::SelectorLaneParents::~SelectorLaneParents | ( | ) |
destructor
Definition at line 87 of file GNEAdditionalFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 96 of file GNEAdditionalFrame.h.
void GNEAdditionalFrame::SelectorLaneParents::abortConsecutiveLaneSelector | ( | ) |
abort selection of consecutive lanes
Definition at line 167 of file GNEAdditionalFrame.cpp.
References GNEFrame::getViewNet(), myAbortSelectingButton, myAdditionalFrameParent, myCandidateLanes, mySelectedLanes, and myStopSelectingButton.
Referenced by GNEViewNet::abortOperation(), GNEAdditionalFrame::buildAdditionalOverLanes(), hideSelectorLaneParentsModul(), onCmdAbortSelection(), showSelectorLaneParentsModul(), and stopConsecutiveLaneSelector().
bool GNEAdditionalFrame::SelectorLaneParents::addSelectedLane | ( | GNELane * | lane, |
const Position & | clickedPosition | ||
) |
return true if lane can be selected as consecutive lane
Definition at line 189 of file GNEAdditionalFrame.cpp.
References GNEEdge::getGNEConnections(), GNELane::getLengthGeometryFactor(), GNELane::getParentEdge(), GNELane::getShape(), GNEFrame::getViewNet(), isLaneSelected(), myAdditionalFrameParent, myCandidateLaneColor, myCandidateLanes, mySelectedLaneColor, mySelectedLanes, PositionVector::nearest_offset_to_point2D(), GNELane::setSpecialColor(), and WRITE_WARNING.
Referenced by GNEAdditionalFrame::buildAdditionalOverLanes(), GNEViewNet::onLeftBtnPress(), and startConsecutiveLaneSelector().
const RGBColor & GNEAdditionalFrame::SelectorLaneParents::getSelectedLaneColor | ( | ) | const |
get selected lane color
Definition at line 261 of file GNEAdditionalFrame.cpp.
References mySelectedLaneColor.
Referenced by GNEViewNet::drawLaneCandidates().
const std::vector< std::pair< GNELane *, double > > & GNEAdditionalFrame::SelectorLaneParents::getSelectedLanes | ( | ) | const |
get current selected lanes
Definition at line 267 of file GNEAdditionalFrame.cpp.
References mySelectedLanes.
Referenced by GNEAdditionalFrame::buildAdditionalOverLanes(), and GNEViewNet::drawLaneCandidates().
void GNEAdditionalFrame::SelectorLaneParents::hideSelectorLaneParentsModul | ( | ) |
hide SelectorLaneParents
Definition at line 100 of file GNEAdditionalFrame.cpp.
References abortConsecutiveLaneSelector().
Referenced by GNEAdditionalFrame::disableModuls(), and GNEAdditionalFrame::enableModuls().
|
private |
check if certain lane is selected
Definition at line 287 of file GNEAdditionalFrame.cpp.
References mySelectedLanes.
Referenced by addSelectedLane().
bool GNEAdditionalFrame::SelectorLaneParents::isSelectingLanes | ( | ) | const |
return true if modul is selecting lane
Definition at line 249 of file GNEAdditionalFrame.cpp.
References myStopSelectingButton.
Referenced by GNEAdditionalFrame::buildAdditionalOverLanes(), GNEViewNet::drawLaneCandidates(), GNEViewNet::hotkeyEnter(), and GNEViewNet::onLeftBtnPress().
bool GNEAdditionalFrame::SelectorLaneParents::isShown | ( | ) | const |
return true if modul is shown
Definition at line 255 of file GNEAdditionalFrame.cpp.
Referenced by GNEViewNet::onLeftBtnPress().
long GNEAdditionalFrame::SelectorLaneParents::onCmdAbortSelection | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user press abort selection button.
Definition at line 280 of file GNEAdditionalFrame.cpp.
References abortConsecutiveLaneSelector().
long GNEAdditionalFrame::SelectorLaneParents::onCmdStopSelection | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 273 of file GNEAdditionalFrame.cpp.
References stopConsecutiveLaneSelector().
void GNEAdditionalFrame::SelectorLaneParents::removeLastSelectedLane | ( | ) |
remove last added point
Definition at line 239 of file GNEAdditionalFrame.cpp.
References mySelectedLanes, and WRITE_WARNING.
void GNEAdditionalFrame::SelectorLaneParents::showSelectorLaneParentsModul | ( | ) |
show SelectorLaneParents modul
Definition at line 91 of file GNEAdditionalFrame.cpp.
References abortConsecutiveLaneSelector().
Referenced by GNEAdditionalFrame::enableModuls().
void GNEAdditionalFrame::SelectorLaneParents::startConsecutiveLaneSelector | ( | GNELane * | lane, |
const Position & | clickedPosition | ||
) |
start selection of consecutive lanes
Definition at line 109 of file GNEAdditionalFrame.cpp.
References addSelectedLane(), myAbortSelectingButton, and myStopSelectingButton.
Referenced by GNEAdditionalFrame::buildAdditionalOverLanes(), and GNEViewNet::onLeftBtnPress().
bool GNEAdditionalFrame::SelectorLaneParents::stopConsecutiveLaneSelector | ( | ) |
stop selection of consecutive lanes
Definition at line 122 of file GNEAdditionalFrame.cpp.
References abortConsecutiveLaneSelector(), GNEFrame::ACAttributes::areValuesValid(), GNEAdditionalHandler::buildAdditional(), GNEAdditionalFrame::buildAdditionalCommonAttributes(), GNEAdditionalFrame::generateID(), GNEFrame::ACAttributes::getAttributesAndValues(), GNEFrame::ItemSelector::getCurrentTagProperties(), GNEFrame::NeteditAttributes::getNeteditAttributesAndValues(), GNEAttributeCarrier::TagProperties::getTag(), GNEAttributeCarrier::TagProperties::getTagStr(), joinToString(), GNEAdditionalFrame::myAdditionalAttributes, myAdditionalFrameParent, GNEAdditionalFrame::myItemSelector, GNEAdditionalFrame::myNeteditAttributes, mySelectedLanes, GNEFrame::myViewNet, GNEFrame::ACAttributes::showWarningMessage(), SUMO_ATTR_ENDPOS, SUMO_ATTR_ID, SUMO_ATTR_LANES, SUMO_ATTR_POSITION, toString(), and WRITE_WARNING.
Referenced by GNEViewNet::hotkeyEnter(), and onCmdStopSelection().
|
private |
button for abort selecting
Definition at line 106 of file GNEAdditionalFrame.h.
Referenced by abortConsecutiveLaneSelector(), and startConsecutiveLaneSelector().
|
private |
pointer to additionalFrameParent
Definition at line 100 of file GNEAdditionalFrame.h.
Referenced by abortConsecutiveLaneSelector(), addSelectedLane(), and stopConsecutiveLaneSelector().
|
private |
color for candidate lanes
Definition at line 115 of file GNEAdditionalFrame.h.
Referenced by addSelectedLane().
|
private |
Vector with the colored lanes.
Definition at line 112 of file GNEAdditionalFrame.h.
Referenced by abortConsecutiveLaneSelector(), and addSelectedLane().
|
private |
color for selected lanes
Definition at line 118 of file GNEAdditionalFrame.h.
Referenced by addSelectedLane(), and getSelectedLaneColor().
|
private |
Vector with the selected lanes and the clicked position.
Definition at line 109 of file GNEAdditionalFrame.h.
Referenced by abortConsecutiveLaneSelector(), addSelectedLane(), getSelectedLanes(), isLaneSelected(), removeLastSelectedLane(), and stopConsecutiveLaneSelector().
|
private |
button for stop selecting
Definition at line 103 of file GNEAdditionalFrame.h.
Referenced by abortConsecutiveLaneSelector(), isSelectingLanes(), and startConsecutiveLaneSelector().