80 FXIMPLEMENT(
GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap))
97 FXGroupBoxModule(inspectorFrameParent->myContentFrame, "Netedit attributes"),
98 myInspectorFrameParent(inspectorFrameParent) {
105 myLabelParentAdditional =
new FXLabel(myHorizontalFrameParentAdditional,
"Block move",
nullptr,
GUIDesignLabelAttribute);
124 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0) {
126 myTextFieldParentAdditional->enable();
127 myCheckBoxCloseShape->enable();
129 const auto& tagValue = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
131 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
135 myMarkFrontElementButton->show();
137 if (myInspectorFrameParent->getViewNet()->getFrontAttributeCarrier() == myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front()) {
138 myMarkFrontElementButton->disable();
140 myMarkFrontElementButton->enable();
144 if (tagValue.canCloseShape()) {
149 for (
const auto& i : myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers()) {
153 myHorizontalFrameCloseShape->show();
155 myHelpButton->show();
158 myCheckBoxCloseShape->setCheck(
true);
159 myCheckBoxCloseShape->setText(
"true");
161 myCheckBoxCloseShape->setCheck(
false);
162 myCheckBoxCloseShape->setText(
"false");
166 if (tagValue.isChild() && tagValue.canBeReparent()) {
170 std::set<std::string> parents;
171 for (
const auto& i : myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers()) {
175 myHorizontalFrameParentAdditional->show();
177 myHelpButton->show();
179 myLabelParentAdditional->setText((
toString(myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty().isChild()) +
" parent").c_str());
180 myTextFieldParentAdditional->setText(
toString(parents).c_str());
184 myTextFieldParentAdditional->disable();
185 myCheckBoxCloseShape->disable();
194 myHorizontalFrameParentAdditional->hide();
195 myHorizontalFrameCloseShape->hide();
196 myMarkFrontElementButton->hide();
197 myHelpButton->hide();
206 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
207 if (ACs.size() > 0) {
209 if (myInspectorFrameParent->getViewNet()->getFrontAttributeCarrier() == ACs.front()) {
210 myMarkFrontElementButton->disable();
212 myMarkFrontElementButton->enable();
215 if (myHorizontalFrameCloseShape->shown()) {
218 for (
const auto& i : ACs) {
223 myCheckBoxCloseShape->setCheck(
true);
224 myCheckBoxCloseShape->setText(
"true");
226 myCheckBoxCloseShape->setCheck(
false);
227 myCheckBoxCloseShape->setText(
"false");
231 if (myHorizontalFrameParentAdditional->shown() && ((myTextFieldParentAdditional->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) {
233 myLabelParentAdditional->setText((
toString(ACs.front()->getTagProperty().getParentTags().front()) +
" parent").c_str());
234 myTextFieldParentAdditional->setText(ACs.front()->getAttribute(
GNE_ATTR_PARENT).c_str());
242 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
244 if (ACs.size() > 0) {
246 if (ACs.size() > 1) {
247 myInspectorFrameParent->myViewNet->getUndoList()->begin(ACs.front()->getTagProperty().getGUIIcon(),
"Change multiple attributes");
249 if (obj == myCheckBoxCloseShape) {
251 for (
const auto& AC : ACs) {
252 if (myCheckBoxCloseShape->getCheck() == 1) {
253 AC->setAttribute(
GNE_ATTR_CLOSE_SHAPE,
"true", myInspectorFrameParent->myViewNet->getUndoList());
254 myCheckBoxCloseShape->setText(
"true");
256 AC->setAttribute(
GNE_ATTR_CLOSE_SHAPE,
"false", myInspectorFrameParent->myViewNet->getUndoList());
257 myCheckBoxCloseShape->setText(
"false");
260 }
else if (obj == myTextFieldParentAdditional) {
261 if (ACs.front()->isValid(
GNE_ATTR_PARENT, myTextFieldParentAdditional->getText().text())) {
263 for (
const auto& AC : ACs) {
264 AC->setAttribute(
GNE_ATTR_PARENT, myTextFieldParentAdditional->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
266 myTextFieldParentAdditional->setTextColor(FXRGB(0, 0, 0));
267 myTextFieldParentAdditional->killFocus();
269 myTextFieldParentAdditional->setTextColor(FXRGB(255, 0, 0));
273 if (ACs.size() > 1) {
274 myInspectorFrameParent->myViewNet->getUndoList()->end();
277 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
278 myInspectorFrameParent->myGEOAttributesEditor->refreshGEOAttributesEditor(
true);
287 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
289 myInspectorFrameParent->getViewNet()->setFrontAttributeCarrier(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front());
291 myMarkFrontElementButton->disable();
300 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(getCollapsableFrame(),
"Netedit Attributes Help",
GUIDesignDialogBox);
303 std::ostringstream help;
305 <<
"- Mark as front element: Mark element as front element (Will be drawn over all other elements)\n"
306 <<
"- Block movement: disable movement in move mode\n"
307 <<
"- Block shape: Disable moving of shape's vertices and edges. Entire shape can be moved'.\n"
308 <<
"- Close shape: Add or remove the last vertex with the same position of first edge'.";
320 WRITE_DEBUG(
"Opening NeteditAttributesEditor help dialog");
322 additionalNeteditAttributesHelpDialog->create();
324 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
328 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
330 WRITE_DEBUG(
"Closing NeteditAttributesEditor help dialog");
340 myInspectorFrameParent(inspectorFrameParent) {
363 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() > 0) {
365 myGEOAttributeTextField->enable();
366 myUseGEOCheckButton->enable();
368 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
370 if (tagProperty.hasGEOShape()) {
375 for (
const auto& i : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
376 value &= GNEAttributeCarrier::parse<bool>(i->getAttribute(
SUMO_ATTR_GEO));
379 myUseGEOFrame->show();
382 myUseGEOCheckButton->enable();
384 myUseGEOCheckButton->setCheck(
true);
385 myUseGEOCheckButton->setText(
"true");
387 myUseGEOCheckButton->setCheck(
false);
388 myUseGEOCheckButton->setText(
"false");
391 myUseGEOCheckButton->disable();
393 if (tagProperty.hasGEOShape() && myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
394 myGEOAttributeFrame->show();
396 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
399 myGEOAttributeTextField->enable();
400 myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getAttribute(
SUMO_ATTR_GEOSHAPE).c_str());
402 myGEOAttributeTextField->disable();
403 myGEOAttributeTextField->setText(
"No geo-conversion defined");
408 if (
GNEFrameAttributeModules::isSupermodeValid(myInspectorFrameParent->getViewNet(), myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()) ==
false) {
409 myGEOAttributeTextField->disable();
410 myUseGEOCheckButton->disable();
419 myGEOAttributeFrame->hide();
420 myUseGEOFrame->hide();
429 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
431 if ((
GeoConvHelper::getFinal().getProjString() !=
"!") && myGEOAttributeFrame->shown() && ((myGEOAttributeTextField->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) {
432 if (tagProperty.hasGEOShape()) {
433 myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getAttribute(
SUMO_ATTR_GEOSHAPE).c_str());
435 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
443 if ((
GeoConvHelper::getFinal().getProjString() !=
"!") && (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() > 0)) {
444 if (obj == myGEOAttributeTextField) {
446 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
448 if (tagProperty.hasGEOShape()) {
449 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->isValid(
SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text())) {
450 myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->setAttribute(
SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
451 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
452 myGEOAttributeTextField->killFocus();
454 myGEOAttributeTextField->setTextColor(FXRGB(255, 0, 0));
457 throw ProcessError(
"myGEOAttributeTextField must be hidden becaurse there isn't GEO Attribute to edit");
459 }
else if (obj == myUseGEOCheckButton) {
461 for (
const auto& i : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
462 if (myUseGEOCheckButton->getCheck() == 1) {
463 i->setAttribute(
SUMO_ATTR_GEO,
"true", myInspectorFrameParent->myViewNet->getUndoList());
464 myUseGEOCheckButton->setText(
"true");
466 i->setAttribute(
SUMO_ATTR_GEO,
"false", myInspectorFrameParent->myViewNet->getUndoList());
467 myUseGEOCheckButton->setText(
"false");
472 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
473 myInspectorFrameParent->myNeteditAttributesEditor->refreshNeteditAttributesEditor(
true);
481 FXDialogBox* helpDialog =
new FXDialogBox(getCollapsableFrame(),
"GEO attributes Help",
GUIDesignDialogBox);
482 std::ostringstream help;
484 <<
" SUMO uses the World Geodetic System 84 (WGS84/UTM).\n"
485 <<
" For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n"
486 <<
" in decimal degrees without extra symbols. (N,W..)\n"
487 <<
" - Longitude: East-west position of a point on the Earth's surface.\n"
488 <<
" - Latitude: North-south position of a point on the Earth's surface.\n"
489 <<
" - CheckBox 'geo' enables or disables saving position in GEO coordinates\n";
493 helpDialog->create();
504 myInspectorFrameParent(inspectorFrameParent),
505 myEdgeTemplate(nullptr) {
522 if ((myInspectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) &&
523 (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty().getTag() ==
SUMO_TAG_EDGE)) {
525 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
526 mySetTemplateButton->show();
527 mySetTemplateButton->setText((
"Set edge '" + myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getID() +
"' as Template").c_str());
546 return myEdgeTemplate;
553 if (myEdgeTemplate) {
554 delete myEdgeTemplate;
555 myEdgeTemplate =
nullptr;
561 myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getViewParent()->getCreateEdgeFrame()->setUseEdgeTemplate();
569 if (shown() && mySetTemplateButton->isEnabled()) {
570 onCmdSetTemplate(
nullptr, 0,
nullptr);
578 if (shown() && myCopyTemplateButton->isEnabled()) {
579 onCmdCopyTemplate(
nullptr, 0,
nullptr);
587 if (shown() && myClearTemplateButton->isEnabled()) {
588 onCmdClearTemplate(
nullptr, 0,
nullptr);
596 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() != 1) {
600 GNEEdge* edge = myInspectorFrameParent->myViewNet->
getNet()->
getAttributeCarriers()->
retrieveEdge(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getID());
602 setEdgeTemplate(edge);
612 if (myEdgeTemplate) {
614 myInspectorFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::EDGE,
"copy edge template");
616 for (
const auto& inspectedAC : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
618 myInspectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveEdge(inspectedAC->getID())->copyTemplate(myEdgeTemplate, myInspectorFrameParent->myViewNet->getUndoList());
621 myInspectorFrameParent->myViewNet->getUndoList()->end();
623 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
625 myInspectorFrameParent->myViewNet->updateViewNet();
634 setEdgeTemplate(
nullptr);
644 if (myEdgeTemplate) {
646 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
648 if (ACs.size() == 1) {
649 myCopyTemplateButton->setText((
"Copy '" + myEdgeTemplate->getID() +
"' into edge '" + ACs.front()->getID() +
"'").c_str());
651 myCopyTemplateButton->setText((
"Copy '" + myEdgeTemplate->getID() +
"' into " +
toString(ACs.size()) +
" selected edges").c_str());
654 myCopyTemplateButton->enable();
655 myClearTemplateButton->enable();
658 myCopyTemplateButton->setText(
"No edge Template Set");
660 myCopyTemplateButton->disable();
661 myClearTemplateButton->disable();
671 myInspectorFrameParent(inspectorFrameParent) {
684 if ((myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0) &&
685 myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty().hasParameters()) {
687 refreshParametersEditor();
706 const GNEAttributeCarrier* frontAC = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0 ? myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front() :
nullptr;
710 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
713 }
else if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0) {
716 for (
const auto& AC : myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers()) {
718 parameters =
"different parameters";
722 myTextFieldParameters->setText(parameters.c_str());
725 myTextFieldParameters->setTextColor(FXRGB(0, 0, 0));
728 myTextFieldParameters->enable();
729 myButtonEditParameters->enable();
731 myTextFieldParameters->disable();
732 myButtonEditParameters->disable();
740 return myInspectorFrameParent;
747 const GNEAttributeCarrier* frontAC = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0 ? myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front() :
nullptr;
750 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 1) {
758 myInspectorFrameParent->attributeUpdated();
760 refreshParametersEditor();
772 myInspectorFrameParent->attributeUpdated();
774 refreshParametersEditor();
787 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
795 myTextFieldParameters->setTextColor(FXRGB(0, 0, 0));
796 myTextFieldParameters->killFocus();
798 if (ACs.size() == 1) {
800 myInspectorFrameParent->myViewNet->getUndoList()->begin(frontAC->
getTagProperty().
getGUIIcon(),
"change parameters");
802 frontAC->
setACParameters(myTextFieldParameters->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
804 myInspectorFrameParent->myViewNet->getUndoList()->end();
805 }
else if (ACs.size() > 0) {
807 myInspectorFrameParent->myViewNet->getUndoList()->begin(frontAC->
getTagProperty().
getGUIIcon(),
"change multiple parameters");
809 for (
const auto& inspectedAC : ACs) {
810 inspectedAC->setACParameters(myTextFieldParameters->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
813 myInspectorFrameParent->myViewNet->getUndoList()->end();
816 myInspectorFrameParent->attributeUpdated();
818 myTextFieldParameters->setTextColor(FXRGB(255, 0, 0));
830 myInspectorFrameParent(inspectorFrameParent) {
842 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
844 const GNEAttributeCarrier* AC = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front();
848 myOpenAdditionalDialog->setText(
"Open Rerouter dialog");
854 myOpenAdditionalDialog->setText(
"Open Calibrator dialog");
860 myOpenAdditionalDialog->setText(
"Open Lane Calibrator dialog");
866 myOpenAdditionalDialog->setText(
"Open VSS dialog");
888 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
890 GNEAttributeCarrier* AC = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front();
911 GNEFrame(horizontalFrameParent, viewNet,
"Inspector"),
1076 std::vector<GNEAttributeCarrier*> itemsToInspect;
1077 if (AC !=
nullptr) {
1083 for (
const auto& selectedAC : selectedACs) {
1086 itemsToInspect.push_back(selectedAC);
1090 itemsToInspect.push_back(AC);
1114 if (ACs.size() > 0) {
1116 std::string headerString;
1117 if (ACs.front()->getTagProperty().isNetworkElement()) {
1118 headerString =
"Net: ";
1119 }
else if (ACs.front()->getTagProperty().isAdditionalElement()) {
1120 headerString =
"Additional: ";
1121 }
else if (ACs.front()->getTagProperty().isShape()) {
1122 headerString =
"Shape: ";
1123 }
else if (ACs.front()->getTagProperty().isTAZElement()) {
1124 headerString =
"TAZ: ";
1125 }
else if (ACs.front()->getTagProperty().isVehicle()) {
1126 headerString =
"Vehicle: ";
1127 }
else if (ACs.front()->getTagProperty().isRoute()) {
1128 headerString =
"Route: ";
1129 }
else if (ACs.front()->getTagProperty().isPerson()) {
1130 headerString =
"Person: ";
1131 }
else if (ACs.front()->getTagProperty().isPersonPlan()) {
1132 headerString =
"PersonPlan: ";
1133 }
else if (ACs.front()->getTagProperty().isStop()) {
1134 headerString =
"Stop: ";
1135 }
else if (ACs.front()->getTagProperty().isDataElement()) {
1136 headerString =
"Data: ";
1138 if (ACs.size() > 1) {
1139 headerString +=
toString(ACs.size()) +
" ";
1141 headerString += ACs.front()->getTagStr();
1142 if (ACs.size() > 1) {
1143 headerString +=
"s";
1167 if (ACs.size() == 1) {
FXDEFMAP(GNEInspectorFrame) GNEInspectorFrameMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_OPEN_PARAMETERS_DIALOG
open parameters dialog
@ MID_GNE_INSPECTORFRAME_GOBACK
go back to the previous element
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
@ MID_HOTKEY_SHIFT_F2_TEMPLATE_COPY
copy template
@ MID_GNE_MARKFRONTELEMENT
mark item as front element
@ MID_HOTKEY_SHIFT_F1_TEMPLATE_SET
set template
@ MID_HOTKEY_SHIFT_F3_TEMPLATE_CLEAR
clear template
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
#define GUIDesignDialogBox
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignButtonIconRectangular
button only with icon
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignButtonOK
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignHorizontalSeparator
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_LANECALIBRATOR
A calibrator placed over lane (used in netedit)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ GNE_ATTR_CLOSE_SHAPE
Close shape of a polygon (Used by GNEPolys)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void setACParameters(const std::string ¶meters, GNEUndoList *undoList)
set parameters (string)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
GNENet * getNet() const
get pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
virtual std::string getAttribute(SumoXMLAttr key) const =0
Dialog for edit calibrators.
void show()
show delete frame
A road/street connecting two junctions (netedit-version)
void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition)
refresh attribute editor (only the valid values will be refresh)
void showAttributeEditorModule(bool includeExtended, bool forceAttributeEnabled)
show attributes of multiple ACs
GNEFrame * getFrameParent() const
pointer to GNEFrame parent
void hideAttributesEditorModule()
hide attribute editor
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
void focusUpperElement()
focus upper element of frame
GNEViewNet * getViewNet() const
get view net
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
GNEViewNet * myViewNet
View Net.
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
virtual void show()
show Frame
virtual void hide()
hide Frame
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
void hideHierarchicalElementTree()
hide HierarchicalElementTree
void refreshHierarchicalElementTree()
refresh HierarchicalElementTree
void showHierarchicalElementTree(GNEAttributeCarrier *AC)
show HierarchicalElementTree
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
void hideOverlappedInspection()
hide template editor
bool previousElement(const Position &clickedPosition)
try to go to previous element if clicked position is near to saved position
bool nextElement(const Position &clickedPosition)
try to go to next element if clicked position is near to saved position
FXButton * myOpenAdditionalDialog
button for open additional dialog
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
void hideAdditionalDialog()
hide netedit attributes editor
AdditionalDialog(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
~AdditionalDialog()
destructor
void showAdditionalDialog()
show netedit attributes editor
FXCheckButton * myUseGEOCheckButton
checkBox for use GEO
long onCmdGEOAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
FXButton * myHelpButton
button for help
void showGEOAttributesEditor()
show GEO attributes editor
FXTextField * myGEOAttributeTextField
textField for GEOAttribute
FXLabel * myUseGEOLabel
Label for use GEO.
FXHorizontalFrame * myUseGEOFrame
horizontal frame for use GEO
GEOAttributesEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
long onCmdSetGEOAttribute(FXObject *, FXSelector, void *)
Called when user change the current GEO Attribute.
FXLabel * myGEOAttributeLabel
Label for GEOAttribute.
~GEOAttributesEditor()
destructor
void refreshGEOAttributesEditor(bool forceRefresh)
refresh GEO attributes editor
void hideGEOAttributesEditor()
hide GEO attributes editor
FXHorizontalFrame * myGEOAttributeFrame
horizontal frame for GEOAttribute
long onCmdNeteditAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
long onCmdMarkFrontElement(FXObject *, FXSelector, void *)
Called when user press button "Mark front element".
void refreshNeteditAttributesEditor(bool forceRefresh)
refresh netedit attributes
void hideNeteditAttributesEditor()
hide netedit attributes editor
void showNeteditAttributesEditor()
show netedit attributes editor
~NeteditAttributesEditor()
destructor
FXButton * myButtonEditParameters
button for edit parameters using specific dialog
long onCmdEditParameters(FXObject *, FXSelector, void *)
void showParametersEditor()
show netedit attributes EditorInspector
~ParametersEditor()
destructor
long onCmdSetParameters(FXObject *, FXSelector, void *)
Called when user udpate the parameter text field.
FXTextField * myTextFieldParameters
text field for write parameters
GNEInspectorFrame * getInspectorFrameParent() const
get inspector frame parent
void refreshParametersEditor()
refresh netedit attributes
ParametersEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
void hideParametersEditor()
hide netedit attributes EditorInspector
void updateButtons()
FOX need this.
void hideTemplateEditor()
hide template editor
void clearTemplate()
clear template (used by shortcut)
void setEdgeTemplate(const GNEEdge *edge)
set edge template
~TemplateEditor()
destructor
FXButton * myClearTemplateButton
clear template button
FXButton * mySetTemplateButton
set template button
long onCmdCopyTemplate(FXObject *, FXSelector, void *)
copy edge attributes from edge template
void setTemplate()
set template (used by shortcut)
TemplateEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
FXButton * myCopyTemplateButton
copy template button
long onCmdSetTemplate(FXObject *, FXSelector, void *)
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
void copyTemplate()
copy template (used by shortcut)
void showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
NeteditAttributesEditor * myNeteditAttributesEditor
Netedit Attributes editor.
GNEFrameModules::OverlappedInspection * myOverlappedInspection
Overlapped Inspection.
GNEAttributeCarrier * myPreviousElementDelete
pointer to previous element called by Delete Frame
GNEFrameAttributeModules::AttributesEditor * getAttributesEditor() const
get AttributesEditor
void inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
void inspectSingleElement(GNEAttributeCarrier *AC)
Inspect a single element.
GNEFrameAttributeModules::AttributesEditor * myAttributesEditor
Attribute editor.
GNEInspectorFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
void clearInspectedAC()
Clear all current inspected ACs.
long onCmdGoBack(FXObject *, FXSelector, void *)
called when user toggle the go back button
bool processDataSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Data
void show()
show inspector frame
GEOAttributesEditor * myGEOAttributesEditor
GEO Attributes editor.
ParametersEditor * myParametersEditor
Parameters editor inspector.
GNEAttributeCarrier * myPreviousElementInspect
Pointer to previous element called by Inspector Frame.
void attributeUpdated()
function called after set a valid attribute in AttributeEditor
bool myPreviousElementDeleteWasMarked
flag to ckec if myPreviousElementDelete was marked in Delete Frame
GNEFrameModules::HierarchicalElementTree * getHierarchicalElementTree() const
get HierarchicalElementTree modul
void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
FOX need this.
AdditionalDialog * myAdditionalDialog
Additional dialog.
void hide()
hide inspector frame
void inspectFromDeleteFrame(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement, bool previousElementWasMarked)
inspect called from DeleteFrame
GNEFrameModules::OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
GNEInspectorFrame::NeteditAttributesEditor * getNeteditAttributesEditor() const
get Netedit Attributes editor
FXButton * myBackButton
Back Button.
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
void inspectMultisection(const std::vector< GNEAttributeCarrier * > &ACs)
Inspect the given multi-selection.
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
GNEFrameModules::HierarchicalElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Dialog for edit parameters.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Dialog for edit rerouters.
Dialog for edit parameters.
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
bool hasParameters() const
return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|....
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
class used to group all variables related with objects under cursor after a click over view
GNEGenericData * getGenericDataElementFront() const
get generic data element or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type or a pointer to nullptr
GNEDemandElement * getDemandElementFront() const
get front demand element or a pointer to nullptr
GNENet * getNet() const
get the net object
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed modul
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
GNEViewParent * getViewParent() const
get the net object
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
void updateViewNet() const
Mark the entire GNEViewNet to be repainted later.
void setInspectedAttributeCarriers(const std::vector< GNEAttributeCarrier * > ACs)
set inspected attributeCarrier
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
A point in 2D or 3D with translation and scaling methods.
bool selectEdges() const
check if select edges checkbox is enabled