97 mySelectorFrameParent(selectorFrameParent) {
133 delete typeEntry.second;
140 if ((type >= 100) && (type < 199)) {
143 myTypeEntries.at(type)->counterUp();
150 if ((type >= 100) && (type < 199)) {
153 myTypeEntries.at(type)->counterDown();
160 if ((type >= 100) && (type < 199)) {
163 return myTypeEntries.at(type)->isGLTypeLocked();
170 for (
const auto& typeEntry : myTypeEntries) {
172 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork() && (typeEntry.second->getSupermode() ==
Supermode::NETWORK)) {
173 typeEntry.second->showObjectTypeEntry();
174 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand() && (typeEntry.second->getSupermode() ==
Supermode::DEMAND)) {
175 typeEntry.second->showObjectTypeEntry();
176 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData() && (typeEntry.second->getSupermode() ==
Supermode::DATA)) {
177 typeEntry.second->showObjectTypeEntry();
179 typeEntry.second->hideObjectTypeEntry();
189 mySupermode(supermode),
190 myLabelCounter(nullptr),
191 myLabelTypeName(nullptr),
192 myCheckBoxLocked(nullptr),
209 myLabelCounter->show();
210 myLabelTypeName->show();
211 myCheckBoxLocked->show();
217 myLabelCounter->hide();
218 myLabelTypeName->hide();
219 myCheckBoxLocked->hide();
226 myLabelCounter->setText(
toString(myCounter).c_str());
233 myLabelCounter->setText(
toString(myCounter).c_str());
239 return (myCheckBoxLocked->getCheck() == TRUE);
245 if (myCheckBoxLocked->getCheck() == TRUE) {
246 myCheckBoxLocked->setText(
"locked");
248 myCheckBoxLocked->setText(
"unlocked");
257 myLabelCounter(nullptr),
258 myLabelTypeName(nullptr),
259 myCheckBoxLocked(nullptr),
271 myAddRadioButton =
new FXRadioButton(
this,
"add\t\tSelected objects are added to the previous selection",
273 myRemoveRadioButton =
new FXRadioButton(
this,
"remove\t\tSelected objects are removed from the previous selection",
275 myKeepRadioButton =
new FXRadioButton(
this,
"keep\t\tRestrict previous selection by the current selection",
277 myReplaceRadioButton =
new FXRadioButton(
this,
"replace\t\tReplace previous selection by the current selection",
288 return myModificationModeType;
294 if (obj == myAddRadioButton) {
295 myModificationModeType = Operation::ADD;
296 myAddRadioButton->setCheck(
true);
297 myRemoveRadioButton->setCheck(
false);
298 myKeepRadioButton->setCheck(
false);
299 myReplaceRadioButton->setCheck(
false);
301 }
else if (obj == myRemoveRadioButton) {
302 myModificationModeType = Operation::SUB;
303 myAddRadioButton->setCheck(
false);
304 myRemoveRadioButton->setCheck(
true);
305 myKeepRadioButton->setCheck(
false);
306 myReplaceRadioButton->setCheck(
false);
308 }
else if (obj == myKeepRadioButton) {
309 myModificationModeType = Operation::RESTRICT;
310 myAddRadioButton->setCheck(
false);
311 myRemoveRadioButton->setCheck(
false);
312 myKeepRadioButton->setCheck(
true);
313 myReplaceRadioButton->setCheck(
false);
315 }
else if (obj == myReplaceRadioButton) {
316 myModificationModeType = Operation::REPLACE;
317 myAddRadioButton->setCheck(
false);
318 myRemoveRadioButton->setCheck(
false);
319 myKeepRadioButton->setCheck(
false);
320 myReplaceRadioButton->setCheck(
true);
333 mySelectorFrameParent(selectorFrameParent),
334 myCurrentElementSet(
Type::NETWORKELEMENT) {
345 return myCurrentElementSet;
352 mySetComboBox->clearItems();
354 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) {
355 mySetComboBox->appendItem(
"network element");
356 mySetComboBox->appendItem(
"Additional");
357 mySetComboBox->appendItem(
"Shape");
361 mySetComboBox->setNumVisible(mySetComboBox->getNumItems());
362 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand()) {
363 mySetComboBox->appendItem(
"Demand Element");
366 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData()) {
367 mySetComboBox->appendItem(
"Data Element");
372 onCmdSelectElementSet(0, 0, 0);
379 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) {
381 mySelectorFrameParent->myMatchAttribute->showMatchAttribute();
382 mySelectorFrameParent->myMatchGenericDataAttribute->hideMatchGenericDataAttribute();
383 if (mySetComboBox->getText() ==
"network element") {
384 myCurrentElementSet = Type::NETWORKELEMENT;
385 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
387 mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
388 }
else if (mySetComboBox->getText() ==
"Additional") {
389 myCurrentElementSet = Type::ADDITIONALELEMENT;
390 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
392 mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
393 }
else if (mySetComboBox->getText() ==
"TAZ") {
394 myCurrentElementSet = Type::TAZELEMENT;
395 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
397 mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
398 }
else if (mySetComboBox->getText() ==
"Shape") {
399 myCurrentElementSet = Type::SHAPE;
400 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
402 mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
404 myCurrentElementSet = Type::INVALID;
405 mySetComboBox->setTextColor(FXRGB(255, 0, 0));
407 mySelectorFrameParent->myMatchAttribute->disableMatchAttribute();
409 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand()) {
411 mySelectorFrameParent->myMatchAttribute->showMatchAttribute();
412 mySelectorFrameParent->myMatchGenericDataAttribute->hideMatchGenericDataAttribute();
413 if (mySetComboBox->getText() ==
"Demand Element") {
414 myCurrentElementSet = Type::DEMANDELEMENT;
415 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
417 mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
419 myCurrentElementSet = Type::INVALID;
420 mySetComboBox->setTextColor(FXRGB(255, 0, 0));
422 mySelectorFrameParent->myMatchAttribute->disableMatchAttribute();
424 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData()) {
426 mySelectorFrameParent->myMatchAttribute->hideMatchAttribute();
427 mySelectorFrameParent->myMatchGenericDataAttribute->showMatchGenericDataAttribute();
428 if (mySetComboBox->getText() ==
"Data Element") {
429 myCurrentElementSet = Type::DATA;
430 mySetComboBox->setTextColor(FXRGB(0, 0, 0));
432 mySelectorFrameParent->myMatchGenericDataAttribute->enableMatchGenericDataAttribute();
434 myCurrentElementSet = Type::INVALID;
435 mySetComboBox->setTextColor(FXRGB(255, 0, 0));
437 mySelectorFrameParent->myMatchGenericDataAttribute->enableMatchGenericDataAttribute();
449 mySelectorFrameParent(selectorFrameParent),
478 myMatchTagComboBox->enable();
479 myMatchAttrComboBox->enable();
480 myMatchString->enable();
481 myMatchStringButton->enable();
483 myMatchTagComboBox->clearItems();
485 std::vector<std::pair<SumoXMLTag, const std::string> > ACTags;
500 for (
const auto& ACTag : ACTags) {
501 myMatchTagComboBox->appendItem(ACTag.second.c_str());
504 myMatchTagComboBox->setCurrentItem(0);
505 myMatchTagComboBox->setNumVisible(myMatchTagComboBox->getNumItems());
507 onCmdSelMBTag(
nullptr, 0,
nullptr);
514 myMatchTagComboBox->disable();
515 myMatchAttrComboBox->disable();
516 myMatchString->disable();
517 myMatchStringButton->disable();
519 myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
520 myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
521 myMatchString->setTextColor(FXRGB(0, 0, 0));
542 std::vector<std::pair<SumoXMLTag, const std::string> > ACTags;
557 for (
const auto& ACTag : ACTags) {
558 if (ACTag.second == myMatchTagComboBox->getText().text()) {
559 myCurrentTag = ACTag.first;
567 myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
568 myMatchAttrComboBox->enable();
569 myMatchString->enable();
570 myMatchStringButton->enable();
571 myMatchAttrComboBox->clearItems();
573 for (
const auto& attribute : tagValue) {
574 myMatchAttrComboBox->appendItem(attribute.getAttrStr().c_str());
579 if (tagValue.canBlockMovement()) {
583 if (tagValue.canBlockShape()) {
587 if (tagValue.canCloseShape()) {
591 if (tagValue.isSlave()) {
595 myMatchAttrComboBox->setNumVisible(myMatchAttrComboBox->getNumItems());
597 if (tagValue.hasAttribute(myCurrentAttribute)) {
598 myMatchAttrComboBox->setText(
toString(myCurrentAttribute).c_str());
600 onCmdSelMBAttribute(
nullptr, 0,
nullptr);
604 myMatchTagComboBox->setTextColor(FXRGB(255, 0, 0));
605 myMatchAttrComboBox->disable();
606 myMatchString->disable();
607 myMatchStringButton->disable();
623 GNEAttributeProperties::AttrProperty::STRING,
625 tagPropertiesCopy.addAttribute(extraAttrProperty);
627 if (tagValue.canBlockMovement()) {
630 GNEAttributeProperties::AttrProperty::BOOL | GNEAttributeProperties::AttrProperty::DEFAULTVALUESTATIC,
633 tagPropertiesCopy.addAttribute(extraAttrProperty);
636 if (tagValue.canBlockShape()) {
639 GNEAttributeProperties::AttrProperty::BOOL | GNEAttributeProperties::AttrProperty::DEFAULTVALUESTATIC,
642 tagPropertiesCopy.addAttribute(extraAttrProperty);
645 if (tagValue.canCloseShape()) {
648 GNEAttributeProperties::AttrProperty::BOOL | GNEAttributeProperties::AttrProperty::DEFAULTVALUESTATIC,
651 tagPropertiesCopy.addAttribute(extraAttrProperty);
654 if (tagValue.isSlave()) {
657 GNEAttributeProperties::AttrProperty::STRING,
659 tagPropertiesCopy.addAttribute(extraAttrProperty);
663 for (
const auto& attribute : tagPropertiesCopy) {
664 if (attribute.getAttrStr() == myMatchAttrComboBox->getText().text()) {
665 myCurrentAttribute = attribute.getAttr();
670 myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
671 myMatchString->enable();
672 myMatchStringButton->enable();
674 myMatchAttrComboBox->setTextColor(FXRGB(255, 0, 0));
675 myMatchString->disable();
676 myMatchStringButton->disable();
685 std::string expr(myMatchString->getText().text());
690 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute,
'@', 0, expr));
691 }
else if (tagValue.hasAttribute(myCurrentAttribute) && tagValue.getAttributeProperties(myCurrentAttribute).isNumerical()) {
697 char compOp = expr[0];
698 if (compOp ==
'<' || compOp ==
'>' || compOp ==
'=') {
699 expr = expr.substr(1);
704 if (GNEAttributeCarrier::canParse<double>(expr.c_str())) {
705 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, compOp, GNEAttributeCarrier::parse<double>(expr.c_str()), expr));
716 char compOp = expr[0];
717 if (compOp ==
'=' || compOp ==
'!' || compOp ==
'^') {
718 expr = expr.substr(1);
722 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, compOp, 0, expr));
725 myMatchString->setTextColor(FXRGB(0, 0, 0));
726 myMatchString->killFocus();
727 myMatchStringButton->enable();
729 myMatchString->setTextColor(FXRGB(255, 0, 0));
730 myMatchStringButton->disable();
739 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(
this,
"Netedit Parameters Help",
GUIDesignDialogBox);
742 std::ostringstream help;
744 <<
"- The 'Match Attribute' controls allow to specify a set of objects which are then applied to the current selection\n"
745 <<
" according to the current 'Modification Mode'.\n"
746 <<
" 1. Select an object type from the first input box\n"
747 <<
" 2. Select an attribute from the second input box\n"
748 <<
" 3. Enter a 'match expression' in the third input box and press <return>\n"
750 <<
"- The empty expression matches all objects\n"
751 <<
"- For numerical attributes the match expression must consist of a comparison operator ('<', '>', '=') and a number.\n"
752 <<
"- An object matches if the comparison between its attribute and the given number by the given operator evaluates to 'true'\n"
754 <<
"- For string attributes the match expression must consist of a comparison operator ('', '=', '!', '^') and a string.\n"
755 <<
" '' (no operator) matches if string is a substring of that object'ts attribute.\n"
756 <<
" '=' matches if string is an exact match.\n"
757 <<
" '!' matches if string is not a substring.\n"
758 <<
" '^' matches if string is not an exact match.\n"
761 <<
" junction; id; 'foo' -> match all junctions that have 'foo' in their id\n"
762 <<
" junction; type; '=priority' -> match all junctions of type 'priority', but not of type 'priority_stop'\n"
763 <<
" edge; speed; '>10' -> match all edges with a speed above 10\n";
775 WRITE_DEBUG(
"Opening help dialog of selector frame");
777 additionalNeteditAttributesHelpDialog->create();
779 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
783 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
785 WRITE_DEBUG(
"Close help dialog of selector frame");
795 mySelectorFrameParent(selectorFrameParent),
796 myIntervalSelector(nullptr),
799 myMatchGenericDataTagComboBox(nullptr),
800 myMatchGenericDataAttrComboBox(nullptr),
802 myMatchGenericDataString(nullptr) {
836 for (
const auto& dataSet : mySelectorFrameParent->getViewNet()->getNet()->retrieveDataSets()) {
837 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
838 myIntervals[std::make_pair(dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN), dataInterval.second->getAttributeDouble(
SUMO_ATTR_END))] = -1;
842 if (myIntervals.size() == 0) {
843 disableMatchGenericDataAttribute();
846 myIntervalSelector->enable();
849 myMatchGenericDataTagComboBox->enable();
850 myMatchGenericDataAttrComboBox->enable();
851 myMatchGenericDataString->enable();
853 myIntervalSelector->clearItems();
855 for (
auto& interval : myIntervals) {
856 interval.second = myIntervalSelector->appendItem((
" [" +
toString(interval.first.first) +
"," +
toString(interval.first.second) +
"]").c_str());
859 if (myIntervalSelector->getNumItems() < 10) {
860 myIntervalSelector->setNumVisible(myIntervalSelector->getNumItems());
862 myIntervalSelector->setNumVisible(10);
865 myMatchGenericDataTagComboBox->clearItems();
867 myBegin->setText(
toString(myIntervals.begin()->first.first).c_str());
868 myBegin->setTextColor(FXRGB(0, 0, 0));
869 myEnd->setText(
toString(myIntervals.begin()->first.second).c_str());
870 myEnd->setTextColor(FXRGB(0, 0, 0));
874 for (
const auto& genericDataTag : genericDataTags) {
875 myMatchGenericDataTagComboBox->appendItem(genericDataTag.second.c_str());
878 myMatchGenericDataTagComboBox->setCurrentItem(0);
879 myMatchGenericDataTagComboBox->setNumVisible(myMatchGenericDataTagComboBox->getNumItems());
881 onCmdSelectTag(
nullptr, 0,
nullptr);
889 myIntervalSelector->disable();
892 myMatchGenericDataTagComboBox->disable();
893 myMatchGenericDataAttrComboBox->disable();
894 myMatchGenericDataString->disable();
896 myMatchGenericDataTagComboBox->setTextColor(FXRGB(0, 0, 0));
897 myMatchGenericDataAttrComboBox->setTextColor(FXRGB(0, 0, 0));
898 myMatchGenericDataString->setTextColor(FXRGB(0, 0, 0));
919 for (
auto& interval : myIntervals) {
920 if (interval.second == myIntervalSelector->getCurrentItem()) {
922 myBegin->setTextColor(FXRGB(0, 0, 0));
923 myBegin->setText(
toString(interval.first.first).c_str());
925 myEnd->setTextColor(FXRGB(0, 0, 0));
926 myEnd->setText(
toString(interval.first.second).c_str());
930 onCmdSelectTag(0, 0, 0);
938 if (GNEAttributeCarrier::canParse<double>(myBegin->getText().text()) &&
939 GNEAttributeCarrier::canParse<double>(myEnd->getText().text())) {
941 myBegin->setTextColor(FXRGB(0, 0, 0));
942 myBegin->killFocus();
944 myMatchGenericDataTagComboBox->enable();
945 myMatchGenericDataAttrComboBox->enable();
946 myMatchGenericDataString->enable();
948 onCmdSelectTag(0, 0, 0);
951 myBegin->setTextColor(FXRGB(255, 0, 0));
953 myMatchGenericDataTagComboBox->disable();
954 myMatchGenericDataAttrComboBox->disable();
955 myMatchGenericDataString->disable();
964 if (GNEAttributeCarrier::canParse<double>(myBegin->getText().text()) &&
965 GNEAttributeCarrier::canParse<double>(myEnd->getText().text())) {
967 myEnd->setTextColor(FXRGB(0, 0, 0));
970 myMatchGenericDataTagComboBox->enable();
971 myMatchGenericDataAttrComboBox->enable();
972 myMatchGenericDataString->enable();
974 onCmdSelectTag(0, 0, 0);
977 myEnd->setTextColor(FXRGB(255, 0, 0));
979 myMatchGenericDataTagComboBox->disable();
980 myMatchGenericDataAttrComboBox->disable();
981 myMatchGenericDataString->disable();
994 for (
const auto& genericDataTag : listOfTags) {
995 if (genericDataTag.second == myMatchGenericDataTagComboBox->getText().text()) {
996 myCurrentTag = genericDataTag.first;
1002 const double begin = GNEAttributeCarrier::parse<double>(myBegin->getText().text());
1003 const double end = GNEAttributeCarrier::parse<double>(myEnd->getText().text());
1005 auto attributes = mySelectorFrameParent->getViewNet()->getNet()->retrieveGenericDataParameters(
toString(myCurrentTag), begin, end);
1007 myMatchGenericDataTagComboBox->setTextColor(FXRGB(0, 0, 0));
1008 myMatchGenericDataAttrComboBox->enable();
1009 myMatchGenericDataString->enable();
1010 myMatchGenericDataAttrComboBox->clearItems();
1014 for (
const auto& attribute : attributes) {
1015 myMatchGenericDataAttrComboBox->appendItem(attribute.c_str());
1017 myMatchGenericDataAttrComboBox->setNumVisible(myMatchGenericDataAttrComboBox->getNumItems());
1018 onCmdSelectAttribute(
nullptr, 0,
nullptr);
1021 myMatchGenericDataTagComboBox->setTextColor(FXRGB(255, 0, 0));
1022 myMatchGenericDataAttrComboBox->disable();
1023 myMatchGenericDataString->disable();
1033 std::set<std::string> attributes = mySelectorFrameParent->getViewNet()->getNet()->retrieveGenericDataParameters(
1035 GNEAttributeCarrier::parse<double>(myBegin->getText().text()),
1036 GNEAttributeCarrier::parse<double>(myEnd->getText().text()));
1040 myCurrentAttribute.clear();
1042 for (
const auto& attribute : attributes) {
1043 if (attribute == myMatchGenericDataAttrComboBox->getText().text()) {
1044 myCurrentAttribute = attribute;
1048 if (myCurrentAttribute.empty()) {
1049 myMatchGenericDataAttrComboBox->setTextColor(FXRGB(255, 0, 0));
1050 myMatchGenericDataString->disable();
1052 myMatchGenericDataAttrComboBox->setTextColor(FXRGB(0, 0, 0));
1053 myMatchGenericDataString->enable();
1062 std::string expression = myMatchGenericDataString->getText().text();
1065 const auto genericDatas = mySelectorFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveGenericDatas(myCurrentTag,
1066 GNEAttributeCarrier::parse<double>(myBegin->getText().text()),
1067 GNEAttributeCarrier::parse<double>(myEnd->getText().text()));
1068 if (expression ==
"") {
1070 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getGenericMatches(genericDatas, myCurrentAttribute,
'@', 0, expression));
1077 char compOp = expression[0];
1078 if ((compOp ==
'<') || (compOp ==
'>') || (compOp ==
'=')) {
1079 expression = expression.substr(1);
1084 if (GNEAttributeCarrier::canParse<double>(expression.c_str())) {
1085 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getGenericMatches(genericDatas, myCurrentAttribute, compOp, GNEAttributeCarrier::parse<double>(expression.c_str()), expression));
1096 char compOp = expression[0];
1097 if ((compOp ==
'=') || (compOp ==
'!') || (compOp ==
'^')) {
1098 expression = expression.substr(1);
1102 mySelectorFrameParent->handleIDs(mySelectorFrameParent->getGenericMatches(genericDatas, myCurrentAttribute, compOp, 0, expression));
1106 myMatchGenericDataString->setTextColor(FXRGB(0, 0, 0));
1107 myMatchGenericDataString->killFocus();
1109 myMatchGenericDataString->setTextColor(FXRGB(255, 0, 0));
1118 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(
this,
"Netedit Parameters Help",
GUIDesignDialogBox);
1121 std::ostringstream help;
1123 <<
"- The 'MatchGenericData Attribute' controls allow to specify a set of objects which are then applied to the current selection\n"
1124 <<
" according to the current 'Modification Mode'.\n"
1125 <<
" 1. Select an object type from the first input box\n"
1126 <<
" 2. Select an attribute from the second input box\n"
1127 <<
" 3. Enter a 'match expression' in the third input box and press <return>\n"
1129 <<
"- The empty expression matches all objects\n"
1130 <<
"- For numerical attributes the match expression must consist of a comparison operator ('<', '>', '=') and a number.\n"
1131 <<
"- An object matches if the comparison between its attribute and the given number by the given operator evaluates to 'true'\n"
1133 <<
"- For string attributes the match expression must consist of a comparison operator ('', '=', '!', '^') and a string.\n"
1134 <<
" '' (no operator) matches if string is a substring of that object'ts attribute.\n"
1135 <<
" '=' matches if string is an exact match.\n"
1136 <<
" '!' matches if string is not a substring.\n"
1137 <<
" '^' matches if string is not an exact match.\n"
1140 <<
" junction; id; 'foo' -> match all junctions that have 'foo' in their id\n"
1141 <<
" junction; type; '=priority' -> match all junctions of type 'priority', but not of type 'priority_stop'\n"
1142 <<
" edge; speed; '>10' -> match all edges with a speed above 10\n";
1154 WRITE_DEBUG(
"Opening help dialog of selector frame");
1156 additionalNeteditAttributesHelpDialog->create();
1158 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
1160 getApp()->refresh();
1162 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
1164 WRITE_DEBUG(
"Close help dialog of selector frame");
1174 mySelectorFrameParent(selectorFrameParent) {
1192 mySelectorFrameParent->myViewNet->setSelectorFrameScale(mySelectionScaling->getValue());
1193 mySelectorFrameParent->myViewNet->updateViewNet();
1203 mySelectorFrameParent(selectorFrameParent) {
1221 FXFileDialog opendialog(
this,
"Open List of Selected Items");
1223 opendialog.setSelectMode(SELECTFILE_EXISTING);
1224 opendialog.setPatternList(
"Selection files (*.txt)\nAll files (*)");
1228 if (opendialog.execute()) {
1229 std::vector<GNEAttributeCarrier*> loadedACs;
1231 std::string file = opendialog.getFilename().text();
1232 std::ostringstream msg;
1233 std::ifstream strm(file.c_str());
1239 while (strm.good()) {
1243 if (line.length() != 0) {
1247 if ((
object !=
nullptr) && !mySelectorFrameParent->myLockGLObjectTypes->IsObjectTypeLocked(object->
getType())) {
1255 loadedACs.push_back(AC);
1261 if (loadedACs.size() > 0) {
1262 mySelectorFrameParent->myViewNet->getUndoList()->p_begin(
"load selection");
1263 mySelectorFrameParent->handleIDs(loadedACs);
1264 mySelectorFrameParent->myViewNet->getUndoList()->p_end();
1267 mySelectorFrameParent->myViewNet->updateViewNet();
1275 "Save List of selected Items",
".txt",
1283 const auto selectedACs = mySelectorFrameParent->myViewNet->getNet()->getSelectedAttributeCarriers(
false);
1284 for (
const auto& selectedAC : selectedACs) {
1293 WRITE_DEBUG(
"Opening FXMessageBox 'error storing selection'");
1295 FXMessageBox::error(
this, MBOX_OK,
"Storing Selection failed",
"%s", e.what());
1297 WRITE_DEBUG(
"Closed FXMessageBox 'error storing selection' with 'OK'");
1306 mySelectorFrameParent->clearCurrentSelection();
1314 if (mySelectorFrameParent->ACsToSelected()) {
1318 GNEUndoList* undoList = mySelectorFrameParent->myViewNet->getUndoList();
1320 undoList->
p_begin(
"invert selection");
1322 if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) {
1324 for (
const auto& junction : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getJunctions()) {
1327 if (junction.second->isAttributeCarrierSelected()) {
1334 for (
const auto& incomingEdge : junction.second->getGNEIncomingEdges()) {
1336 if (mySelectorFrameParent->myViewNet->getNetworkViewOptions().selectEdges()) {
1339 if (incomingEdge->isAttributeCarrierSelected()) {
1348 for (
const auto& lane : incomingEdge->getLanes()) {
1349 if (lane->isAttributeCarrierSelected()) {
1359 for (
const auto& connection : incomingEdge->getGNEConnections()) {
1360 if (connection->isAttributeCarrierSelected()) {
1370 for (
const auto& crossing : junction.second->getGNECrossings()) {
1371 if (crossing->isAttributeCarrierSelected()) {
1381 for (
const auto& additionals : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getAdditionals()) {
1384 for (
const auto& additional : additionals.second) {
1385 if (additional.second->isAttributeCarrierSelected()) {
1391 for (
const auto& additionalChild : additional.second->getChildAdditionals()) {
1393 if (additionalChild->getTagProperty().isSelectable()) {
1394 if (additionalChild->isAttributeCarrierSelected()) {
1407 for (
const auto& polygon : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getShapes().at(
SUMO_TAG_POLY)) {
1408 if (polygon.second->isAttributeCarrierSelected()) {
1417 for (
const auto& polygon : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getTAZElements().at(
SUMO_TAG_TAZ)) {
1418 if (polygon.second->isAttributeCarrierSelected()) {
1427 for (
const auto&
POI : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getShapes().at(
SUMO_TAG_POI)) {
1428 if (
POI.second->isAttributeCarrierSelected()) {
1434 for (
const auto& POILane : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getShapes().at(
SUMO_TAG_POILANE)) {
1435 if (POILane.second->isAttributeCarrierSelected()) {
1442 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeDemand()) {
1445 for (
const auto& route : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_ROUTE)) {
1446 if (route.second->isAttributeCarrierSelected()) {
1452 for (
const auto& embeddedRoute : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_ROUTE_EMBEDDED)) {
1453 if (embeddedRoute.second->isAttributeCarrierSelected()) {
1462 for (
const auto& vehicle : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_VEHICLE)) {
1463 if (vehicle.second->isAttributeCarrierSelected()) {
1469 for (
const auto& vehicle : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_VEHICLE_WITHROUTE)) {
1470 if (vehicle.second->isAttributeCarrierSelected()) {
1479 for (
const auto& trip : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_TRIP)) {
1480 if (trip.second->isAttributeCarrierSelected()) {
1489 for (
const auto& flow : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_FLOW)) {
1490 if (flow.second->isAttributeCarrierSelected()) {
1499 for (
const auto& routeFlow : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_FLOW_ROUTE)) {
1500 if (routeFlow.second->isAttributeCarrierSelected()) {
1506 for (
const auto& routeFlow : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_FLOW_WITHROUTE)) {
1507 if (routeFlow.second->isAttributeCarrierSelected()) {
1516 for (
const auto& demandElementTag : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements()) {
1517 for (
const auto& demandElement : demandElementTag.second) {
1518 for (
const auto& stop : demandElement.second->getChildDemandElements()) {
1519 if (stop->getTagProperty().isStop()) {
1520 if (stop->isAttributeCarrierSelected()) {
1532 for (
const auto& person : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_PERSON)) {
1533 if (person.second->isAttributeCarrierSelected()) {
1542 for (
const auto& personFlow : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_PERSONFLOW)) {
1543 if (personFlow.second->isAttributeCarrierSelected()) {
1552 for (
const auto& personTripFromTo : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_PERSONTRIP_EDGE_EDGE)) {
1553 if (personTripFromTo.second->isAttributeCarrierSelected()) {
1559 for (
const auto& personTripBusStop : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_PERSONTRIP_EDGE_BUSSTOP)) {
1560 if (personTripBusStop.second->isAttributeCarrierSelected()) {
1569 for (
const auto& rideFromTo : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_RIDE_EDGE_EDGE)) {
1570 if (rideFromTo.second->isAttributeCarrierSelected()) {
1576 for (
const auto& rideBusStop : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_RIDE_EDGE_BUSSTOP)) {
1577 if (rideBusStop.second->isAttributeCarrierSelected()) {
1586 for (
const auto& walkFromTo : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_WALK_EDGE_EDGE)) {
1587 if (walkFromTo.second->isAttributeCarrierSelected()) {
1593 for (
const auto& walkBusStop : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_WALK_EDGE_BUSSTOP)) {
1594 if (walkBusStop.second->isAttributeCarrierSelected()) {
1600 for (
const auto& walkRoute : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_WALK_ROUTE)) {
1601 if (walkRoute.second->isAttributeCarrierSelected()) {
1610 for (
const auto& personStopLane : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_PERSONSTOP_EDGE)) {
1611 if (personStopLane.second->isAttributeCarrierSelected()) {
1617 for (
const auto& personStopBusStop : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(
GNE_TAG_PERSONSTOP_BUSSTOP)) {
1618 if (personStopBusStop.second->isAttributeCarrierSelected()) {
1625 }
else if (mySelectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeData()) {
1627 for (
const auto& dataSet : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->getDataSets()) {
1628 for (
const auto& dataInterval : dataSet.second->getDataIntervalChildren()) {
1629 for (
const auto& genericData : dataInterval.second->getGenericDataChildren()) {
1632 if (genericData->isAttributeCarrierSelected()) {
1653 GNEFrame(horizontalFrameParent, viewNet,
"Selection") {
1671 new FXLabel(selectionHintGroupBox,
" - Hold <SHIFT> for \n rectangle selection.\n - Press <DEL> to\n delete selected items.",
nullptr,
GUIDesignLabelFrameInformation);
1709 if (junction.second->isAttributeCarrierSelected()) {
1714 for (
const auto& edge : junction.second->getGNEIncomingEdges()) {
1717 if (edge->isAttributeCarrierSelected()) {
1723 for (
const auto& lane : edge->getLanes()) {
1724 if (lane->isAttributeCarrierSelected()) {
1731 for (
const auto& connection : edge->getGNEConnections()) {
1732 if (connection->isAttributeCarrierSelected()) {
1740 for (
const auto& crossing : junction.second->getGNECrossings()) {
1741 if (crossing->isAttributeCarrierSelected()) {
1752 for (
const auto& additional : additionals.second) {
1753 if (additional.second->isAttributeCarrierSelected()) {
1757 for (
const auto& additionalChild : additional.second->getChildAdditionals()) {
1759 if (additionalChild->getTagProperty().isSelectable() && additionalChild->isAttributeCarrierSelected()) {
1770 if (polygon.second->isAttributeCarrierSelected()) {
1778 if (polygon.second->isAttributeCarrierSelected()) {
1786 if (
POI.second->isAttributeCarrierSelected()) {
1791 if (POILane.second->isAttributeCarrierSelected()) {
1800 if (route.second->isAttributeCarrierSelected()) {
1808 if (vehicle.second->isAttributeCarrierSelected()) {
1813 if (vehicle.second->isAttributeCarrierSelected()) {
1816 for (
const auto& embeddedRoute : vehicle.second->getChildDemandElements()) {
1817 if (embeddedRoute->isAttributeCarrierSelected()) {
1826 if (trip.second->isAttributeCarrierSelected()) {
1834 if (flow.second->isAttributeCarrierSelected()) {
1842 if (routeFlow.second->isAttributeCarrierSelected()) {
1847 if (routeFlow.second->isAttributeCarrierSelected()) {
1850 for (
const auto& embeddedRoute : routeFlow.second->getChildDemandElements()) {
1851 if (embeddedRoute->isAttributeCarrierSelected()) {
1860 for (
const auto& demandElement : demandElementTag.second) {
1861 for (
const auto& stop : demandElement.second->getChildDemandElements()) {
1862 if (stop->getTagProperty().isStop()) {
1863 if (stop->isAttributeCarrierSelected()) {
1874 if (person.second->isAttributeCarrierSelected()) {
1882 if (personFlow.second->isAttributeCarrierSelected()) {
1890 if (personTripFromTo.second->isAttributeCarrierSelected()) {
1895 if (personTripBusStop.second->isAttributeCarrierSelected()) {
1903 if (rideFromTo.second->isAttributeCarrierSelected()) {
1908 if (rideBusStop.second->isAttributeCarrierSelected()) {
1916 if (walkFromTo.second->isAttributeCarrierSelected()) {
1921 if (walkBusStop.second->isAttributeCarrierSelected()) {
1926 if (walkRoute.second->isAttributeCarrierSelected()) {
1934 if (personStopLane.second->isAttributeCarrierSelected()) {
1939 if (personStopBusStop.second->isAttributeCarrierSelected()) {
1946 for (
const auto& dataInterval : dataSet.second->getDataIntervalChildren()) {
1947 for (
const auto& genericData : dataInterval.second->getGenericDataChildren()) {
1948 if (genericData->isAttributeCarrierSelected()) {
1966 std::set<std::pair<std::string, GNEAttributeCarrier*> > ACsToSelect, ACsToUnselect;
1972 for (
const auto& selectedAC : selectedACs) {
1973 ACsToUnselect.insert(std::make_pair(selectedAC->getID(), selectedAC));
1977 for (
const auto& AC : ACs) {
1979 switch (setOperation) {
1981 ACsToUnselect.insert(std::make_pair(AC->getID(), AC));
1984 if (ACsToUnselect.find(std::make_pair(AC->getID(), AC)) != ACsToUnselect.end()) {
1985 ACsToSelect.insert(std::make_pair(AC->getID(), AC));
1989 ACsToSelect.insert(std::make_pair(AC->getID(), AC));
1995 std::set<GNEEdge*> edgesToSelect;
1997 for (
const auto& AC : ACsToSelect) {
1998 if (AC.second->getTagProperty().getTag() ==
SUMO_TAG_EDGE) {
2003 for (
const auto& edgeToSelect : edgesToSelect) {
2005 ACsToSelect.insert(std::make_pair(edgeToSelect->getParentJunctions().front()->getID(), edgeToSelect->getParentJunctions().front()));
2006 for (
const auto& connectionToSelect : edgeToSelect->getParentJunctions().front()->getGNEConnections()) {
2007 ACsToSelect.insert(std::make_pair(connectionToSelect->getID(), connectionToSelect));
2009 for (
const auto& crossingToSelect : edgeToSelect->getParentJunctions().front()->getGNECrossings()) {
2010 ACsToSelect.insert(std::make_pair(crossingToSelect->getID(), crossingToSelect));
2013 ACsToSelect.insert(std::make_pair(edgeToSelect->getParentJunctions().back()->getID(), edgeToSelect->getParentJunctions().back()));
2014 for (
const auto& connectionToSelect : edgeToSelect->getParentJunctions().back()->getGNEConnections()) {
2015 ACsToSelect.insert(std::make_pair(connectionToSelect->getID(), connectionToSelect));
2017 for (
const auto& crossingToSelect : edgeToSelect->getParentJunctions().back()->getGNECrossings()) {
2018 ACsToSelect.insert(std::make_pair(crossingToSelect->getID(), crossingToSelect));
2023 if ((ACsToSelect.size() + ACsToUnselect.size()) > 0) {
2026 for (
const auto& ACToUnselect : ACsToUnselect) {
2027 if (ACToUnselect.second->getTagProperty().isSelectable()) {
2031 for (
const auto& ACToSelect : ACsToSelect) {
2032 if (ACToSelect.second->getTagProperty().isSelectable()) {
2064 if (junction.second->getGNEConnections().size() > 0) {
2072 if (junction.second->getGNECrossings().size() > 0) {
2127 for (
const auto& demandElementTag : demandElementsMap) {
2128 for (
const auto& demandElement : demandElementTag.second) {
2129 for (
const auto& stop : demandElement.second->getChildDemandElements()) {
2130 if (stop->getTagProperty().isStop()) {
2176 for (
const auto& dataInterval : dataSet.second->getDataIntervalChildren()) {
2177 for (
const auto& genericData : dataInterval.second->getGenericDataChildren()) {
2191 std::vector<GNEAttributeCarrier*>
2193 std::vector<GNEAttributeCarrier*> result;
2199 for (
const auto& AC : allACbyTag) {
2201 result.push_back(AC);
2202 }
else if (tagValue.hasAttribute(ACAttr) && tagValue.getAttributeProperties(ACAttr).isNumerical()) {
2204 std::istringstream buf(AC->getAttribute(ACAttr));
2209 result.push_back(AC);
2214 result.push_back(AC);
2219 result.push_back(AC);
2225 std::string acVal = AC->getAttributeForSelection(ACAttr);
2228 if (acVal.find(expr) != std::string::npos) {
2229 result.push_back(AC);
2233 if (acVal.find(expr) == std::string::npos) {
2234 result.push_back(AC);
2238 if (acVal == expr) {
2239 result.push_back(AC);
2243 if (acVal != expr) {
2244 result.push_back(AC);
2254 std::vector<GNEAttributeCarrier*>
2256 std::vector<GNEAttributeCarrier*> result;
2258 for (
const auto& genericData : genericDatas) {
2260 result.push_back(genericData);
2263 std::istringstream buf(genericData->getParameter(attr,
"0"));
2268 result.push_back(genericData);
2273 result.push_back(genericData);
2278 result.push_back(genericData);
2284 std::string acVal = genericData->getAttributeForSelection(
GNE_ATTR_PARENT);
2287 if (acVal.find(expr) != std::string::npos) {
2288 result.push_back(genericData);
2292 if (acVal.find(expr) == std::string::npos) {
2293 result.push_back(genericData);
2297 if (acVal == expr) {
2298 result.push_back(genericData);
2302 if (acVal != expr) {
2303 result.push_back(genericData);
FXDEFMAP(GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry) ObjectTypeEntryMap[]
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ MID_GNE_SELECTORFRAME_SELECTSCALE
changes the visual scaling of selected items
@ MID_GNE_SELECTORFRAME_SETINTERVAL
change interval
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_CHOOSEN_SAVE
Save set.
@ MID_GNE_SELECTORFRAME_SELECTATTRIBUTE
select attribute in selector frame
@ MID_CHOOSEN_INVERT
Deselect selected items.
@ MID_GNE_SELECTORFRAME_SETEND
end text field
@ MID_GNE_SELECTORFRAME_SELECTTAG
select tag in selector frame
@ MID_CHOOSEN_ELEMENTS
set subset of elements
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_GNE_SELECTORFRAME_SETBEGIN
edit begin text field
@ MID_CHOOSEN_LOAD
Load set.
@ MID_CHOOSEN_CLEAR
Clear set.
@ MID_GNE_SELECTORFRAME_PROCESSSTRING
process string
#define GUIDesignLabelLeft
#define GUIDesignMatrixLockGLTypes
Matrix for pack GLTypes (used in GNESelectorFrame)
#define GUIDesignSpinDial
#define GUIDesignComboBox
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignDialogBox
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignComboBoxStaticExtended
Combo box static (not editable) extended over the all frame.
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
#define GUIDesignButtonOK
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignHorizontalSeparator
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ GLO_EDGERELDATA
edge relation data
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ GLO_CONNECTION
a connection
@ GLO_ADDITIONALELEMENT
reserved GLO type to pack all additionals elements
@ GLO_PERSONTRIP
a person trip
@ GLO_PERSONSTOP
a person stop
@ GLO_PERSONFLOW
a person flow
FXString gCurrentFolder
The folder used as last.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_PERSONTRIP_EDGE_EDGE
@ GNE_TAG_PERSONSTOP_BUSSTOP
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_NOTHING
invalid tag
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route (used in NETEDIT)
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ GNE_TAG_PERSONSTOP_EDGE
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ GNE_TAG_PERSONTRIP_EDGE_BUSSTOP
@ GNE_TAG_VEHICLE_WITHROUTE
@ GNE_TAG_RIDE_EDGE_BUSSTOP
@ SUMO_TAG_POILANE
begin/end of the description of a Point of interest over Lane (used by Netedit)
@ GNE_TAG_WALK_EDGE_BUSSTOP
@ GNE_TAG_ROUTE_EMBEDDED
embedded route (used in NETEDIT)
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_SELECTED
element is selected
@ SUMO_ATTR_BEGIN
weights: time range begin
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ GNE_ATTR_CLOSE_SHAPE
Close shape of a polygon (Used by GNEPolys)
@ SUMO_ATTR_END
weights: time range end
@ GNE_ATTR_DATASET
data set of a generic data
@ GNE_ATTR_BLOCK_SHAPE
block shape of a graphic element (Used mainly in GNEShapes)
@ SUMO_ATTR_NOTHING
invalid attribute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static const GNETagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
const GNETagProperties & getTagProperty() const
get Tag Property assigned to this object
static std::vector< std::pair< SumoXMLTag, const std::string > > getAllowedTagsByCategory(const int tagPropertyCategory, const bool onlyDrawables)
get tags of all editable element types using TagProperty Type (NetworkEditMode::NETWORKELEMENT,...
GNENet * getNet() const
get pointer to net
GNEViewNet * myViewNet
View Net.
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
virtual void show()
show Frame
virtual void hide()
hide Frame
const std::map< std::string, GNEDataSet * > & getDataSets() const
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::map< SumoXMLTag, std::map< std::string, GNETAZElement * > > & getTAZElements() const
const std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > & getAdditionals() const
const std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > & getDemandElements() const
const std::map< std::string, GNEJunction * > & getJunctions() const
map with the ID and pointer to junctions of net
const std::map< SumoXMLTag, std::map< std::string, GNEShape * > > & getShapes() const
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true) const
get edge by id
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true) const
get a single attribute carrier based on a GLID
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
Type getElementSet() const
get current selected element set
void refreshElementSet()
refresh element set
ElementSet(GNESelectorFrame *selectorFrameParent)
constructor
FXComboBox * mySetComboBox
Combo Box with the element sets.
long onCmdSelectElementSet(FXObject *, FXSelector, void *)
Called when the user change the set of element to search (networkElement, Additional or shape)
class for object types entries
Supermode getSupermode() const
get supermode associated to this ObjectTypeEntry
void showObjectTypeEntry()
show ObjectTypeEntry
void counterDown()
down count
bool isGLTypeLocked() const
check if current GLType is blocked
FXCheckButton * myCheckBoxLocked
check box to check if GLObject type is blocked
FXLabel * myLabelTypeName
label type nane
FXLabel * myLabelCounter
label counter
long onCmdSetCheckBox(FXObject *, FXSelector, void *)
called when user change the CheckBox
void hideObjectTypeEntry()
hide ObjectTypeEntry
void addedLockedObject(const GUIGlObjectType type)
set object selected
std::map< GUIGlObjectType, ObjectTypeEntry * > myTypeEntries
check boxes for type-based selection locking and selected object counts
void showTypeEntries()
show type Entries (depending if we're in Network or demand supermode)
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
void removeLockedObject(const GUIGlObjectType type)
set object unselected
~LockGLObjectTypes()
destructor
void disableMatchAttribute()
disable match attributes
void hideMatchAttribute()
hide match attributes
FXTextField * myMatchString
string of the match
MatchAttribute(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
FXButton * myMatchStringButton
match string button
FXComboBox * myMatchAttrComboBox
attributes of the match box
void showMatchAttribute()
show match attributes
long onCmdSelMBString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
~MatchAttribute()
destructor
long onCmdSelMBAttribute(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
void enableMatchAttribute()
enable match attributes
long onCmdSelMBTag(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
FXComboBox * myMatchTagComboBox
tag of the match box
SumoXMLAttr myCurrentAttribute
current SumoXMLTag Attribute
long onCmdProcessString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
MatchGenericDataAttribute(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
~MatchGenericDataAttribute()
destructor
long onCmdSelectTag(FXObject *, FXSelector, void *)
Called when the user selects a tag in the match box.
void enableMatchGenericDataAttribute()
enable match attributes
void showMatchGenericDataAttribute()
show match attributes
FXTextField * myEnd
TextField for end.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
FXComboBox * myIntervalSelector
tag of the match box
long onCmdSetBegin(FXObject *, FXSelector, void *)
Called when the user change begin text field.
long onCmdSetInterval(FXObject *, FXSelector, void *)
Called when the user selects an interval.
long onCmdSelectAttribute(FXObject *, FXSelector, void *)
Called when the user selects an attribute in the match box.
FXComboBox * myMatchGenericDataTagComboBox
tag of the match box
void disableMatchGenericDataAttribute()
disable match attributes
long onCmdSetEnd(FXObject *, FXSelector, void *)
Called when the user change end text field.
FXTextField * myBegin
TextField for begin.
FXComboBox * myMatchGenericDataAttrComboBox
attributes of the match box
FXTextField * myMatchGenericDataString
string of the match
std::string myCurrentAttribute
current string Attribute
void hideMatchGenericDataAttribute()
hide match attributes
FXRadioButton * myReplaceRadioButton
replace radio button
Operation
FOX-declaration.
ModificationMode(GNESelectorFrame *selectorFrameParent)
constructor
long onCmdSelectModificationMode(FXObject *, FXSelector, void *)
FXRadioButton * myAddRadioButton
add radio button
~ModificationMode()
destructor
Operation getModificationMode() const
get current modification mode
FXRadioButton * myRemoveRadioButton
remove radio button
FXRadioButton * myKeepRadioButton
keep button
SelectionOperation(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
~SelectionOperation()
destructor
long onCmdInvert(FXObject *, FXSelector, void *)
Called when the user presses the Invert-button.
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
~VisualScaling()
destructor
long onCmdScaleSelection(FXObject *, FXSelector, void *)
Called when the user changes visual scaling.
VisualScaling(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
FXRealSpinner * mySelectionScaling
Spinner for selection scaling.
std::vector< GNEAttributeCarrier * > getMatches(const SumoXMLTag ACTag, const SumoXMLAttr ACAttr, const char compOp, const double val, const std::string &expr)
return ACs of the given type with matching attrs
MatchGenericDataAttribute * myMatchGenericDataAttribute
modul for match generic data attribute
ModificationMode * getModificationModeModul() const
get modification mode modul
MatchAttribute * myMatchAttribute
modul for match attribute
std::vector< GNEAttributeCarrier * > getGenericMatches(const std::vector< GNEGenericData * > &genericDatas, const std::string &attr, const char compOp, const double val, const std::string &expr)
return GenericDatas of the given type with matching attrs
SelectionOperation * mySelectionOperation
modul for selection operations
GNESelectorFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
bool ACsToSelected() const
check if there is ACs to select/unselect
~GNESelectorFrame()
Destructor.
ModificationMode * myModificationMode
modul for change modification mode
VisualScaling * myVisualScaling
modul for visual scaling
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
LockGLObjectTypes * myLockGLObjectTypes
modul for lock selected items
void handleIDs(const std::vector< GNEAttributeCarrier * > &ACs, const ModificationMode::Operation setop=ModificationMode::Operation::DEFAULT)
apply list of ids to the current selection according to Operation,
ElementSet * myElementSet
modul for select element set
bool isSelectable() const
return true if tag correspond to a selectable element
bool isDemandElement() const
return true if tag correspond to a demand element
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
GNENet * getNet() const
get the net object
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
bool autoSelectNodes()
whether to autoselect nodes or to lanes
GNEUndoList * getUndoList() const
get the undoList object
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIGlID getGlID() const
Returns the numerical id of the object.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
Static storage of an output device and its base (abstract) implementation.
void close()
Closes the device and removes it from the dictionary.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
C++ TraCI client API implementation.
const std::string & getString(const T key) const
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
bool isCurrentSupermodeData() const
@check if current supermode is Data
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network