82 myAdditionalFrameParent(additionalFrameParent) {
87 myStopSelectingButton->disable();
88 myAbortSelectingButton->disable();
98 abortConsecutiveLaneSelector();
107 abortConsecutiveLaneSelector();
118 myStopSelectingButton->enable();
119 myAbortSelectingButton->enable();
121 addSelectedLane(lane, clickedPosition);
129 const auto& tagValues = myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTagProperties();
131 if (mySelectedLanes.size() < 2) {
132 WRITE_WARNING(myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTagProperties().getTagStr() +
" requires at least two lanes.");
134 abortConsecutiveLaneSelector();
138 std::map<SumoXMLAttr, std::string> valuesMap = myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(
true);
140 myAdditionalFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(valuesMap,
nullptr);
143 valuesMap[
SUMO_ATTR_ID] = myAdditionalFrameParent->generateID(
nullptr);
146 std::vector<std::string> laneIDs;
147 for (
auto i : mySelectedLanes) {
148 laneIDs.push_back(i.first->getID());
156 if (!myAdditionalFrameParent->buildAdditionalCommonAttributes(valuesMap, tagValues)) {
160 if (myAdditionalFrameParent->myAdditionalAttributes->areValuesValid() ==
false) {
161 myAdditionalFrameParent->myAdditionalAttributes->showWarningMessage();
167 if (
GNEAdditionalHandler::buildAdditional(myAdditionalFrameParent->getViewNet()->getNet(),
true, myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTagProperties().getTag(), SUMOSAXAttrs,
nullptr)) {
169 abortConsecutiveLaneSelector();
171 myAdditionalFrameParent->myAdditionalAttributes->refreshRows();
183 for (
const auto& lane : myCandidateLanes) {
184 lane->resetCandidateFlags();
187 myCandidateLanes.clear();
189 for (
const auto& lane : mySelectedLanes) {
190 lane.first->resetCandidateFlags();
193 mySelectedLanes.clear();
195 myStopSelectingButton->disable();
196 myAbortSelectingButton->disable();
198 myAdditionalFrameParent->getViewNet()->updateViewNet();
205 if (lane ==
nullptr) {
209 for (
auto i : mySelectedLanes) {
210 if (i.first == lane) {
216 if (mySelectedLanes.size() > 0) {
217 if (myCandidateLanes.empty()) {
220 }
else if ((myCandidateLanes.size() > 0) && (std::find(myCandidateLanes.begin(), myCandidateLanes.end(), lane) == myCandidateLanes.end())) {
230 for (
const auto& candidateLane : myCandidateLanes) {
231 candidateLane->setPossibleCandidate(
false);
234 myCandidateLanes.clear();
238 if ((lane == connection->getLaneFrom()) && (!isLaneSelected(connection->getLaneTo()))) {
240 connection->getLaneTo()->setPossibleCandidate(
true);
241 myCandidateLanes.push_back(connection->getLaneTo());
245 myAdditionalFrameParent->getViewNet()->updateViewNet();
252 if (mySelectedLanes.size() > 1) {
253 mySelectedLanes.pop_back();
262 return myStopSelectingButton->isEnabled();
272 const std::vector<std::pair<GNELane*, double> >&
274 return mySelectedLanes;
280 stopConsecutiveLaneSelector();
287 abortConsecutiveLaneSelector();
294 for (
auto i : mySelectedLanes) {
295 if (i.first == lane) {
308 myAdditionalFrameParent(additionalFrameParent) {
337 std::vector<std::string> vectorOfIds;
338 if (myUseSelectedEdgesCheckButton->getCheck()) {
340 std::vector<GNEEdge*> selectedEdges = myAdditionalFrameParent->getViewNet()->getNet()->retrieveEdges(
true);
342 for (
auto i : selectedEdges) {
343 vectorOfIds.push_back(i->getID());
347 for (
int i = 0; i < myList->getNumItems(); i++) {
348 if (myList->isItemSelected(i)) {
349 vectorOfIds.push_back(myList->getItem(i)->getText().text());
360 myList->clearItems();
363 std::vector<GNEEdge*> vectorOfEdges = myAdditionalFrameParent->getViewNet()->getNet()->retrieveEdges(
false);
365 for (
auto i : vectorOfEdges) {
367 if (i->getID().find(search) != std::string::npos) {
368 myList->appendItem(i->getID().c_str());
372 myUseSelectedEdgesCheckButton->setCheck(
false);
391 if (myAdditionalFrameParent->getViewNet()->getNet()->retrieveEdges(
true).size() > 0) {
392 myUseSelectedEdgesCheckButton->enable();
394 myUseSelectedEdgesCheckButton->disable();
401 if (myUseSelectedEdgesCheckButton->getCheck()) {
402 myEdgesSearch->hide();
404 myClearEdgesSelection->hide();
405 myInvertEdgesSelection->hide();
407 myEdgesSearch->show();
409 myClearEdgesSelection->show();
410 myInvertEdgesSelection->show();
423 showSelectorChildEdgesModul(myEdgesSearch->getText().text());
436 for (
int i = 0; i < myList->getNumItems(); i++) {
437 if (myList->getItem(i)->isSelected()) {
438 myList->deselectItem(i);
447 for (
int i = 0; i < myList->getNumItems(); i++) {
448 if (myList->getItem(i)->isSelected()) {
449 myList->deselectItem(i);
451 myList->selectItem(i);
463 myAdditionalFrameParent(additionalFrameParent) {
492 std::vector<std::string> vectorOfIds;
493 if (myUseSelectedLanesCheckButton->getCheck()) {
495 std::vector<GNELane*> selectedLanes = myAdditionalFrameParent->getViewNet()->getNet()->retrieveLanes(
true);
497 for (
auto i : selectedLanes) {
498 vectorOfIds.push_back(i->getID());
502 for (
int i = 0; i < myList->getNumItems(); i++) {
503 if (myList->isItemSelected(i)) {
504 vectorOfIds.push_back(myList->getItem(i)->getText().text());
514 myList->clearItems();
515 std::vector<GNELane*> vectorOfLanes = myAdditionalFrameParent->getViewNet()->getNet()->retrieveLanes(
false);
516 for (
auto i : vectorOfLanes) {
517 if (i->getID().find(search) != std::string::npos) {
518 myList->appendItem(i->getID().c_str());
522 myUseSelectedLanesCheckButton->setCheck(
false);
537 if (myAdditionalFrameParent->getViewNet()->getNet()->retrieveLanes(
true).size() > 0) {
538 myUseSelectedLanesCheckButton->enable();
540 myUseSelectedLanesCheckButton->disable();
547 if (myUseSelectedLanesCheckButton->getCheck()) {
548 myLanesSearch->hide();
550 clearLanesSelection->hide();
551 invertLanesSelection->hide();
553 myLanesSearch->show();
555 clearLanesSelection->show();
556 invertLanesSelection->show();
582 for (
int i = 0; i < myList->getNumItems(); i++) {
583 if (myList->getItem(i)->isSelected()) {
584 myList->deselectItem(i);
593 for (
int i = 0; i < myList->getNumItems(); i++) {
594 if (myList->getItem(i)->isSelected()) {
595 myList->deselectItem(i);
597 myList->selectItem(i);
609 myAdditionalFrameParent(additionalFrameParent) {
626 "BACKSPACE: undo click",
639 myFinishCreationButton->disable();
640 myAbortCreationButton->disable();
641 myRemoveLastInsertedElement->disable();
663 if (lane ==
nullptr) {
667 if ((myLanePath.size() > 0) && (myLanePath.back().first == lane)) {
683 const Position mousePos = myAdditionalFrameParent->getViewNet()->snapToActiveGrid(myAdditionalFrameParent->getViewNet()->getPositionInformation());
687 myLanePath.push_back(std::make_pair(lane, offset));
689 myAbortCreationButton->enable();
691 myFinishCreationButton->enable();
693 myAdditionalFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->disableUndoRedo(
"route creation");
695 if (myLanePath.size() > 1) {
696 myRemoveLastInsertedElement->enable();
698 myRemoveLastInsertedElement->disable();
701 updateInfoRouteLabel();
710 return (myShowCandidateLanes->getCheck() == TRUE);
717 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
718 for (
const auto& lane : edge.second->getLanes()) {
719 lane->resetCandidateFlags();
723 if (myLanePath.size() > 0 && (myShowCandidateLanes->getCheck() == TRUE)) {
725 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
726 for (
const auto& lane : edge.second->getLanes()) {
727 lane->setConflictedCandidate(
true);
731 for (
const auto& lane : myLanePath) {
733 lane.first->setConflictedCandidate(
false);
734 if (lane == myLanePath.back()) {
735 lane.first->setSourceCandidate(
true);
737 lane.first->setTargetCandidate(
true);
741 const GNEEdge* edge = myLanePath.back().first->getParentEdge();
745 if (connection->getLaneFrom() == myLanePath.back().first) {
747 connection->getLaneTo()->setPossibleCandidate(
true);
752 myAdditionalFrameParent->getViewNet()->updateViewNet();
758 if (myLanePath.size() > 0) {
759 const double lineWidth = 0.35;
760 const double lineWidthin = 0.25;
768 for (
int i = 0; i < (int)myLanePath.size(); i++) {
770 const GNELane* lane = myLanePath.at(i).first;
774 if ((i + 1) < (
int)myLanePath.size()) {
776 const GNELane* nextLane = myLanePath.at(i + 1).first;
785 glTranslated(0, 0, 0.1);
789 for (
int i = 0; i < (int)myLanePath.size(); i++) {
791 const GNELane* lane = myLanePath.at(i).first;
795 if ((i + 1) < (
int)myLanePath.size()) {
797 const GNELane* nextLane = myLanePath.at(i + 1).first;
809 const Position firstPosition = myLanePath.front().first->getLaneShape().positionAtOffset2D(myLanePath.front().second);
810 const Position secondPosition = myLanePath.back().first->getLaneShape().positionAtOffset2D(myLanePath.back().second);
826 if (myLanePath.size() < 2) {
827 WRITE_WARNING(
"E2 multilane detectors need at least two consecutive lanes");
831 std::map<SumoXMLAttr, std::string> valuesMap = myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(
true);
833 if (!myAdditionalFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(valuesMap,
nullptr)) {
841 std::vector<std::string> laneIDs;
842 for (
const auto& lane : myLanePath) {
843 laneIDs.push_back(lane.first->getID());
850 if (!myAdditionalFrameParent->buildAdditionalCommonAttributes(valuesMap, myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTagProperties())) {
854 if (myAdditionalFrameParent->myAdditionalAttributes->areValuesValid() ==
false) {
855 myAdditionalFrameParent->myAdditionalAttributes->showWarningMessage();
863 myAdditionalFrameParent->myParentAdditional->refreshSelectorParentModul();
867 myAdditionalFrameParent->myAdditionalAttributes->refreshRows();
879 if (myLanePath.size() > 0) {
881 myAdditionalFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->enableUndoRedo();
885 myFinishCreationButton->disable();
886 myAbortCreationButton->disable();
887 myRemoveLastInsertedElement->disable();
889 updateInfoRouteLabel();
893 myAdditionalFrameParent->getViewNet()->updateViewNet();
900 if (myLanePath.size() > 1) {
902 myLanePath.back().first->resetCandidateFlags();
904 myLanePath.pop_back();
906 if ((myLanePath.size() > 0) && myLanePath.back().first->isSourceCandidate()) {
907 myLanePath.back().first->setSourceCandidate(
false);
908 myLanePath.back().first->setTargetCandidate(
true);
911 if (myLanePath.size() > 1) {
912 myRemoveLastInsertedElement->enable();
914 myRemoveLastInsertedElement->disable();
917 updateInfoRouteLabel();
921 myAdditionalFrameParent->getViewNet()->updateViewNet();
962 if (myLanePath.size() > 0) {
965 for (
const auto& lane : myLanePath) {
966 length += lane.first->getParentEdge()->getNBEdge()->getLength();
969 std::ostringstream information;
971 <<
"- Selected lanes: " <<
toString(myLanePath.size()) <<
"\n"
972 <<
"- Length: " <<
toString(length);
974 myInfoRouteLabel->setText(information.str().c_str());
976 myInfoRouteLabel->setText(
"No lanes selected");
984 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
985 for (
const auto& lane : edge.second->getLanes()) {
986 lane->resetCandidateFlags();
992 updateInfoRouteLabel();
1000 GNEFrame(horizontalFrameParent, viewNet,
"Additionals") {
1157 if (networkElement) {
1160 return networkElement->
getID();
1166 return tagProperties.getTagStr() +
"_" + networkElement->
getID() +
"_" +
toString(additionalIndex);
1173 return tagProperties.getTagStr() +
"_" +
toString(additionalIndex);
1201 double end = GNEAttributeCarrier::parse<double>(valuesMap[
SUMO_ATTR_END]);
1283 if (lane !=
nullptr) {
FXDEFMAP(GNEAdditionalFrame::SelectorParentLanes) ConsecutiveLaneSelectorMap[]
@ MID_GNE_ADDITIONALFRAME_CLEARSELECTION
clear selection of elements
@ MID_GNE_LANEPATH_ABORT
abort lane path creation
@ MID_GNE_ADDITIONALFRAME_STOPSELECTION
stop selection of consecutive egdes/lanes
@ MID_GNE_ADDITIONALFRAME_USESELECTED
use selected elements
@ MID_GNE_LANEPATH_FINISH
finish lane path creation
@ MID_GNE_ADDITIONALFRAME_INVERTSELECTION
invert selection of eleents
@ MID_GNE_ADDITIONALFRAME_ABORTSELECTION
abort selection of consecutive egdes/lanes
@ MID_GNE_LANEPATH_REMOVELAST
remove last inserted element in path
@ MID_GNE_ADDITIONALFRAME_SELECT
select element
@ MID_GNE_ADDITIONALFRAME_SEARCH
search element
@ MID_GNE_LANEPATH_SHOWCANDIDATES
enable or disable show path candidates
#define GUIDesignListFixedHeight
design for FXLists with height fixed
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignLabelFrameThicked
label extended over frame without thick and with text justify to left, used to show information in fr...
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ GLO_TEMPORALSHAPE
temporal shape (used in NETEDIT)
#define WRITE_WARNING(msg)
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (used by Netedit)
@ SUMO_TAG_NOTHING
invalid tag
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_PARENT
parent of an additional element
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_END
weights: time range end
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
bool drawCandidateLanesWithSpecialColor() const
draw candidate lanes with special color (Only for candidates, special and conflicted)
long onCmdCreatePath(FXObject *, FXSelector, void *)
void hideE2MultilaneLaneSelectorModul()
show E2MultilaneLaneSelector
bool addLane(GNELane *lane)
add lane
void updateLaneColors()
update lane colors
E2MultilaneLaneSelector(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
void abortPathCreation()
abort path creation
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted lane".
void removeLastElement()
remove path element
void drawTemporalE2Multilane(const GUIVisualizationSettings &s) const
draw temporal E2Multilane
FXButton * myRemoveLastInsertedElement
button for removing last inserted element
void showE2MultilaneLaneSelectorModul()
show E2MultilaneLaneSelector
FXLabel * myInfoRouteLabel
label with route info
FXButton * myFinishCreationButton
button for finish route creation
void clearPath()
clear lanes (and restore colors)
FXButton * myAbortCreationButton
button for abort route creation
long onCmdShowCandidateLanes(FXObject *, FXSelector, void *)
Called when the user click over check button "show candidate lanes".
FXCheckButton * myShowCandidateLanes
CheckBox for show candidate lanes.
~E2MultilaneLaneSelector()
destructor
long onCmdAbortPathCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
void updateInfoRouteLabel()
fox need this
bool createPath()
create path
~SelectorChildEdges()
destructor
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
void showSelectorChildEdgesModul(std::string search="")
Show SelectorChildEdges Modul.
long onCmdSelectEdge(FXObject *, FXSelector, void *)
called when user select a edge of the list
FXButton * myClearEdgesSelection
button for clear selection
FXButton * myInvertEdgesSelection
button for invert selection
void updateUseSelectedEdges()
Update use selectedEdges.
FXCheckButton * myUseSelectedEdgesCheckButton
CheckBox for selected edges.
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
std::string getEdgeIdsSelected() const
get list of selecte id's in string format
FXList * myList
List of SelectorChildEdges.
FXTextField * myEdgesSearch
text field for search edge IDs
SelectorChildEdges(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
void hideSelectorChildEdgesModul()
hide SelectorChildEdges Modul
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
FXList * myList
List of SelectorChildLanes.
~SelectorChildLanes()
destructor
long onCmdUseSelectedLanes(FXObject *, FXSelector, void *)
void hideSelectorChildLanesModul()
hide SelectorChildLanes Modul
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
FXTextField * myLanesSearch
text field for search lane IDs
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
void updateUseSelectedLanes()
FXButton * clearLanesSelection
button for clear selection
void showSelectorChildLanesModul(std::string search="")
Show list of SelectorChildLanes Modul.
SelectorChildLanes(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
long onCmdSelectLane(FXObject *, FXSelector, void *)
called when user select a lane of the list
FXButton * invertLanesSelection
button for invert selection
FXCheckButton * myUseSelectedLanesCheckButton
CheckBox for selected lanes.
std::string getLaneIdsSelected() const
get list of selecte lane ids in string format
bool isSelectingLanes() const
return true if modul is selecting lane
~SelectorParentLanes()
destructor
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
void hideSelectorParentLanesModul()
hide SelectorParentLanes
bool isShown() const
return true if modul is shown
bool isLaneSelected(GNELane *lane) const
check if certain lane is selected
long onCmdStopSelection(FXObject *, FXSelector, void *)
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
void removeLastSelectedLane()
remove last added point
long onCmdAbortSelection(FXObject *, FXSelector, void *)
Called when the user press abort selection button.
void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
void showSelectorParentLanesModul()
show SelectorParentLanes modul
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
void showSelectorChildLanesModul()
show selector child lane and update use selected edges/lanes
SelectorChildEdges * mySelectorChildEdges
Modul for select child edges.
GNEAdditionalFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
SelectorParentLanes * mySelectorParentLanes
Modul for select parent lanes (currently only consecutives)
std::string generateID(GNENetworkElement *networkElement) const
generate a ID for an additiona element
bool buildAdditionalOverEdge(std::map< SumoXMLAttr, std::string > &valuesMap, GNELane *lane, const GNETagProperties &tagValues)
build additional over an edge (parent of lane)
bool buildAdditionalCommonAttributes(std::map< SumoXMLAttr, std::string > &valuesMap, const GNETagProperties &tagValues)
build common additional attributes
SelectorChildLanes * mySelectorChildLanes
Modul for select child lanes.
GNEAdditionalFrame::SelectorParentLanes * getConsecutiveLaneSelector() const
get consecutive Lane Selector
bool buildAdditionalOverLane(std::map< SumoXMLAttr, std::string > &valuesMap, GNELane *lane, const GNETagProperties &tagValues)
build additional over a single lane
void tagSelected()
Tag selected in TagSelector.
GNEFrameModuls::SelectorParent * myParentAdditional
Modul for select a single parent additional.
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
E2MultilaneLaneSelector * myE2MultilaneLaneSelector
Modul for E2Multilane lane selector.
bool buildAdditionalOverView(std::map< SumoXMLAttr, std::string > &valuesMap, const GNETagProperties &tagValues)
build additional over view
GNEFrameModuls::TagSelector * myAdditionalTagSelector
item selector
~GNEAdditionalFrame()
Destructor.
GNEAdditionalFrame::E2MultilaneLaneSelector * getE2MultilaneLaneSelector() const
getConsecutive Lane Selector
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
GNEFrameAttributesModuls::AttributesCreator * myAdditionalAttributes
internal additional attributes
bool buildSlaveAdditional(std::map< SumoXMLAttr, std::string > &valuesMap, GNEAdditional *parent, const GNETagProperties &tagValues)
build slave additional
static bool buildAdditional(GNENet *net, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes &attrs, LastInsertedElement *insertedAdditionals)
Build additionals.
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
const GNETagProperties & getTagProperty() const
get Tag Property assigned to this object
bool isSpecialCandidate() const
check if this element is a special candidate
void setTargetCandidate(const bool value)
set element as target candidate
bool isPossibleCandidate() const
check if this element is a possible candidate
bool isConflictedCandidate() const
check if this element is a conflicted candidate
void setConflictedCandidate(const bool value)
set element as conflicted candidate
A road/street connecting two junctions (netedit-version)
const std::vector< GNEConnection * > & getGNEConnections() const
returns a reference to the GNEConnection vector
void hideAttributesCreatorModul()
hide group box
void refreshRows()
refresh rows (called after creating an element)
void showAttributesCreatorModul(const GNETagProperties &tagProperties, const std::vector< SumoXMLAttr > &hiddenAttributes)
show AttributesCreator modul
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
bool areValuesValid() const
check if parameters of attributes are valid
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
void showNeteditAttributesModul(const GNETagProperties &tagValue)
show Netedit attributes modul
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, const GNELane *lane) const
fill valuesMap with netedit attributes
void hideNeteditAttributesModul()
hide Netedit attributes modul
GNEViewNet * myViewNet
View Net.
virtual void createPath()
create path (can be reimplemented in frame children)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
virtual void show()
show Frame
virtual void hide()
hide Frame
const std::vector< std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
void refreshSelectorParentModul()
Refresh list of Additional Parents Modul.
std::string getIdSelected() const
get currently parent additional selected
void hideSelectorParentModul()
hide SelectorParent Modul
bool showSelectorParentModul(SumoXMLTag additionalTypeParent)
Show list of SelectorParent Modul.
void setIDSelected(const std::string &id)
select manually a element of the list
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
const GNETagProperties & getCurrentTagProperties() const
get current type tag
void setCurrentTag(SumoXMLTag newTag)
set current type manually
const PositionVector & getShape() const
The shape of the additional element.
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
const GNEGeometry::Geometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
double getLengthGeometryFactor() const
get length geometry factor
const GNEGeometry::Lane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
GNEEdge * getParentEdge() const
get arent edge
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
const std::string & getID() const
get ID
bool isSlave() const
return true if tag correspond to an element slave of another element (I.e. doesn't have their own ID)
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const std::vector< SumoXMLTag > & getMasterTags() const
get master tags
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
class used to group all variables related with objects under cursor after a click over view
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNENet * getNet() const
get the net object
void setStatusBarText(const std::string &text)
set staturBar text
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Stores the information about how to visualize structures.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
C++ TraCI client API implementation.
A point in 2D or 3D with translation and scaling methods.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor GREY
static const RGBColor ORANGE
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static const RGBColor RED
named colors
Encapsulated Xerces-SAX-attributes.
static void drawGeometryPoints(const GUIVisualizationSettings &s, const GNEViewNet *viewNet, const PositionVector &shape, const RGBColor &geometryPointColor, const RGBColor &textColor, const double radius, const double exaggeration)
draw geometry points
static const double polylineWidth
poly line width