Seamly2D
Code documentation
vtooloptionspropertybrowser.cpp
Go to the documentation of this file.
1 /******************************************************************************
2 * @file vtooloptionspropertybrowser.cpp
3 ** @author Douglas S Caskey
4 ** @date 30 Apr, 2023
5 **
6 ** @brief
7 ** @copyright
8 ** This source code is part of the Seamly2D project, a pattern making
9 ** program to create and model patterns of clothing.
10 ** Copyright (C) 2017-2023 Seamly2D project
11 ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
12 **
13 ** Seamly2D is free software: you can redistribute it and/or modify
14 ** it under the terms of the GNU General Public License as published by
15 ** the Free Software Foundation, either version 3 of the License, or
16 ** (at your option) any later version.
17 **
18 ** Seamly2D is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
22 **
23 ** You should have received a copy of the GNU General Public License
24 ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
25 **
26 *************************************************************************/
27 
28 /************************************************************************
29  **
30  ** @file vtooloptionspropertybrowser.cpp
31  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
32  ** @date 28 8, 2014
33  **
34  ** @brief
35  ** @copyright
36  ** This source code is part of the Valentina project, a pattern making
37  ** program, whose allow create and modeling patterns of clothing.
38  ** Copyright (C) 2014 Valentina project
39  ** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
40  **
41  ** Valentina is free software: you can redistribute it and/or modify
42  ** it under the terms of the GNU General Public License as published by
43  ** the Free Software Foundation, either version 3 of the License, or
44  ** (at your option) any later version.
45  **
46  ** Valentina is distributed in the hope that it will be useful,
47  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
48  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49  ** GNU General Public License for more details.
50  **
51  ** You should have received a copy of the GNU General Public License
52  ** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
53  **
54  *************************************************************************/
55 
57 
58 #include "vformulaproperty.h"
59 #include "../core/vapplication.h"
60 #include "../ifc/ifcdef.h"
61 #include "../vgeometry/vcubicbezier.h"
62 #include "../vgeometry/vcubicbezierpath.h"
63 #include "../vmisc/def.h"
64 #include "../vmisc/vabstractapplication.h"
65 #include "../vpatterndb/vcontainer.h"
66 #include "../vpatterndb/vformula.h"
67 #include "../vpropertyexplorer/vproperties.h"
68 #include "../vtools/tools/drawTools/drawtools.h"
69 #include "../vwidgets/vmaingraphicsview.h"
70 #include "../vwidgets/vgraphicssimpletextitem.h"
71 #include "../vwidgets/vcontrolpointspline.h"
72 #include "../vwidgets/vsimplepoint.h"
73 #include "../vwidgets/vsimplecurve.h"
74 #include "../vwidgets/vcurvepathitem.h"
75 
76 #include <QDockWidget>
77 #include <QHBoxLayout>
78 #include <QDebug>
79 #include <QRegularExpression>
80 
81 //---------------------------------------------------------------------------------------------------------------------
83  : QObject(parent)
84  , m_data(data)
85  , propertyModel(nullptr)
86  , formView(nullptr)
87  , currentItem(nullptr)
88  , propertyToId(QMap<VPE::VProperty *, QString>())
89  , idToProperty(QMap<QString, VPE::VProperty *>())
90 {
93  formView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
94 
95  QScrollArea *scroll = new QScrollArea(parent);
96  scroll->setWidgetResizable(true);
97  scroll->setWidget(formView);
98 
99  parent->setWidget(scroll);
100 
103 }
104 
105 //---------------------------------------------------------------------------------------------------------------------
107 {
108  propertyModel->clear();
109  propertyToId.clear();
110  idToProperty.clear();
111  currentItem = nullptr;
112 }
113 
114 //---------------------------------------------------------------------------------------------------------------------
116 {
117  // This check helps to find missing tools in the switch
118  Q_STATIC_ASSERT_X(static_cast<int>(Tool::LAST_ONE_DO_NOT_USE) == 53, "Not all tools were used in switch.");
119 
120  switch (item->type())
121  {
124  break;
125  case VToolEndLine::Type:
127  break;
130  break;
131  case VToolArc::Type:
132  showOptionsToolArc(item);
133  break;
136  break;
137  case VToolBisector::Type:
139  break;
140  case VToolCutArc::Type:
141  showOptionsToolCutArc(item);
142  break;
145  break;
148  break;
149  case VToolHeight::Type:
150  showOptionsToolHeight(item);
151  break;
152  case VToolLine::Type:
153  showOptionsToolLine(item);
154  break;
157  break;
158  case VToolNormal::Type:
159  showOptionsToolNormal(item);
160  break;
163  break;
166  break;
169  break;
172  break;
175  break;
178  break;
179  case VToolSpline::Type:
180  showOptionsToolSpline(item);
181  break;
184  break;
187  break;
190  break;
191  case VToolTriangle::Type:
193  break;
196  case VSimplePoint::Type:
197  case VSimpleCurve::Type:
198  currentItem = item->parentItem();
200  break;
203  break;
206  break;
209  break;
212  break;
215  break;
216  case VToolRotation::Type:
218  break;
221  break;
224  break;
225  case VToolMove::Type:
226  showOptionsToolMove(item);
227  break;
230  break;
231  default:
232  break;
233  }
234 }
235 
236 //---------------------------------------------------------------------------------------------------------------------
238 {
239  if (currentItem == nullptr)
240  {
241  return;
242  }
243 
244  // This check helps to find missing tools in the switch
245  Q_STATIC_ASSERT_X(static_cast<int>(Tool::LAST_ONE_DO_NOT_USE) == 53, "Not all tools were used in switch.");
246 
247  switch (currentItem->type())
248  {
251  break;
252  case VToolEndLine::Type:
254  break;
257  break;
258  case VToolArc::Type:
260  break;
263  break;
264  case VToolBisector::Type:
266  break;
267  case VToolCutArc::Type:
269  break;
272  break;
275  break;
276  case VToolHeight::Type:
278  break;
279  case VToolLine::Type:
281  break;
284  break;
285  case VToolNormal::Type:
287  break;
290  break;
293  break;
296  break;
299  break;
302  break;
305  break;
306  case VToolSpline::Type:
308  break;
311  break;
314  break;
317  break;
318  case VToolTriangle::Type:
320  break;
323  showItemOptions(currentItem->parentItem());
324  break;
327  break;
330  break;
333  break;
336  break;
339  break;
340  case VToolRotation::Type:
342  break;
345  break;
348  break;
349  case VToolMove::Type:
351  break;
354  break;
355  default:
356  break;
357  }
358 }
359 
360 //---------------------------------------------------------------------------------------------------------------------
362 {
363  QGraphicsItem *item = currentItem;
364  itemClicked(nullptr); //close options
365  itemClicked(item); //reopen options
366 }
367 
368 //---------------------------------------------------------------------------------------------------------------------
370 {
371  VPE::VProperty *prop = property;
372  if (!propertyToId.contains(prop))
373  {
374  if (!propertyToId.contains(prop->getParent()))// Maybe we know parent
375  {
376  return;
377  }
378  else
379  {
380  prop = prop->getParent();
381  }
382  }
383 
384  if (!currentItem)
385  {
386  return;
387  }
388 
389  // This check helps to find missing tools in the switch
390  Q_STATIC_ASSERT_X(static_cast<int>(Tool::LAST_ONE_DO_NOT_USE) == 53, "Not all tools were used in switch.");
391 
392  switch (currentItem->type())
393  {
396  break;
397  case VToolEndLine::Type:
398  changeDataToolEndLine(prop);
399  break;
402  break;
403  case VToolArc::Type:
404  changeDataToolArc(prop);
405  break;
408  break;
409  case VToolBisector::Type:
411  break;
412  case VToolCutArc::Type:
413  changeDataToolCutArc(prop);
414  break;
417  break;
420  break;
421  case VToolHeight::Type:
422  changeDataToolHeight(prop);
423  break;
424  case VToolLine::Type:
425  changeDataToolLine(prop);
426  break;
429  break;
430  case VToolNormal::Type:
431  changeDataToolNormal(prop);
432  break;
435  break;
438  break;
441  break;
444  break;
447  break;
450  break;
451  case VToolSpline::Type:
452  changeDataToolSpline(prop);
453  break;
456  break;
459  break;
462  break;
463  case VToolTriangle::Type:
465  break;
468  break;
471  break;
474  break;
477  break;
480  break;
481  case VToolRotation::Type:
483  break;
486  break;
489  break;
490  case VToolMove::Type:
491  changeDataToolMove(prop);
492  break;
495  break;
496  default:
497  break;
498  }
499  qApp->getSceneView()->update();
500 }
501 
502 //---------------------------------------------------------------------------------------------------------------------
504 {
505  if (item != nullptr)
506  {
507  if (item->isEnabled()==false)
508  {
509  return;
510  }
511  }
512 
513  if (currentItem == item && item != nullptr)
514  {
515  updateOptions();
516  return;
517  }
518 
519  propertyModel->clear();
520  propertyToId.clear();
521  idToProperty.clear();
522 
523  if (currentItem != nullptr)
524  {
525  VAbstractTool *previousTool = dynamic_cast<VAbstractTool *>(currentItem);
526  if (previousTool != nullptr)
527  {
528  previousTool->ShowVisualization(false); // hide for previous tool
529  }
530  }
531 
532  currentItem = item;
533  if (currentItem == nullptr)
534  {
535  formView->setTitle("");
536  return;
537  }
538 
540 }
541 
542 //---------------------------------------------------------------------------------------------------------------------
543 void VToolOptionsPropertyBrowser::addPropertyFormula(const QString &propertyName, const VFormula &formula,
544  const QString &attrName)
545 {
546  VFormulaProperty *itemLength = new VFormulaProperty(propertyName);
547  itemLength->SetFormula(formula);
548  addProperty(itemLength, attrName);
549 }
550 
551 //---------------------------------------------------------------------------------------------------------------------
552 template<class Tool>
553 void VToolOptionsPropertyBrowser::addPropertyObjectName(Tool *tool, const QString &propertyName, bool readOnly)
554 {
555  VPE::VStringProperty *itemName = new VPE::VStringProperty(propertyName);
556  readOnly == true ? itemName->setClearButtonEnable(false) : itemName->setClearButtonEnable(true);
557  itemName->setValue(qApp->TrVars()->VarToUser(tool->name()));
558  itemName->setReadOnly(readOnly);
559  addProperty(itemName, AttrName);
560 }
561 
562 //---------------------------------------------------------------------------------------------------------------------
563 template<class Tool>
564 void VToolOptionsPropertyBrowser::addPropertyPointName1(Tool *tool, const QString &propertyName)
565 {
566  VPE::VStringProperty *itemName = new VPE::VStringProperty(propertyName);
567  itemName->setClearButtonEnable(true);
568  itemName->setValue(tool->nameP1());
569  addProperty(itemName, AttrName1);
570 }
571 
572 //---------------------------------------------------------------------------------------------------------------------
573 template<class Tool>
574 void VToolOptionsPropertyBrowser::addPropertyPointName2(Tool *tool, const QString &propertyName)
575 {
576  VPE::VStringProperty *itemName = new VPE::VStringProperty(propertyName);
577  itemName->setClearButtonEnable(true);
578  itemName->setValue(tool->nameP2());
579  addProperty(itemName, AttrName2);
580 }
581 
582 //---------------------------------------------------------------------------------------------------------------------
583 template<class Tool>
584 void VToolOptionsPropertyBrowser::addPropertyOperationSuffix(Tool *tool, const QString &propertyName, bool readOnly)
585 {
586  VPE::VStringProperty *itemSuffix = new VPE::VStringProperty(propertyName);
587  itemSuffix->setClearButtonEnable(true);
588  itemSuffix->setValue(tool->Suffix());
589  itemSuffix->setReadOnly(readOnly);
590  addProperty(itemSuffix, AttrSuffix);
591 }
592 
593 //---------------------------------------------------------------------------------------------------------------------
594 template<class Tool>
595 void VToolOptionsPropertyBrowser::addPropertyLineName(Tool *tool, const QString &propertyName, bool readOnly)
596 {
597  auto lineName = new VPE::VStringProperty(propertyName);
598  lineName->setValue(tr("Line_") + tool->FirstPointName() + "_" + tool->SecondPointName());
599  lineName->setReadOnly(readOnly);
600  addProperty(lineName, AttrObjName);
601 }
602 
603 //---------------------------------------------------------------------------------------------------------------------
604 template<class Tool>
605 void VToolOptionsPropertyBrowser::addPropertyCurveName(Tool *tool, const QString &propertyName, const QString &prefix,
606  const QString &firstPoint, const QString &secondPoint,
607  bool readOnly)
608 {
609  Q_UNUSED(tool)
610 
611  auto arcName = new VPE::VStringProperty(propertyName);
612  arcName->setValue(prefix + firstPoint + "_" + secondPoint);
613  arcName->setReadOnly(readOnly);
614  addProperty(arcName, AttrObjName);
615 }
616 
617 //---------------------------------------------------------------------------------------------------------------------
618 void VToolOptionsPropertyBrowser::addPropertyParentPointName(const QString &pointName, const QString &propertyName,
619  const QString &propertyAttribute)
620 {
621  auto *itemParentPoint = new VPE::VLabelProperty(propertyName);
622  itemParentPoint->setValue(pointName);
623  addProperty(itemParentPoint, propertyAttribute);
624 }
625 
626 //---------------------------------------------------------------------------------------------------------------------
627 void VToolOptionsPropertyBrowser::addPropertyLabel(const QString &propertyName, const QString &propertyAttribute)
628 {
629  auto label = new VPE::VLabelProperty("<b>"+propertyName+"</b>");
630  label->setValue("");
631  label->setPropertyType(VPE::Property::Label);
632  addProperty(label, propertyAttribute);
633 }
634 
635 //---------------------------------------------------------------------------------------------------------------------
636 template<class Tool>
637 void VToolOptionsPropertyBrowser::addPropertyCrossPoint(Tool *tool, const QString &propertyName)
638 {
639  VPE::VEnumProperty* itemProperty = new VPE::VEnumProperty(propertyName);
640  itemProperty->setLiterals(QStringList()<< tr("First point") << tr("Second point"));
641  itemProperty->setValue(static_cast<int>(tool->GetCrossCirclesPoint())-1);
642  addProperty(itemProperty, AttrCrossPoint);
643 }
644 
645 //---------------------------------------------------------------------------------------------------------------------
646 template<class Tool>
647 void VToolOptionsPropertyBrowser::addPropertyVCrossPoint(Tool *tool, const QString &propertyName)
648 {
649  auto *itemProperty = new VPE::VEnumProperty(propertyName);
650  itemProperty->setLiterals(QStringList()<< tr("Highest point") << tr("Lowest point"));
651  itemProperty->setValue(static_cast<int>(tool->GetVCrossPoint())-1);
652  addProperty(itemProperty, AttrVCrossPoint);
653 }
654 
655 //---------------------------------------------------------------------------------------------------------------------
656 template<class Tool>
657 void VToolOptionsPropertyBrowser::addPropertyHCrossPoint(Tool *tool, const QString &propertyName)
658 {
659  auto *itemProperty = new VPE::VEnumProperty(propertyName);
660  itemProperty->setLiterals(QStringList()<< tr("Leftmost point") << tr("Rightmost point"));
661  itemProperty->setValue(static_cast<int>(tool->GetHCrossPoint())-1);
662  addProperty(itemProperty, AttrHCrossPoint);
663 }
664 
665 //---------------------------------------------------------------------------------------------------------------------
666 template<class Tool>
667 void VToolOptionsPropertyBrowser::addPropertyAxisType(Tool *tool, const QString &propertyName)
668 {
669  auto *itemProperty = new VPE::VEnumProperty(propertyName);
670  itemProperty->setLiterals(QStringList()<< tr("Vertical axis") << tr("Horizontal axis"));
671  itemProperty->setValue(static_cast<int>(tool->getAxisType())-1);
672  addProperty(itemProperty, AttrAxisType);
673 }
674 
675 //---------------------------------------------------------------------------------------------------------------------
676 template<class Tool>
677 void VToolOptionsPropertyBrowser::addPropertyLineType(Tool *tool, const QString &propertyName)
678 {
679  VPE::LineTypeProperty *lineTypeProperty = new VPE::LineTypeProperty(propertyName);
680 
681  QMap<QString, QString> lineTypes = lineTypeList();
682  if (tool->type() == VToolLine::Type)
683  {
684  lineTypes.remove(LineTypeNone);
685  }
686  lineTypeProperty->setLineTypes(lineTypes);
687 
688  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypes, tool->getLineType());
689  if (index == -1)
690  {
691  qWarning()<<"Can't find line type" << tool->getLineType()<<"in list";
692  }
693  lineTypeProperty->setValue(index);
694  addProperty(lineTypeProperty, AttrLineType);
695 }
696 
697 //---------------------------------------------------------------------------------------------------------------------
698 template<class Tool>
699 void VToolOptionsPropertyBrowser::addPropertyCurveLineType(Tool *tool, const QString &propertyName)
700 {
701  VPE::LineTypeProperty *penStyleProperty = new VPE::LineTypeProperty(propertyName);
702  penStyleProperty->setLineTypes(curveLineTypeList());
703  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
704  if (index == -1)
705  {
706  qWarning()<<"Can't find line type" << tool->getLineType()<<"in list";
707  }
708  penStyleProperty->setValue(index);
709  addProperty(penStyleProperty, AttrPenStyle);
710 }
711 
712 //---------------------------------------------------------------------------------------------------------------------
713 template<class Tool>
714 void VToolOptionsPropertyBrowser::addPropertyLineWeight(Tool *tool, const QString &propertyName)
715 {
716  VPE::LineWeightProperty *lineWeightProperty = new VPE::LineWeightProperty(propertyName);
717  lineWeightProperty->setLineWeights(lineWeightList());
718  const qint32 index = VPE::LineWeightProperty::indexOfLineWeight(lineWeightList(), tool->getLineWeight());
719  if (index == -1)
720  {
721  qWarning()<<"Can't find line weight" << tool->getLineWeight()<<"in list";
722  }
723  lineWeightProperty->setValue(index);
724  addProperty(lineWeightProperty, AttrLineWeight);
725 }
726 
727 //---------------------------------------------------------------------------------------------------------------------
728 template<class Tool>
729 void VToolOptionsPropertyBrowser::addPropertyLineColor(Tool *tool, const QString &propertyName, const QString &id)
730 {
731  VPE::VLineColorProperty *lineColorProperty = new VPE::VLineColorProperty(propertyName);
732  lineColorProperty->setColors(VAbstractTool::ColorsList());
733  const qint32 index = VPE::VLineColorProperty::indexOfColor(VAbstractTool::ColorsList(), tool->getLineColor());
734  if (index == -1)
735  {
736  qWarning()<<"Can't find line color" << tool->getLineColor()<<"in list";
737  }
738  lineColorProperty->setValue(index);
739  addProperty(lineColorProperty, id);
740 }
741 
742 //---------------------------------------------------------------------------------------------------------------------
743 template<class Tool>
744 void VToolOptionsPropertyBrowser::addObjectProperty(Tool *tool, const QString &pointName,
745  const QString &propertyName, const QString &id, GOType objType)
746 {
747  QMap<QString, quint32> list = getObjectList(tool, objType);
748  VPE::VObjectProperty *pointsProperty = new VPE::VObjectProperty(propertyName);
749  pointsProperty->setObjectsList(list);
750  const qint32 index = VPE::VObjectProperty::indexOfObject(list, pointName);
751  if (index == -1)
752  {
753  qWarning()<<"Can't find point" << pointName << "in list";
754  }
755  pointsProperty->setValue(index);
756  addProperty(pointsProperty, id);
757 }
758 
759 template<class Tool>
761 {
762  quint32 toolId = tool->getId();
764 
765  QVector<VToolRecord> history = qApp->getCurrentDocument()->getBlockHistory();
766  for (qint32 i = 0; i < history.size(); ++i)
767  {
768  const VToolRecord record = history.at(i);
769  quint32 recId = record.getId();
770  if (recId != toolId)
771  {
772  switch (static_cast<int>(record.getTypeTool()))
773  {
774  case 42: //Tool::True Darts
775  {
776  QVector<quint32> list = qApp->getCurrentDocument()->getDartItems(recId);
777  for (qint32 j = 0; j < list.size(); ++j)
778  {
779  quint32 id = list.at(j);
780  VToolRecord newRecord = VToolRecord(id, record.getTypeTool(),
781  qApp->getCurrentDocument()->getActiveDraftBlockName());
782 
784  if (objs->contains(id)) //Avoid badId Get GObject only if not a line tool which is not an object
785  {
787  objects.insert(id, obj);
788  }
789  }
790  break;
791  }
792 
793  case 45: //Tool::Rotation
794  case 46: //Tool::MirrorByLine
795  case 47: //Tool::MirrorByAxis
796  case 48: //Tool::Move
797  {
798  QVector<quint32> list = qApp->getCurrentDocument()->getOpItems(recId, QStringLiteral("destination"));
799  for (qint32 j = 0; j < list.size(); ++j)
800  {
801  quint32 id = list.at(j);
802  VToolRecord newRecord = VToolRecord(id, record.getTypeTool(),
803  qApp->getCurrentDocument()->getActiveDraftBlockName());
804 
806  if (objs->contains(id)) //Avoid badId Get GObject only if not a line tool which is not an object
807  {
809  objects.insert(id, obj);
810  }
811  }
812  break;
813  }
814  default:
815  {
817  if (objs->contains(recId)) //Avoid badId Get GObject only if not a line tool which is not an object
818  {
820  objects.insert(recId, obj);
821  }
822  break;
823  }
824  }
825  }
826  else
827  {
828  goto endLoop; //Copied objects upto selected tool - exit switch and for loops
829  }
830  }
831 
832 endLoop:
834  QHash<quint32, QSharedPointer<VGObject> >::const_iterator i;
835  for (i = objects.constBegin(); i != objects.constEnd(); ++i)
836  {
837  QSharedPointer<VGObject> obj = i.value();
838  if (obj->getMode() == Draw::Calculation)
839  {
840  switch (objType)
841  {
842  case GOType::Point:
843  case GOType::Arc:
844  case GOType::Spline:
845  case GOType::CubicBezier:
846  case GOType::SplinePath:
848  if (obj->getType() == objType)
849  {
850  map.insert(obj->name(), i.key());
851  }
852  break;
853 
854  case GOType::Curve:
855  if (obj->getType() == GOType::Spline || obj->getType() == GOType::CubicBezier)
856  {
857  map.insert(obj->name(), i.key());
858  }
859  break;
860 
861  case GOType::Path:
862  if (obj->getType() == GOType::SplinePath || obj->getType() == GOType::CubicBezierPath)
863  {
864  map.insert(obj->name(), i.key());
865  }
866  break;
867 
868  case GOType::AllCurves:
869  if ((obj->getType() == GOType::Spline ||
870  obj->getType() == GOType::SplinePath ||
871  obj->getType() == GOType::CubicBezier ||
872  obj->getType() == GOType::CubicBezierPath ||
873  obj->getType() == GOType::Arc ||
874  obj->getType() == GOType::EllipticalArc) &&
875  obj->getMode() == Draw::Calculation)
876  {
877  map.insert(obj->name(), i.key());
878  }
879  break;
880 
882  case GOType::Unknown:
883  default:
884  break;
885  }
886  }
887  }
888 
889  if (tool->type() == VToolMove::Type)
890  {
891  map.insert("Center point", NULL_ID);
892  }
893  return map;
894 }
895 
896 //---------------------------------------------------------------------------------------------------------------------
897 template<class Tool>
899 {
900  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
901  {
902  if (name == tool->name())
903  {
904  return;
905  }
906 
907  QRegularExpression rx(NameRegExp());
908  if (name.isEmpty() || VContainer::IsUnique(name) == false || rx.match(name).hasMatch() == false)
909  {
910  idToProperty[AttrName]->setValue(tool->name());
911  }
912  else
913  {
914  tool->setName(name);
915  }
916  }
917  else
918  {
919  qWarning()<<"Can't cast item";
920  }
921 }
922 
923 //---------------------------------------------------------------------------------------------------------------------
924 template<class Tool>
926 {
927  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
928  {
929  if (name == tool->nameP1())
930  {
931  return;
932  }
933 
934  QRegularExpression rx(NameRegExp());
935  if (name.isEmpty() || VContainer::IsUnique(name) == false || rx.match(name).hasMatch() == false)
936  {
937  idToProperty[AttrName1]->setValue(tool->nameP1());
938  }
939  else
940  {
941  tool->setNameP1(name);
942  }
943  }
944  else
945  {
946  qWarning()<<"Can't cast item";
947  }
948 }
949 
950 //---------------------------------------------------------------------------------------------------------------------
951 template<class Tool>
953 {
954  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
955  {
956  if (name == tool->nameP2())
957  {
958  return;
959  }
960 
961  QRegularExpression rx(NameRegExp());
962  if (name.isEmpty() || VContainer::IsUnique(name) == false || rx.match(name).hasMatch() == false)
963  {
964  idToProperty[AttrName2]->setValue(tool->nameP2());
965  }
966  else
967  {
968  tool->setNameP2(name);
969  }
970  }
971  else
972  {
973  qWarning()<<"Can't cast item";
974  }
975 }
976 
977 //---------------------------------------------------------------------------------------------------------------------
978 template<class Tool>
980 {
981  if (Tool *item = qgraphicsitem_cast<Tool *>(currentItem))
982  {
983  if (suffix == item->Suffix())
984  {
985  return;
986  }
987 
988  if (suffix.isEmpty())
989  {
990  idToProperty[AttrSuffix]->setValue(item->Suffix());
991  return;
992  }
993 
994  QRegularExpression rx(NameRegExp());
995  const QStringList uniqueNames = VContainer::AllUniqueNames();
996  for (int i=0; i < uniqueNames.size(); ++i)
997  {
998  const QString name = uniqueNames.at(i) + suffix;
999  if (not rx.match(name).hasMatch() || not VContainer::IsUnique(name))
1000  {
1001  idToProperty[AttrSuffix]->setValue(item->Suffix());
1002  return;
1003  }
1004  }
1005 
1006  item->setSuffix(suffix);
1007  }
1008  else
1009  {
1010  qWarning()<<"Can't cast item";
1011  }
1012 }
1013 
1014 //---------------------------------------------------------------------------------------------------------------------
1015 template<class Type>
1017 {
1018  bool ok = false;
1019  const int val = value.toInt(&ok);
1020 
1021  auto cross = static_cast<Type>(1);
1022  if (ok)
1023  {
1024  switch(val)
1025  {
1026  case 0:
1027  case 1:
1028  cross = static_cast<Type>(val+1);
1029  break;
1030  default:
1031  break;
1032  }
1033  }
1034 
1035  return cross;
1036 }
1037 
1038 //---------------------------------------------------------------------------------------------------------------------
1039 template<class Tool>
1041 {
1042  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
1043  {
1044  tool->setCirclesCrossPoint(getCrossPoint<CrossCirclesPoint>(value));
1045  }
1046  else
1047  {
1048  qWarning()<<"Can't cast item";
1049  }
1050 }
1051 
1052 //---------------------------------------------------------------------------------------------------------------------
1053 template<class Tool>
1055 {
1056  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
1057  {
1058  tool->SetVCrossPoint(getCrossPoint<VCrossCurvesPoint>(value));
1059  }
1060  else
1061  {
1062  qWarning()<<"Can't cast item";
1063  }
1064 }
1065 
1066 //---------------------------------------------------------------------------------------------------------------------
1067 template<class Tool>
1069 {
1070  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
1071  {
1072  tool->SetHCrossPoint(getCrossPoint<HCrossCurvesPoint>(value));
1073  }
1074  else
1075  {
1076  qWarning()<<"Can't cast item";
1077  }
1078 }
1079 
1080 //---------------------------------------------------------------------------------------------------------------------
1081 template<class Tool>
1082 void VToolOptionsPropertyBrowser::setAxisType(const QVariant &value)
1083 {
1084  if (Tool *tool = qgraphicsitem_cast<Tool *>(currentItem))
1085  {
1086  tool->setAxisType(getCrossPoint<AxisType>(value));
1087  }
1088  else
1089  {
1090  qWarning()<<"Can't cast item";
1091  }
1092 }
1093 
1094 //---------------------------------------------------------------------------------------------------------------------
1096 {
1097  propertyToId[property] = id;
1098  idToProperty[id] = property;
1099  propertyModel->addProperty(property, id);
1100 }
1101 
1102 //---------------------------------------------------------------------------------------------------------------------
1104 {
1105  SCASSERT(property != nullptr)
1106 
1107  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1108  const QString id = propertyToId[property];
1109 
1110  VToolBasePoint *tool = qgraphicsitem_cast<VToolBasePoint *>(currentItem);
1111  SCASSERT(tool != nullptr)
1112  switch (propertiesList().indexOf(id))
1113  {
1114  case 0: // AttrName
1115  setPointName<VToolBasePoint>(value.toString());
1116  break;
1117  case 1: // QLatin1String("Coordinates")
1118  tool->SetBasePointPos(value.toPointF());
1119  break;
1120  default:
1121  qWarning()<<"Unknown property type. id = "<<id;
1122  break;
1123  }
1124 }
1125 
1126 //---------------------------------------------------------------------------------------------------------------------
1128 {
1129  SCASSERT(property != nullptr)
1130 
1131  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1132  const QString id = propertyToId[property];
1133 
1134  VToolEndLine *tool = qgraphicsitem_cast<VToolEndLine *>(currentItem);
1135  SCASSERT(tool != nullptr)
1136  switch (propertiesList().indexOf(id))
1137  {
1138  case 0: // AttrName
1139  setPointName<VToolEndLine>(value.toString());
1140  break;
1141  case 3: // AttrLineType
1142  tool->setLineType(value.toString());
1143  break;
1144  case 26: // AttrLineColor
1145  tool->setLineColor(value.toString());
1146  break;
1147  case 60: // AttrLineWeight
1148  tool->setLineWeight(value.toString());
1149  break;
1150  case 4: // AttrLength
1151  tool->SetFormulaLength(value.value<VFormula>());
1152  break;
1153  case 5: // AttrAngle
1154  tool->SetFormulaAngle(value.value<VFormula>());
1155  break;
1156  case 2: // AttrBasePoint
1157  tool->SetBasePointId(value.toInt());
1158  break;
1159  default:
1160  qWarning()<<"Unknown property type. id = "<<id;
1161  break;
1162  }
1163 }
1164 
1165 //---------------------------------------------------------------------------------------------------------------------
1167 {
1168  SCASSERT(property != nullptr)
1169 
1170  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1171  const QString id = propertyToId[property];
1172 
1173  VToolAlongLine *tool = qgraphicsitem_cast<VToolAlongLine *>(currentItem);
1174  SCASSERT(tool != nullptr)
1175  switch (propertiesList().indexOf(id))
1176  {
1177  case 0: // AttrName
1178  setPointName<VToolAlongLine>(value.toString());
1179  break;
1180  case 3: // AttrLineType
1181  tool->setLineType(value.toString());
1182  break;
1183  case 26: // AttrLineColor
1184  tool->setLineColor(value.toString());
1185  break;
1186  case 60: // AttrLineWeight
1187  tool->setLineWeight(value.toString());
1188  break;
1189  case 4: // AttrLength
1190  tool->SetFormulaLength(value.value<VFormula>());
1191  break;
1192  case 2: // AttrBasePoint
1193  tool->SetBasePointId(value.toInt());
1194  break;
1195  case 7: // AttrSecondPoint
1196  tool->SetSecondPointId(value.toInt());
1197  break;
1198  default:
1199  qWarning()<<"Unknown property type. id = "<<id;
1200  break;
1201  }
1202 }
1203 
1204 //---------------------------------------------------------------------------------------------------------------------
1206 {
1207  SCASSERT(property != nullptr)
1208 
1209  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1210  const QString id = propertyToId[property];
1211 
1212  VToolArc *tool = qgraphicsitem_cast<VToolArc *>(currentItem);
1213  SCASSERT(tool != nullptr)
1214 
1215  switch (propertiesList().indexOf(id))
1216  {
1217  case 0: // AttrName
1218  Q_UNREACHABLE();//The attribute is read only
1219  break;
1220  case 8: // AttrRadius
1221  tool->SetFormulaRadius(value.value<VFormula>());
1222  break;
1223  case 9: // AttrAngle1
1224  tool->SetFormulaF1(value.value<VFormula>());
1225  break;
1226  case 10: // AttrAngle2
1227  tool->SetFormulaF2(value.value<VFormula>());
1228  break;
1229  case 27: // AttrColor
1230  tool->setLineColor(value.toString());
1231  break;
1232  case 60: // AttrLineWeight
1233  tool->setLineWeight(value.toString());
1234  break;
1235  case 11: // AttrCenter
1236  tool->setCenter(value.toInt());
1237  break;
1238  case 59: // AttrPenStyle
1239  tool->SetPenStyle(value.toString());
1240  break;
1241  default:
1242  qWarning()<<"Unknown property type. id = "<<id;
1243  break;
1244  }
1245 }
1246 
1247 //---------------------------------------------------------------------------------------------------------------------
1249 {
1250  SCASSERT(property != nullptr)
1251 
1252  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1253  const QString id = propertyToId[property];
1254 
1255  VToolArcWithLength *tool = qgraphicsitem_cast<VToolArcWithLength *>(currentItem);
1256  SCASSERT(tool != nullptr)
1257  switch (propertiesList().indexOf(id))
1258  {
1259  case 0: // AttrName
1260  Q_UNREACHABLE();//The attribute is read only
1261  break;
1262  case 8: // AttrRadius
1263  tool->SetFormulaRadius(value.value<VFormula>());
1264  break;
1265  case 9: // AttrAngle1
1266  tool->SetFormulaF1(value.value<VFormula>());
1267  break;
1268  case 4: // AttrLength
1269  tool->SetFormulaLength(value.value<VFormula>());
1270  break;
1271  case 27: // AttrColor
1272  tool->setLineColor(value.toString());
1273  break;
1274  case 60: // AttrLineWeight
1275  tool->setLineWeight(value.toString());
1276  break;
1277  case 11: // AttrCenter
1278  tool->setCenter(value.toInt());
1279  break;
1280  case 59: // AttrPenStyle
1281  tool->SetPenStyle(value.toString());
1282  break;
1283  default:
1284  qWarning()<<"Unknown property type. id = "<<id;
1285  break;
1286  }
1287 }
1288 
1289 //---------------------------------------------------------------------------------------------------------------------
1291 {
1292  SCASSERT(property != nullptr)
1293 
1294  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1295  const QString id = propertyToId[property];
1296 
1297  VToolBisector *tool = qgraphicsitem_cast<VToolBisector *>(currentItem);
1298  SCASSERT(tool != nullptr)
1299  switch (propertiesList().indexOf(id))
1300  {
1301  case 0: // AttrName
1302  setPointName<VToolBisector>(value.toString());
1303  break;
1304  case 4: // AttrLength
1305  tool->SetFormulaLength(value.value<VFormula>());
1306  break;
1307  case 3: // AttrLineType
1308  tool->setLineType(value.toString());
1309  break;
1310  case 26: // AttrLineColor
1311  tool->setLineColor(value.toString());
1312  break;
1313  case 60: // AttrLineWeight
1314  tool->setLineWeight(value.toString());
1315  break;
1316  case 6: // AttrFirstPoint
1317  tool->SetFirstPointId(value.toInt());
1318  break;
1319  case 2: // AttrBasePoint
1320  tool->SetBasePointId(value.toInt());
1321  break;
1322  case 12: // AttrThirdPoint
1323  tool->SetThirdPointId(value.toInt());
1324  break;
1325  default:
1326  qWarning()<<"Unknown property type. id = "<<id;
1327  break;
1328  }
1329 }
1330 
1331 //---------------------------------------------------------------------------------------------------------------------
1333 {
1334  SCASSERT(property != nullptr)
1335 
1336  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1337  const QString id = propertyToId[property];
1338 
1339  VToolTrueDarts *tool = qgraphicsitem_cast<VToolTrueDarts *>(currentItem);
1340  SCASSERT(tool != nullptr)
1341  switch (propertiesList().indexOf(id))
1342  {
1343  case 32: // AttrName1
1344  setPointName1<VToolTrueDarts>(value.toString());
1345  break;
1346  case 33: // AttrName2
1347  setPointName2<VToolTrueDarts>(value.toString());
1348  break;
1349  case 6: // AttrFirstPoint
1350  tool->SetBaseLineP1Id(value.toInt());
1351  break;
1352  case 7: // AttrSecondPoint
1353  tool->SetBaseLineP2Id(value.toInt());
1354  break;
1355  case 43: // AttrDartP1
1356  tool->SetDartP1Id(value.toInt());
1357  break;
1358  case 44: // AttrDartP2
1359  tool->SetDartP2Id(value.toInt());
1360  break;
1361  case 45: // AttrDartP3
1362  tool->SetDartP3Id(value.toInt());
1363  break;
1364  default:
1365  qWarning()<<"Unknown property type. id = "<<id;
1366  break;
1367  }
1368 }
1369 
1370 //---------------------------------------------------------------------------------------------------------------------
1372 {
1373  SCASSERT(property != nullptr)
1374 
1375  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1376  const QString id = propertyToId[property];
1377 
1378  VToolCutArc *tool = qgraphicsitem_cast<VToolCutArc *>(currentItem);
1379  SCASSERT(tool != nullptr)
1380  switch (propertiesList().indexOf(id))
1381  {
1382  case 0: // AttrName
1383  setPointName<VToolCutArc>(value.toString());
1384  break;
1385  case 4: // AttrLength
1386  tool->SetFormula(value.value<VFormula>());
1387  break;
1388  case 13: // AttrArc
1389  tool->setCurveCutId(value.toInt());
1390  break;
1391  default:
1392  qWarning()<<"Unknown property type. id = "<<id;
1393  break;
1394  }
1395 }
1396 
1397 //---------------------------------------------------------------------------------------------------------------------
1399 {
1400  SCASSERT(property != nullptr)
1401 
1402  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1403  const QString id = propertyToId[property];
1404 
1405  VToolCutSpline *tool = qgraphicsitem_cast<VToolCutSpline *>(currentItem);
1406  SCASSERT(tool != nullptr)
1407  switch (propertiesList().indexOf(id))
1408  {
1409  case 0: // AttrName
1410  setPointName<VToolCutSpline>(value.toString());
1411  break;
1412  case 4: // AttrLength
1413  tool->SetFormula(value.value<VFormula>());
1414  break;
1415  case 46: // AttrCurve
1416  tool->setCurveCutId(value.toInt());
1417  break;
1418  default:
1419  qWarning()<<"Unknown property type. id = "<<id;
1420  break;
1421  }
1422 }
1423 
1424 //---------------------------------------------------------------------------------------------------------------------
1426 {
1427  SCASSERT(property != nullptr)
1428 
1429  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1430  const QString id = propertyToId[property];
1431 
1432  VToolCutSplinePath *tool = qgraphicsitem_cast<VToolCutSplinePath *>(currentItem);
1433  SCASSERT(tool != nullptr)
1434  switch (propertiesList().indexOf(id))
1435  {
1436  case 0: // AttrName
1437  setPointName<VToolCutSplinePath>(value.toString());
1438  break;
1439  case 4: // AttrLength
1440  tool->SetFormula(value.value<VFormula>());
1441  break;
1442  case 46: // AttrCurve
1443  tool->setCurveCutId(value.toInt());
1444  break;
1445  default:
1446  qWarning()<<"Unknown property type. id = "<<id;
1447  break;
1448  }
1449 }
1450 
1451 //---------------------------------------------------------------------------------------------------------------------
1453 {
1454  SCASSERT(property != nullptr)
1455 
1456  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1457  const QString id = propertyToId[property];
1458 
1459  VToolHeight *tool = qgraphicsitem_cast<VToolHeight *>(currentItem);
1460  SCASSERT(tool != nullptr)
1461  switch (propertiesList().indexOf(id))
1462  {
1463  case 0: // AttrName
1464  setPointName<VToolHeight>(value.toString());
1465  break;
1466  case 3: // AttrLineType
1467  tool->setLineType(value.toString());
1468  break;
1469  case 26: // AttrLineColor
1470  tool->setLineColor(value.toString());
1471  break;
1472  case 60: // AttrLineWeight
1473  tool->setLineWeight(value.toString());
1474  break;
1475  case 2: // AttrBasePoint
1476  tool->SetBasePointId(value.toInt());
1477  break;
1478  case 16: // AttrP1Line
1479  tool->SetP1LineId(value.toInt());
1480  break;
1481  case 17: // AttrP2Line
1482  tool->SetP2LineId(value.toInt());
1483  break;
1484  default:
1485  qWarning()<<"Unknown property type. id = "<<id;
1486  break;
1487  }
1488 }
1489 
1490 //---------------------------------------------------------------------------------------------------------------------
1492 {
1493  SCASSERT(property != nullptr)
1494 
1495  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1496  const QString id = propertyToId[property];
1497 
1498  VToolLine *tool = qgraphicsitem_cast<VToolLine *>(currentItem);
1499  SCASSERT(tool != nullptr)
1500  switch (propertiesList().indexOf(id))
1501  {
1502  case 3: // AttrLineType
1503  tool->setLineType(value.toString());
1504  break;
1505  case 26: // AttrLineColor
1506  tool->setLineColor(value.toString());
1507  break;
1508  case 60: // AttrLineWeight
1509  tool->setLineWeight(value.toString());
1510  break;
1511  case 6: // AttrFirstPoint
1512  tool->SetFirstPoint(value.toInt());
1513  break;
1514  case 7: // AttrSecondPoint
1515  tool->SetSecondPoint(value.toInt());
1516  break;
1517  default:
1518  qWarning()<<"Unknown property type. id = "<<id;
1519  break;
1520  }
1521 }
1522 
1523 //---------------------------------------------------------------------------------------------------------------------
1525 {
1526  SCASSERT(property != nullptr)
1527 
1528  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1529  const QString id = propertyToId[property];
1530 
1531  VToolLineIntersect *tool = qgraphicsitem_cast<VToolLineIntersect *>(currentItem);
1532  SCASSERT(tool != nullptr)
1533  switch (propertiesList().indexOf(id))
1534  {
1535  case 0: // AttrName
1536  setPointName<VToolLineIntersect>(value.toString());
1537  break;
1538  case 18: // AttrP1Line1
1539  tool->SetP1Line1(value.toInt());
1540  break;
1541  case 19: // AttrP2Line1
1542  tool->SetP2Line1(value.toInt());
1543  break;
1544  case 20: // AttrP1Line2
1545  tool->SetP1Line2(value.toInt());
1546  break;
1547  case 21: // AttrP2Line2
1548  tool->SetP2Line2(value.toInt());
1549  break;
1550  default:
1551  qWarning()<<"Unknown property type. id = "<<id;
1552  break;
1553  }
1554 }
1555 
1556 //---------------------------------------------------------------------------------------------------------------------
1558 {
1559  SCASSERT(property != nullptr)
1560 
1561  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1562  const QString id = propertyToId[property];
1563 
1564  VToolNormal *tool = qgraphicsitem_cast<VToolNormal *>(currentItem);
1565  SCASSERT(tool != nullptr)
1566  switch (propertiesList().indexOf(id))
1567  {
1568  case 4: // AttrLength
1569  tool->SetFormulaLength(value.value<VFormula>());
1570  break;
1571  case 0: // AttrName
1572  setPointName<VToolNormal>(value.toString());
1573  break;
1574  case 5: // AttrAngle
1575  tool->SetAngle(value.toDouble());
1576  break;
1577  case 3: // AttrLineType
1578  tool->setLineType(value.toString());
1579  break;
1580  case 26: // AttrLineColor
1581  tool->setLineColor(value.toString());
1582  break;
1583  case 60: // AttrLineWeight
1584  tool->setLineWeight(value.toString());
1585  break;
1586  case 2: // AttrBasePoint
1587  tool->SetBasePointId(value.toInt());
1588  break;
1589  case 7: // AttrSecondPoint
1590  tool->SetSecondPointId(value.toInt());
1591  break;
1592  default:
1593  qWarning()<<"Unknown property type. id = "<<id;
1594  break;
1595  }
1596 }
1597 
1598 //---------------------------------------------------------------------------------------------------------------------
1600 {
1601  SCASSERT(property != nullptr)
1602 
1603  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1604  const QString id = propertyToId[property];
1605 
1606  VToolPointOfContact *tool = qgraphicsitem_cast<VToolPointOfContact *>(currentItem);
1607  SCASSERT(tool != nullptr)
1608  switch (propertiesList().indexOf(id))
1609  {
1610  case 8: // AttrRadius
1611  tool->setArcRadius(value.value<VFormula>());
1612  break;
1613  case 0: // AttrName
1614  setPointName<VToolPointOfContact>(value.toString());
1615  break;
1616  case 11: // AttrCenter
1617  tool->setCenter(value.toInt());
1618  break;
1619  case 6: // AttrFirstPoint
1620  tool->SetFirstPointId(value.toInt());
1621  break;
1622  case 7: // AttrSecondPoint
1623  tool->SetSecondPointId(value.toInt());
1624  break;
1625  default:
1626  qWarning()<<"Unknown property type. id = "<<id;
1627  break;
1628  }
1629 }
1630 
1631 //---------------------------------------------------------------------------------------------------------------------
1633 {
1634  SCASSERT(property != nullptr)
1635 
1636  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1637  const QString id = propertyToId[property];
1638 
1639  PointIntersectXYTool *tool = qgraphicsitem_cast<PointIntersectXYTool *>(currentItem);
1640  SCASSERT(tool != nullptr)
1641  switch (propertiesList().indexOf(id))
1642  {
1643  case 0: // AttrName
1644  setPointName<PointIntersectXYTool>(value.toString());
1645  break;
1646  case 6: // AttrFirstPoint
1647  tool->setFirstPointId(value.toInt());
1648  break;
1649  case 7: // AttrSecondPoint
1650  tool->setSecondPointId(value.toInt());
1651  break;
1652  case 3: // AttrLineType
1653  tool->setLineType(value.toString());
1654  break;
1655  case 26: // AttrLineColor
1656  tool->setLineColor(value.toString());
1657  break;
1658  case 60: // AttrLineWeight
1659  tool->setLineWeight(value.toString());
1660  break;
1661  default:
1662  qWarning()<<"Unknown property type. id = "<<id;
1663  break;
1664  }
1665 }
1666 
1667 //---------------------------------------------------------------------------------------------------------------------
1669 {
1670  SCASSERT(property != nullptr)
1671 
1672  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1673  const QString id = propertyToId[property];
1674 
1675  VToolPointOfIntersectionArcs *tool = qgraphicsitem_cast<VToolPointOfIntersectionArcs *>(currentItem);
1676  SCASSERT(tool != nullptr)
1677  switch (propertiesList().indexOf(id))
1678  {
1679  case 0: // AttrName
1680  setPointName<VToolPointOfIntersectionArcs>(value.toString());
1681  break;
1682  case 28: // AttrCrossPoint
1683  {
1684  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1685  setCirclesCrossPoint<VToolPointOfIntersectionArcs>(value);
1686  break;
1687  }
1688  case 47: // AttrFirstArc
1689  tool->SetFirstArcId(value.toInt());
1690  break;
1691  case 48: // AttrSecondArc
1692  tool->SetSecondArcId(value.toInt());
1693  break;
1694  default:
1695  qWarning()<<"Unknown property type. id = "<<id;
1696  break;
1697  }
1698 }
1699 
1700 //---------------------------------------------------------------------------------------------------------------------
1702 {
1703  SCASSERT(property != nullptr)
1704 
1705  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1706  const QString id = propertyToId[property];
1707 
1708  IntersectCirclesTool *tool = qgraphicsitem_cast<IntersectCirclesTool *>(currentItem);
1709  SCASSERT(tool != nullptr)
1710  switch (propertiesList().indexOf(id))
1711  {
1712  case 0: // AttrName
1713  setPointName<IntersectCirclesTool>(value.toString());
1714  break;
1715  case 28: // AttrCrossPoint
1716  {
1717  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1718  setCirclesCrossPoint<IntersectCirclesTool>(value);
1719  break;
1720  }
1721  case 29: // AttrC1Radius
1722  tool->SetFirstCircleRadius(value.value<VFormula>());
1723  break;
1724  case 30: // AttrC2Radius
1725  tool->SetSecondCircleRadius(value.value<VFormula>());
1726  break;
1727  case 49: // AttrC1Center
1728  tool->SetFirstCircleCenterId(value.toInt());
1729  break;
1730  case 50: // AttrC2Center
1731  tool->SetSecondCircleCenterId(value.toInt());
1732  break;
1733  default:
1734  qWarning()<<"Unknown property type. id = "<<id;
1735  break;
1736  }
1737 }
1738 
1739 //---------------------------------------------------------------------------------------------------------------------
1741 {
1742  SCASSERT(property != nullptr)
1743 
1744  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1745  const QString id = propertyToId[property];
1746 
1747  VToolPointOfIntersectionCurves *tool = qgraphicsitem_cast<VToolPointOfIntersectionCurves *>(currentItem);
1748  SCASSERT(tool != nullptr)
1749  switch (propertiesList().indexOf(id))
1750  {
1751  case 0: // AttrName
1752  setPointName<VToolPointOfIntersectionCurves>(value.toString());
1753  break;
1754  case 34: // AttrVCrossPoint
1755  {
1756  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1757  setCurveVCrossPoint<VToolPointOfIntersectionCurves>(value);
1758  break;
1759  }
1760  case 35: // AttrHCrossPoint
1761  {
1762  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1763  setCurveHCrossPoint<VToolPointOfIntersectionCurves>(value);
1764  break;
1765  }
1766  case 51: // AttrCurve1
1767  tool->SetFirstCurveId(value.toInt());
1768  break;
1769  case 52: // AttrCurve2
1770  tool->SetSecondCurveId(value.toInt());
1771  break;
1772  default:
1773  qWarning()<<"Unknown property type. id = "<<id;
1774  break;
1775  }
1776 }
1777 
1778 //---------------------------------------------------------------------------------------------------------------------
1780 {
1781  SCASSERT(property != nullptr)
1782 
1783  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1784  const QString id = propertyToId[property];
1785 
1786  IntersectCircleTangentTool *tool = qgraphicsitem_cast<IntersectCircleTangentTool *>(currentItem);
1787  SCASSERT(tool != nullptr)
1788  switch (propertiesList().indexOf(id))
1789  {
1790  case 0: // AttrName
1791  setPointName<IntersectCircleTangentTool>(value.toString());
1792  break;
1793  case 31: // AttrCRadius
1794  tool->SetCircleRadius(value.value<VFormula>());
1795  break;
1796  case 28: // AttrCrossPoint
1797  {
1798  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1799  setCirclesCrossPoint<IntersectCircleTangentTool>(value);
1800  break;
1801  }
1802  case 53: // AttrCCenter
1803  tool->SetCircleCenterId(value.toInt());
1804  break;
1805  case 54: // AttrTangent
1806  tool->SetTangentPointId(value.toInt());
1807  break;
1808  default:
1809  qWarning()<<"Unknown property type. id = "<<id;
1810  break;
1811  }
1812 }
1813 
1814 //---------------------------------------------------------------------------------------------------------------------
1816 {
1817  SCASSERT(property != nullptr)
1818 
1819  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1820  const QString id = propertyToId[property];
1821 
1822  VToolPointFromArcAndTangent *tool = qgraphicsitem_cast<VToolPointFromArcAndTangent *>(currentItem);
1823  SCASSERT(tool != nullptr)
1824  switch (propertiesList().indexOf(id))
1825  {
1826  case 0: // AttrName
1827  setPointName<VToolPointFromArcAndTangent>(value.toString());
1828  break;
1829  case 28: // AttrCrossPoint
1830  {
1831  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
1832  setCirclesCrossPoint<VToolPointFromArcAndTangent>(value);
1833  break;
1834  }
1835  case 54: // AttrTangent
1836  tool->SetTangentPointId(value.toInt());
1837  break;
1838  case 13: // AttrArc
1839  tool->SetArcId(value.toInt());
1840  break;;
1841  default:
1842  qWarning()<<"Unknown property type. id = "<<id;
1843  break;
1844  }
1845 }
1846 
1847 //---------------------------------------------------------------------------------------------------------------------
1849 {
1850  SCASSERT(property != nullptr)
1851 
1852  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1853  const QString id = propertyToId[property];
1854 
1855  VToolShoulderPoint *tool = qgraphicsitem_cast<VToolShoulderPoint *>(currentItem);
1856  SCASSERT(tool != nullptr)
1857  switch (propertiesList().indexOf(id))
1858  {
1859  case 4: // AttrLength
1860  tool->SetFormulaLength(value.value<VFormula>());
1861  break;
1862  case 0: // AttrName
1863  setPointName<VToolShoulderPoint>(value.toString());
1864  break;
1865  case 3: // AttrLineType
1866  tool->setLineType(value.toString());
1867  break;
1868  case 26: // AttrLineColor
1869  tool->setLineColor(value.toString());
1870  break;
1871  case 60: // AttrLineWeight
1872  tool->setLineWeight(value.toString());
1873  break;
1874  case 6: // AttrFirstPoint
1875  tool->SetP2Line(value.toInt());
1876  break;
1877  case 2: // AttrBasePoint
1878  tool->SetBasePointId(value.toInt());
1879  break;
1880  case 12: // AttrThirdPoint
1881  tool->setPShoulder(value.toInt());
1882  break;
1883  default:
1884  qWarning()<<"Unknown property type. id = "<<id;
1885  break;
1886  }
1887 }
1888 
1889 //---------------------------------------------------------------------------------------------------------------------
1891 {
1892  SCASSERT(property != nullptr)
1893 
1894  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1895  const QString id = propertyToId[property];
1896 
1897  VToolSpline *tool = qgraphicsitem_cast<VToolSpline *>(currentItem);
1898  SCASSERT(tool != nullptr)
1899 
1900  auto spl = tool->getSpline();
1901  VPointF point;
1902 
1903  const VFormula f = value.value<VFormula>();
1904 
1905  switch (propertiesList().indexOf(id))
1906  {
1907  case 0: // AttrName
1908  Q_UNREACHABLE();//The attribute is read only
1909  break;
1910  case 6: // AttrFirstPoint
1911  point = *m_data->GeometricObject<VPointF>(value.toInt());
1912  spl.SetP1(point);
1913  tool->setSpline(spl);
1914  break;
1915  case 7: // AttrSecondPoint
1916  point = *m_data->GeometricObject<VPointF>(value.toInt());
1917  spl.SetP4(point);
1918  tool->setSpline(spl);
1919  break;
1920  case 9: // AttrAngle1
1921  if (not f.error())
1922  {
1923  spl.SetStartAngle(f.getDoubleValue(), f.GetFormula(FormulaType::FromUser));
1924  tool->setSpline(spl);
1925  }
1926  break;
1927  case 10: // AttrAngle2
1928  if (not f.error())
1929  {
1930  spl.SetEndAngle(f.getDoubleValue(), f.GetFormula(FormulaType::FromUser));
1931  tool->setSpline(spl);
1932  }
1933  break;
1934  case 36: // AttrLength1
1935  if (not f.error() && f.getDoubleValue() >= 0)
1936  {
1937  spl.SetC1Length(qApp->toPixel(f.getDoubleValue()), f.GetFormula(FormulaType::FromUser));
1938  tool->setSpline(spl);
1939  }
1940  break;
1941  case 37: // AttrLength2
1942  if (not f.error() && f.getDoubleValue() >= 0)
1943  {
1944  spl.SetC2Length(qApp->toPixel(f.getDoubleValue()), f.GetFormula(FormulaType::FromUser));
1945  tool->setSpline(spl);
1946  }
1947  break;
1948  case 27: // AttrColor
1949  tool->setLineColor(value.toString());
1950  break;
1951  case 59: // AttrPenStyle
1952  tool->SetPenStyle(value.toString());
1953  break;
1954  case 60: // AttrLineWeight
1955  tool->setLineWeight(value.toString());
1956  break;
1957  default:
1958  qWarning()<<"Unknown property type. id = "<<id;
1959  break;
1960  }
1961 }
1962 
1963 //---------------------------------------------------------------------------------------------------------------------
1965 {
1966  SCASSERT(property != nullptr)
1967 
1968  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
1969  const QString id = propertyToId[property];
1970 
1971  VToolCubicBezier *tool = qgraphicsitem_cast<VToolCubicBezier *>(currentItem);
1972  SCASSERT(tool != nullptr)
1973 
1974  auto spline = tool->getSpline();
1975  VPointF point;
1976 
1977  switch (propertiesList().indexOf(id))
1978  {
1979  case 0: // AttrName
1980  Q_UNREACHABLE();//The attribute is read only
1981  break;
1982  case 27: // AttrColor
1983  tool->setLineColor(value.toString());
1984  break;
1985  case 59: // AttrPenStyle
1986  tool->SetPenStyle(value.toString());
1987  break;
1988  case 60: // AttrLineWeight
1989  tool->setLineWeight(value.toString());
1990  break;
1991  case 55: // AttrPoint1
1992  point = *m_data->GeometricObject<VPointF>(value.toInt());
1993  spline.SetP1(point);
1994  tool->setSpline(spline);
1995  break;
1996  case 56: // AttrPoint2
1997  point = *m_data->GeometricObject<VPointF>(value.toInt());
1998  spline.SetP2(point);
1999  tool->setSpline(spline);
2000  break;
2001  case 57: // AttrPoint3
2002  point = *m_data->GeometricObject<VPointF>(value.toInt());
2003  spline.SetP3(point);
2004  tool->setSpline(spline);
2005  break;
2006  case 58: // AttrPoint4
2007  point = *m_data->GeometricObject<VPointF>(value.toInt());
2008  spline.SetP4(point);
2009  tool->setSpline(spline);
2010  break;
2011  default:
2012  qWarning()<<"Unknown property type. id = "<<id;
2013  break;
2014  }
2015 }
2016 
2017 //---------------------------------------------------------------------------------------------------------------------
2019 {
2020  SCASSERT(property != nullptr)
2021 
2022  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2023  const QString id = propertyToId[property];
2024 
2025  VToolSplinePath *tool = qgraphicsitem_cast<VToolSplinePath *>(currentItem);
2026  SCASSERT(tool != nullptr)
2027  switch (propertiesList().indexOf(id))
2028  {
2029  case 0: // AttrName
2030  Q_UNREACHABLE();//The attribute is read only
2031  break;
2032  case 27: // AttrColor
2033  tool->setLineColor(value.toString());
2034  break;
2035  case 59: // AttrPenStyle
2036  tool->SetPenStyle(value.toString());
2037  break;
2038  case 60: // AttrLineWeight
2039  tool->setLineWeight(value.toString());
2040  break;
2041  default:
2042  qWarning()<<"Unknown property type. id = "<<id;
2043  break;
2044  }
2045 }
2046 
2047 //---------------------------------------------------------------------------------------------------------------------
2049 {
2050  SCASSERT(property != nullptr)
2051 
2052  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2053  const QString id = propertyToId[property];
2054 
2055  VToolCubicBezierPath *tool = qgraphicsitem_cast<VToolCubicBezierPath *>(currentItem);
2056  SCASSERT(tool != nullptr)
2057  switch (propertiesList().indexOf(id))
2058  {
2059  case 0: // AttrName
2060  Q_UNREACHABLE();//The attribute is read only
2061  break;
2062  case 27: // AttrColor
2063  tool->setLineColor(value.toString());
2064  break;
2065  case 59: // AttrPenStyle
2066  tool->SetPenStyle(value.toString());
2067  break;
2068  case 60: // AttrLineWeight
2069  tool->setLineWeight(value.toString());
2070  break;
2071  default:
2072  qWarning()<<"Unknown property type. id = "<<id;
2073  break;
2074  }
2075 }
2076 
2077 //---------------------------------------------------------------------------------------------------------------------
2079 {
2080  SCASSERT(property != nullptr)
2081 
2082  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2083  const QString id = propertyToId[property];
2084 
2085  VToolTriangle *tool = qgraphicsitem_cast<VToolTriangle *>(currentItem);
2086  SCASSERT(tool != nullptr)
2087  switch (propertiesList().indexOf(id))
2088  {
2089  case 0: // AttrName
2090  setPointName<VToolTriangle>(value.toString());
2091  break;
2092  case 23: // AttrAxisP1
2093  tool->SetAxisP1Id(value.toInt());
2094  break;
2095  case 24: // AttrAxisP2
2096  tool->SetAxisP2Id(value.toInt());
2097  break;
2098  case 6: // AttrFirstPoint
2099  tool->SetFirstPointId(value.toInt());
2100  break;
2101  case 7: // AttrSecondPoint
2102  tool->SetSecondPointId(value.toInt());
2103  break;
2104  default:
2105  qWarning()<<"Unknown property type. id = "<<id;
2106  break;
2107  }
2108 }
2109 
2110 //---------------------------------------------------------------------------------------------------------------------
2112 {
2113  SCASSERT(property != nullptr)
2114 
2115  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2116  const QString id = propertyToId[property];
2117 
2118  VToolLineIntersectAxis *tool = qgraphicsitem_cast<VToolLineIntersectAxis *>(currentItem);
2119  SCASSERT(tool != nullptr)
2120  switch (propertiesList().indexOf(id))
2121  {
2122  case 0: // AttrName
2123  setPointName<VToolLineIntersectAxis>(value.toString());
2124  break;
2125  case 3: // AttrLineType
2126  tool->setLineType(value.toString());
2127  break;
2128  case 26: // AttrLineColor
2129  tool->setLineColor(value.toString());
2130  break;
2131  case 60: // AttrLineWeight
2132  tool->setLineWeight(value.toString());
2133  break;
2134  case 5: // AttrAngle
2135  tool->SetFormulaAngle(value.value<VFormula>());
2136  break;
2137  case 2: // AttrBasePoint
2138  tool->SetBasePointId(value.toInt());
2139  break;
2140  case 6: // AttrFirstPoint
2141  tool->SetFirstPointId(value.toInt());
2142  break;
2143  case 7: // AttrSecondPoint
2144  tool->SetSecondPointId(value.toInt());
2145  break;
2146  default:
2147  qWarning()<<"Unknown property type. id = "<<id;
2148  break;
2149  }
2150 }
2151 
2152 //---------------------------------------------------------------------------------------------------------------------
2154 {
2155  SCASSERT(property != nullptr)
2156 
2157  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2158  const QString id = propertyToId[property];
2159 
2160  VToolCurveIntersectAxis *tool = qgraphicsitem_cast<VToolCurveIntersectAxis *>(currentItem);
2161  SCASSERT(tool != nullptr)
2162  switch (propertiesList().indexOf(id))
2163  {
2164  case 0: // AttrName
2165  setPointName<VToolCurveIntersectAxis>(value.toString());
2166  break;
2167  case 3: // AttrLineType
2168  tool->setLineType(value.toString());
2169  break;
2170  case 26: // AttrLineColor
2171  tool->setLineColor(value.toString());
2172  break;
2173  case 60: // AttrLineWeight
2174  tool->setLineWeight(value.toString());
2175  break;
2176  case 5: // AttrAngle
2177  tool->SetFormulaAngle(value.value<VFormula>());
2178  break;
2179  case 2: // AttrBasePoint
2180  tool->SetBasePointId(value.toInt());
2181  break;
2182  case 46: // AttrCurve
2183  tool->setCurveId(value.toInt());
2184  break;
2185  default:
2186  qWarning()<<"Unknown property type. id = "<<id;
2187  break;
2188  }
2189 }
2190 
2191 //---------------------------------------------------------------------------------------------------------------------
2193 {
2194  SCASSERT(property != nullptr)
2195 
2196  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2197  const QString id = propertyToId[property];
2198 
2199  VToolRotation *tool = qgraphicsitem_cast<VToolRotation *>(currentItem);
2200  SCASSERT(tool != nullptr)
2201  switch (propertiesList().indexOf(id))
2202  {
2203  case 38: // AttrSuffix
2204  setOperationSuffix<VToolRotation>(value.toString());
2205  break;
2206  case 5: // AttrAngle
2207  tool->SetFormulaAngle(value.value<VFormula>());
2208  break;
2209  case 11: // AttrCenter
2210  tool->setOriginPointId(value.toInt());
2211  break;
2212  default:
2213  qWarning()<<"Unknown property type. id = "<<id;
2214  break;
2215  }
2216 }
2217 
2218 //---------------------------------------------------------------------------------------------------------------------
2220 {
2221  SCASSERT(property != nullptr)
2222 
2223  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2224  const QString id = propertyToId[property];
2225 
2226  VToolMove *tool = qgraphicsitem_cast<VToolMove *>(currentItem);
2227  SCASSERT(tool != nullptr)
2228  switch (propertiesList().indexOf(id))
2229  {
2230  case 42: // AttrRotationAngle
2231  tool->setFormulaRotation(value.value<VFormula>());
2232  break;
2233  case 38: // AttrSuffix
2234  setOperationSuffix<VToolMove>(value.toString());
2235  break;
2236  case 5: // AttrAngle
2237  tool->SetFormulaAngle(value.value<VFormula>());
2238  break;
2239  case 4: // AttrLength
2240  tool->SetFormulaLength(value.value<VFormula>());
2241  break;
2242  case 11: // AttrCenter
2243  tool->setOriginPointId(value.toInt());
2244  break;
2245  default:
2246  qWarning()<<"Unknown property type. id = "<<id;
2247  break;
2248  }
2249 }
2250 
2251 //---------------------------------------------------------------------------------------------------------------------
2253 {
2254  SCASSERT(property != nullptr)
2255 
2256  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2257  const QString id = propertyToId[property];
2258 
2259  VToolMirrorByLine *tool = qgraphicsitem_cast<VToolMirrorByLine *>(currentItem);
2260  SCASSERT(tool != nullptr)
2261  switch (propertiesList().indexOf(id))
2262  {
2263  case 38: // AttrSuffix
2264  setOperationSuffix<VToolMirrorByLine>(value.toString());
2265  break;
2266  case 16: // AttrP1Line
2267  tool->setFirstLinePointId(value.toInt());
2268  break;
2269  case 17: // AttrP2Line
2270  tool->setSecondLinePointId(value.toInt());
2271  break;
2272  default:
2273  qWarning()<<"Unknown property type. id = "<<id;
2274  break;
2275  }
2276 }
2277 
2278 //---------------------------------------------------------------------------------------------------------------------
2280 {
2281  SCASSERT(property != nullptr)
2282 
2283  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2284  const QString id = propertyToId[property];
2285 
2286  VToolMirrorByAxis *tool = qgraphicsitem_cast<VToolMirrorByAxis *>(currentItem);
2287  SCASSERT(tool != nullptr)
2288  switch (propertiesList().indexOf(id))
2289  {
2290  case 39: // AttrAxisType
2291  {
2292  const QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::EditRole);
2293  setAxisType<VToolMirrorByAxis>(value);
2294  break;
2295  }
2296  case 38: // AttrSuffix
2297  setOperationSuffix<VToolMirrorByAxis>(value.toString());
2298  break;
2299  case 11: // AttrCenter
2300  tool->setOriginPointId(value.toInt());
2301  break;
2302  default:
2303  qWarning()<<"Unknown property type. id = "<<id;
2304  break;
2305  }
2306 }
2307 
2308 //---------------------------------------------------------------------------------------------------------------------
2310 {
2311  SCASSERT(property != nullptr)
2312 
2313  QVariant value = property->data(VPE::VProperty::DPC_Data, Qt::DisplayRole);
2314  const QString id = propertyToId[property];
2315 
2316  VToolEllipticalArc *tool = qgraphicsitem_cast<VToolEllipticalArc *>(currentItem);
2317  SCASSERT(tool != nullptr)
2318  switch (propertiesList().indexOf(id))
2319  {
2320  case 0: // AttrName
2321  Q_UNREACHABLE();//The attribute is read only
2322  break;
2323  case 40: // AttrRadius1
2324  tool->SetFormulaRadius1(value.value<VFormula>());
2325  break;
2326  case 41: // AttrRadius2
2327  tool->SetFormulaRadius2(value.value<VFormula>());
2328  break;
2329  case 9: // AttrAngle1
2330  tool->SetFormulaF1(value.value<VFormula>());
2331  break;
2332  case 10: // AttrAngle2
2333  tool->SetFormulaF2(value.value<VFormula>());
2334  break;
2335  case 42: // AttrRotationAngle
2336  tool->SetFormulaRotationAngle(value.value<VFormula>());
2337  break;
2338  case 27: // AttrColor
2339  tool->setLineColor(value.toString());
2340  break;
2341  case 59: // AttrPenStyle
2342  tool->SetPenStyle(value.toString());
2343  break;
2344  case 60: // AttrLineWeight
2345  tool->setLineWeight(value.toString());
2346  break;
2347  case 11: // AttrCenter
2348  tool->setCenter(value.toInt());
2349  break;
2350  default:
2351  qWarning()<<"Unknown property type. id = "<<id;
2352  break;
2353  }
2354 }
2355 
2356 //---------------------------------------------------------------------------------------------------------------------
2358 {
2359  VToolBasePoint *tool = qgraphicsitem_cast<VToolBasePoint *>(item);
2360  tool->ShowVisualization(true);
2361  formView->setTitle(tr("Base point"));
2362 
2363  addPropertyLabel(tr("Selection"), AttrName);
2364  addPropertyObjectName(tool, tr("Point name:"));
2365 
2366  VPE::VPointFProperty* itemCoordinates = new VPE::VPointFProperty(tr("Coordinates"));
2367  itemCoordinates->setValue(tool->GetBasePointPos());
2368  addProperty(itemCoordinates, QLatin1String("Coordinates"));
2369 }
2370 
2371 //---------------------------------------------------------------------------------------------------------------------
2373 {
2374  VToolEndLine *tool = qgraphicsitem_cast<VToolEndLine *>(item);
2375  tool->ShowVisualization(true);
2376  formView->setTitle(tr("Point - Length and Angle"));
2377 
2378  addPropertyLabel(tr("Selection"), AttrName);
2379  addPropertyObjectName(tool, tr("Point name:"));
2380  addObjectProperty(tool, tool->BasePointName(), tr("Base point:"), AttrBasePoint, GOType::Point);
2381 
2382  addPropertyLabel(tr("Geometry"), AttrName);
2383  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2384  addPropertyFormula(tr("Angle:"), tool->GetFormulaAngle(), AttrAngle);
2385 
2386  addPropertyLabel(tr("Attributes"), AttrName);
2387  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2388  addPropertyLineType(tool, tr("Linetype:"));
2389  addPropertyLineWeight(tool, tr("Lineweight:"));
2390 }
2391 
2392 //---------------------------------------------------------------------------------------------------------------------
2394 {
2395  VToolAlongLine *tool = qgraphicsitem_cast<VToolAlongLine *>(item);
2396  tool->ShowVisualization(true);
2397  formView->setTitle(tr("Point - On Line"));
2398 
2399  addPropertyLabel(tr("Selection"), AttrName);
2400  addPropertyObjectName(tool, tr("Point name:"));
2401  addObjectProperty(tool, tool->BasePointName(), tr("First point:"), AttrBasePoint, GOType::Point);
2402  addObjectProperty(tool, tool->SecondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2403 
2404  addPropertyLabel(tr("Geometry"), AttrName);
2405  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2406 
2407  addPropertyLabel(tr("Attributes"), AttrName);
2408  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2409  addPropertyLineType(tool, tr("Linetype:"));
2410  addPropertyLineWeight(tool, tr("Lineweight:"));
2411 }
2412 
2413 //---------------------------------------------------------------------------------------------------------------------
2415 {
2416  VToolArc *tool = qgraphicsitem_cast<VToolArc *>(item);
2417  tool->ShowVisualization(true);
2418  formView->setTitle(tr("Arc - Radius and Angles"));
2419 
2420  addPropertyLabel(tr("Selection"), AttrName);
2421  addPropertyCurveName(tool, tr("Name:"), tr("Arc_"), tool->CenterPointName(), QString().setNum(tool->getId()), true);
2422  addObjectProperty(tool, tool->CenterPointName(), tr("Center point:"), AttrCenter, GOType::Point);
2423 
2424  addPropertyLabel(tr("Geometry"), AttrName);
2425  addPropertyFormula(tr("Radius:"), tool->GetFormulaRadius(), AttrRadius);
2426  addPropertyFormula(tr("First angle:"), tool->GetFormulaF1(), AttrAngle1);
2427  addPropertyFormula(tr("Second angle:"), tool->GetFormulaF2(), AttrAngle2);
2428 
2429  addPropertyLabel(tr("Attributes"), AttrName);
2430  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2431  addPropertyCurveLineType(tool, tr("Linetype:"));
2432  addPropertyLineWeight(tool, tr("Lineweight:"));
2433 }
2434 
2435 //---------------------------------------------------------------------------------------------------------------------
2437 {
2438  VToolArcWithLength *tool = qgraphicsitem_cast<VToolArcWithLength *>(item);
2439  tool->ShowVisualization(true);
2440  formView->setTitle(tr("Arc - Radius and Length"));
2441 
2442  addPropertyLabel(tr("Selection"), AttrName);
2443  addPropertyCurveName(tool, tr("Name:"), tr("Arc_"), tool->CenterPointName(), QString().setNum(tool->getId()), true);
2444  addObjectProperty(tool, tool->CenterPointName(), tr("Center point:"), AttrCenter, GOType::Point);
2445 
2446  addPropertyLabel(tr("Geometry"), AttrName);
2447  addPropertyFormula(tr("Radius:"), tool->GetFormulaRadius(), AttrRadius);
2448  addPropertyFormula(tr("First angle:"), tool->GetFormulaF1(), AttrAngle1);
2449  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2450 
2451  addPropertyLabel(tr("Attributes"), AttrName);
2452  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2453  addPropertyCurveLineType(tool, tr("Linetype:"));
2454  addPropertyLineWeight(tool, tr("Lineweight:"));
2455 }
2456 
2457 //---------------------------------------------------------------------------------------------------------------------
2459 {
2460  VToolBisector *tool = qgraphicsitem_cast<VToolBisector *>(item);
2461  tool->ShowVisualization(true);
2462  formView->setTitle(tr("Point - On Bisector"));
2463 
2464  addPropertyLabel(tr("Selection"), AttrName);
2465  addPropertyObjectName(tool, tr("Point name:"));
2466  addObjectProperty(tool, tool->FirstPointName(), tr("First point:"), AttrFirstPoint, GOType::Point);
2467  addObjectProperty(tool, tool->BasePointName(), tr("Second point:"), AttrBasePoint, GOType::Point);
2468  addObjectProperty(tool, tool->ThirdPointName(), tr("Third point:"), AttrThirdPoint, GOType::Point);
2469 
2470  addPropertyLabel(tr("Geometry"), AttrName);
2471  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2472 
2473  addPropertyLabel(tr("Attributes"), AttrName);
2474  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2475  addPropertyLineType(tool, tr("Linetype:"));
2476  addPropertyLineWeight(tool, tr("Lineweight:"));
2477 }
2478 
2479 //---------------------------------------------------------------------------------------------------------------------
2481 {
2482  VToolTrueDarts *tool = qgraphicsitem_cast<VToolTrueDarts *>(item);
2483  tool->ShowVisualization(true);
2484  formView->setTitle(tr("True darts"));
2485 
2486  addPropertyLabel(tr("Selection"), AttrName);
2487  addPropertyPointName1(tool, tr("Point 1 label:"));
2488  addPropertyPointName2(tool, tr("Point 2 label:"));
2489  addObjectProperty(tool, tool->BaseLineP1Name(), tr("First base point:"), AttrFirstPoint, GOType::Point);
2490  addObjectProperty(tool, tool->BaseLineP2Name(), tr("Second base point:"), AttrSecondPoint, GOType::Point);
2491  addObjectProperty(tool, tool->DartP1Name(), tr("First dart point:"), AttrDartP1, GOType::Point);
2492  addObjectProperty(tool, tool->DartP2Name(), tr("Second dart point:"), AttrDartP2, GOType::Point);
2493  addObjectProperty(tool, tool->DartP3Name(), tr("Third dart point:"), AttrDartP3, GOType::Point);
2494 }
2495 
2496 //---------------------------------------------------------------------------------------------------------------------
2498 {
2499  VToolCutArc *tool = qgraphicsitem_cast<VToolCutArc *>(item);
2500  tool->ShowVisualization(true);
2501  formView->setTitle(tr("Point - On Arc"));
2502 
2503  addPropertyLabel(tr("Selection"), AttrName);
2504  addPropertyObjectName(tool, tr("Point name:"));
2505  addObjectProperty(tool, tool->CurveName(), tr("Arc:"), AttrArc, GOType::Arc);
2506 
2507  addPropertyLabel(tr("Geometry"), AttrName);
2508  addPropertyFormula(tr("Length:"), tool->GetFormula(), AttrLength);
2509 }
2510 
2511 //---------------------------------------------------------------------------------------------------------------------
2513 {
2514  VToolCutSpline *tool = qgraphicsitem_cast<VToolCutSpline *>(item);
2515  tool->ShowVisualization(true);
2516  formView->setTitle(tr("Point - On Curve"));
2517 
2518  addPropertyLabel(tr("Selection"), AttrName);
2519  addPropertyObjectName(tool, tr("Point name:"));
2520  addObjectProperty(tool, tool->CurveName(), tr("Curve:"), AttrCurve, GOType::Curve);
2521 
2522  addPropertyLabel(tr("Geometry"), AttrName);
2523  addPropertyFormula(tr("Length:"), tool->GetFormula(), AttrLength);
2524 }
2525 
2526 //---------------------------------------------------------------------------------------------------------------------
2528 {
2529  VToolCutSplinePath *tool = qgraphicsitem_cast<VToolCutSplinePath *>(item);
2530  tool->ShowVisualization(true);
2531  formView->setTitle(tr("Point - On Spline"));
2532 
2533  addPropertyLabel(tr("Selection"), AttrName);
2534  addPropertyObjectName(tool, tr("Point name:"));
2535  addObjectProperty(tool, tool->CurveName(), tr("Curve:"), AttrCurve, GOType::Path);
2536 
2537  addPropertyLabel(tr("Geometry"), AttrName);
2538  addPropertyFormula(tr("Length:"), tool->GetFormula(), AttrLength);
2539 }
2540 
2541 //---------------------------------------------------------------------------------------------------------------------
2543 {
2544  VToolHeight *tool = qgraphicsitem_cast<VToolHeight *>(item);
2545  tool->ShowVisualization(true);
2546  formView->setTitle(tr("Point - Intersect Line and Perpendicular"));
2547 
2548  addPropertyLabel(tr("Selection"), AttrName);
2549  addPropertyObjectName(tool, tr("Point name:"));
2550  addObjectProperty(tool, tool->BasePointName(), tr("Base point:"), AttrBasePoint, GOType::Point);
2551  addObjectProperty(tool, tool->FirstLinePointName(), tr("First line point:"), AttrP1Line, GOType::Point);
2552  addObjectProperty(tool, tool->SecondLinePointName(), tr("Second line point:"), AttrP2Line, GOType::Point);
2553 
2554  addPropertyLabel(tr("Attributes"), AttrName);
2555  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2556  addPropertyLineType(tool, tr("Linetype:"));
2557  addPropertyLineWeight(tool, tr("Lineweight:"));
2558 }
2559 
2560 //---------------------------------------------------------------------------------------------------------------------
2562 {
2563  VToolLine *tool = qgraphicsitem_cast<VToolLine *>(item);
2564  tool->ShowVisualization(true);
2565  formView->setTitle(tr("Line"));
2566 
2567  addPropertyLabel(tr("Selection"), AttrName);
2568  addPropertyLineName(tool, AttrObjName, true);
2569  addObjectProperty(tool, tool->FirstPointName(), tr("First point:"), AttrFirstPoint, GOType::Point);
2570  addObjectProperty(tool, tool->SecondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2571 
2572  addPropertyLabel(tr("Attributes"), AttrName);
2573  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2574  addPropertyLineType(tool, tr("Linetype:"));
2575  addPropertyLineWeight(tool, tr("Lineweight:"));
2576 }
2577 
2578 //---------------------------------------------------------------------------------------------------------------------
2580 {
2581  VToolLineIntersect *tool = qgraphicsitem_cast<VToolLineIntersect *>(item);
2582  tool->ShowVisualization(true);
2583  formView->setTitle(tr("Point - Intersect Lines"));
2584 
2585  addPropertyLabel(tr("Selection"), AttrName);
2586  addPropertyObjectName(tool, tr("Point name:"));
2587  addPropertyLabel(tr("First line"), AttrName);
2588  addObjectProperty(tool, tool->Line1P1Name(), tr("First point:"), AttrP1Line1, GOType::Point);
2589  addObjectProperty(tool, tool->Line1P2Name(), tr("Second point:"), AttrP2Line1, GOType::Point);
2590  addPropertyLabel(tr("Second line"), AttrName);
2591  addObjectProperty(tool, tool->Line2P1Name(), tr("First point:"), AttrP1Line2, GOType::Point);
2592  addObjectProperty(tool, tool->Line2P2Name(), tr("Second point:"), AttrP2Line2, GOType::Point);
2593 }
2594 
2595 //---------------------------------------------------------------------------------------------------------------------
2597 {
2598  VToolNormal *tool = qgraphicsitem_cast<VToolNormal *>(item);
2599  tool->ShowVisualization(true);
2600  formView->setTitle(tr("Point - On Perpendicular"));
2601 
2602  addPropertyLabel(tr("Selection"), AttrName);
2603  addPropertyObjectName(tool, tr("Point name:"));
2604 
2605  addPropertyLabel(tr("Geometry"), AttrName);
2606  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2607  addObjectProperty(tool, tool->BasePointName(), tr("First point:"), AttrBasePoint, GOType::Point);
2608  addObjectProperty(tool, tool->SecondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2609 
2610  VPE::DoubleSpinboxProperty* itemAngle = new VPE::DoubleSpinboxProperty(tr("Rotation:"));
2611  itemAngle->setValue(tool->GetAngle());
2612  itemAngle->setSetting("Min", -360);
2613  itemAngle->setSetting("Max", 360);
2614  itemAngle->setSetting("Precision", 3);
2615  addProperty(itemAngle, AttrAngle);
2616 
2617  addPropertyLabel(tr("Attributes"), AttrName);
2618  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2619  addPropertyLineType(tool, tr("Linetype:"));
2620  addPropertyLineWeight(tool, tr("Lineweight:"));
2621 }
2622 
2623 //---------------------------------------------------------------------------------------------------------------------
2625 {
2626  VToolPointOfContact *tool = qgraphicsitem_cast<VToolPointOfContact *>(item);
2627  tool->ShowVisualization(true);
2628  formView->setTitle(tr("Point - Intersect Arc and Line"));
2629 
2630  addPropertyLabel(tr("Selection"), AttrName);
2631  addPropertyObjectName(tool, tr("Point name:"));
2632  addObjectProperty(tool, tool->ArcCenterPointName(), tr("Center of arc:"), AttrCenter, GOType::Point);
2633  addObjectProperty(tool, tool->FirstPointName(), tr("1st line point:"), AttrFirstPoint, GOType::Point);
2634  addObjectProperty(tool, tool->SecondPointName(), tr("2nd line point:"), AttrSecondPoint, GOType::Point);
2635 
2636  addPropertyLabel(tr("Geometry"), AttrName);
2637  addPropertyFormula(tr("Radius:"), tool->getArcRadius(), AttrRadius);
2638 }
2639 
2640 //---------------------------------------------------------------------------------------------------------------------
2642 {
2643  PointIntersectXYTool *tool = qgraphicsitem_cast<PointIntersectXYTool *>(item);
2644  tool->ShowVisualization(true);
2645  formView->setTitle(tr("Point - Intersect XY"));
2646 
2647  addPropertyLabel(tr("Selection"), AttrName);
2648  addPropertyObjectName(tool, tr("Point name:"));
2649  addObjectProperty(tool, tool->firstPointName(), tr("First point:"), AttrFirstPoint, GOType::Point);
2650  addObjectProperty(tool, tool->secondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2651 
2652  addPropertyLabel(tr("Attributes"), AttrName);
2653  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2654  addPropertyLineType(tool, tr("Linetype:"));
2655  addPropertyLineWeight(tool, tr("Lineweight:"));
2656 }
2657 
2658 //---------------------------------------------------------------------------------------------------------------------
2660 {
2661  VToolPointOfIntersectionArcs *tool = qgraphicsitem_cast<VToolPointOfIntersectionArcs *>(item);
2662  tool->ShowVisualization(true);
2663  formView->setTitle(tr("Point - Intersect Arcs"));
2664 
2665  addPropertyLabel(tr("Selection"), AttrName);
2666  addPropertyObjectName(tool, tr("Point name:"));
2667  addObjectProperty(tool, tool->FirstArcName(), tr("First arc:"), AttrFirstArc, GOType::Arc);
2668  addObjectProperty(tool, tool->SecondArcName(), tr("Second arc:"), AttrSecondArc, GOType::Arc);
2669  addPropertyCrossPoint(tool, tr("Take:"));
2670 }
2671 
2672 //---------------------------------------------------------------------------------------------------------------------
2674 {
2675  IntersectCirclesTool *tool = qgraphicsitem_cast<IntersectCirclesTool *>(item);
2676  tool->ShowVisualization(true);
2677  formView->setTitle(tr("Point - Intersect Circles"));
2678 
2679  addPropertyLabel(tr("Selection"), AttrName);
2680  addPropertyObjectName(tool, tr("Point name:"));
2681  addPropertyCrossPoint(tool, tr("Take:"));
2682 
2683  addPropertyLabel(tr("Geometry"), AttrName);
2684  addPropertyLabel(tr("First circle:"), AttrName);
2686  addPropertyFormula(tr("Radius:"), tool->GetFirstCircleRadius(), AttrC1Radius);
2687 
2688  addPropertyLabel(tr("Second circle:"), AttrName);
2690  addPropertyFormula(tr("Radius:"), tool->GetSecondCircleRadius(), AttrC2Radius);
2691 }
2692 
2693 //---------------------------------------------------------------------------------------------------------------------
2695 {
2696  VToolPointOfIntersectionCurves *tool = qgraphicsitem_cast<VToolPointOfIntersectionCurves *>(item);
2697  tool->ShowVisualization(true);
2698  formView->setTitle(tr("Point - Intersect Curves"));
2699 
2700  addPropertyLabel(tr("Selection"), AttrName);
2701  addPropertyObjectName(tool, tr("Point name:"));
2702  addObjectProperty(tool, tool->FirstCurveName(), tr("First curve:"), AttrCurve1, GOType::AllCurves);
2703  addObjectProperty(tool, tool->SecondCurveName(), tr("Second curve:"), AttrCurve2, GOType::AllCurves);
2704  addPropertyVCrossPoint(tool, tr("Vertical take:"));
2705  addPropertyHCrossPoint(tool, tr("Horizontal take:"));
2706 }
2707 
2708 //---------------------------------------------------------------------------------------------------------------------
2710 {
2711  IntersectCircleTangentTool *tool = qgraphicsitem_cast<IntersectCircleTangentTool *>(item);
2712  tool->ShowVisualization(true);
2713  formView->setTitle(tr("Point - Intersect Circle and Tangent"));
2714 
2715  addPropertyLabel(tr("Selection"), AttrName);
2716  addPropertyObjectName(tool, tr("Point name:"));
2717  addObjectProperty(tool, tool->CircleCenterPointName(), tr("Center point:"), AttrCCenter, GOType::Point);
2718  addObjectProperty(tool, tool->TangentPointName(), tr("Tangent point:"), AttrTangent, GOType::Point);
2719 
2720  addPropertyLabel(tr("Geometry"), AttrName);
2721  addPropertyFormula(tr("Circle radius:"), tool->GetCircleRadius(), AttrCRadius);
2722  addPropertyCrossPoint(tool, tr("Take:"));
2723 }
2724 
2725 //---------------------------------------------------------------------------------------------------------------------
2727 {
2728  VToolPointFromArcAndTangent *tool = qgraphicsitem_cast<VToolPointFromArcAndTangent *>(item);
2729  tool->ShowVisualization(true);
2730  formView->setTitle(tr("Point - Intersect Arc and Tangent"));
2731 
2732  addPropertyLabel(tr("Selection"), AttrName);
2733  addPropertyObjectName(tool, tr("Point name:"));
2734  addObjectProperty(tool, tool->TangentPointName(), tr("Tangent point:"), AttrTangent, GOType::Point);
2735  addObjectProperty(tool, tool->ArcName(), tr("Arc:"), AttrArc, GOType::Arc);
2736  addPropertyCrossPoint(tool, tr("Take:"));
2737 }
2738 
2739 //---------------------------------------------------------------------------------------------------------------------
2741 {
2742  VToolShoulderPoint *tool = qgraphicsitem_cast<VToolShoulderPoint *>(item);
2743  tool->ShowVisualization(true);
2744  formView->setTitle(tr("Point - Length to Line"));
2745 
2746  addPropertyLabel(tr("Selection"), AttrName);
2747  addPropertyObjectName(tool, tr("Point name:"));
2748  addObjectProperty(tool, tool->BasePointName(), tr("First point:"), AttrBasePoint, GOType::Point);
2749  addObjectProperty(tool, tool->SecondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2750  addObjectProperty(tool, tool->ShoulderPointName(), tr("Third point:"), AttrThirdPoint, GOType::Point);
2751 
2752  addPropertyLabel(tr("Geometry"), AttrName);
2753  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2754 
2755  addPropertyLabel(tr("Attributes"), AttrName);
2756  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2757  addPropertyLineType(tool, tr("Linetype:"));
2758  addPropertyLineWeight(tool, tr("Lineweight:"));
2759 }
2760 
2761 //---------------------------------------------------------------------------------------------------------------------
2763 {
2764  VToolSpline *tool = qgraphicsitem_cast<VToolSpline *>(item);
2765  tool->ShowVisualization(true);
2766  const auto spl = tool->getSpline();
2767 
2768  formView->setTitle(tr("Curve - Interactive"));
2769 
2770  addPropertyLabel(tr("Selection"), AttrName);
2771  addPropertyCurveName(tool, tr("Name:"), tr("Spl_"), spl.GetP1().name(), spl.GetP4().name(), true);
2772 
2773  addObjectProperty(tool, spl.GetP1().name(), tr("First point:"), AttrFirstPoint, GOType::Point);
2774  addObjectProperty(tool, spl.GetP4().name(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2775 
2776  addPropertyLabel(tr("Geometry"), AttrName);
2777  VFormula angle1(spl.GetStartAngleFormula(), tool->getData());
2778  angle1.setCheckZero(false);
2779  angle1.setToolId(tool->getId());
2780  angle1.setPostfix(degreeSymbol);
2781  addPropertyFormula(tr("C1: angle:"), angle1, AttrAngle1);
2782 
2783  VFormula length1(spl.GetC1LengthFormula(), tool->getData());
2784  length1.setCheckZero(false);
2785  length1.setToolId(tool->getId());
2786  length1.setPostfix(UnitsToStr(qApp->patternUnit()));
2787  addPropertyFormula(tr("C1: length:"), length1, AttrLength1);
2788 
2789  VFormula angle2(spl.GetEndAngleFormula(), tool->getData());
2790  angle2.setCheckZero(false);
2791  angle2.setToolId(tool->getId());
2792  angle2.setPostfix(degreeSymbol);
2793  addPropertyFormula(tr("C2: angle:"), angle2, AttrAngle2);
2794 
2795  VFormula length2(spl.GetC2LengthFormula(), tool->getData());
2796  length2.setCheckZero(false);
2797  length2.setToolId(tool->getId());
2798  length2.setPostfix(UnitsToStr(qApp->patternUnit()));
2799  addPropertyFormula(tr("C2: length:"), length2, AttrLength2);
2800 
2801  addPropertyLabel(tr("Attributes"), AttrName);
2802  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2803  addPropertyCurveLineType(tool, tr("Linetype:"));
2804  addPropertyLineWeight(tool, tr("Lineweight:"));
2805 }
2806 
2807 //---------------------------------------------------------------------------------------------------------------------
2809 {
2810  VToolCubicBezier *tool = qgraphicsitem_cast<VToolCubicBezier *>(item);
2811  tool->ShowVisualization(true);
2812  const auto spl = tool->getSpline();
2813 
2814  formView->setTitle(tr("Curve - Fixed"));
2815  addPropertyLabel(tr("Selection"), AttrName);
2816  addPropertyCurveName(tool, tr("Name:"), tr("Spl_"), spl.GetP1().name(), spl.GetP4().name(), true);
2817  addObjectProperty(tool, spl.GetP1().name(), tr("First point:"), AttrPoint1, GOType::Point);
2818  addObjectProperty(tool, spl.GetP2().name(), tr("Second point:"), AttrPoint2, GOType::Point);
2819  addObjectProperty(tool, spl.GetP3().name(), tr("Third point:"), AttrPoint3, GOType::Point);
2820  addObjectProperty(tool, spl.GetP4().name(), tr("Fourth point:"), AttrPoint4, GOType::Point);
2821 
2822  addPropertyLabel(tr("Attributes"), AttrName);
2823  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2824  addPropertyCurveLineType(tool, tr("Linetype:"));
2825  addPropertyLineWeight(tool, tr("Lineweight:"));
2826 }
2827 
2828 //---------------------------------------------------------------------------------------------------------------------
2830 {
2831  VToolSplinePath *tool = qgraphicsitem_cast<VToolSplinePath *>(item);
2832  tool->ShowVisualization(true);
2833 
2834  const auto spl = tool->getSplinePath();
2835 
2836  formView->setTitle(tr("Spline - Interactive"));
2837  addPropertyLabel(tr("Selection"), AttrName);
2838  addPropertyCurveName(tool, tr("Name:"), tr("SplPath_"), spl.FirstPoint().name(), spl.LastPoint().name(), true);
2839  addPropertyLabel(tr("Attributes"), AttrName);
2840  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2841  addPropertyCurveLineType(tool, tr("Linetype:"));
2842  addPropertyLineWeight(tool, tr("Lineweight:"));
2843 }
2844 
2845 //---------------------------------------------------------------------------------------------------------------------
2847 {
2848  VToolCubicBezierPath *tool = qgraphicsitem_cast<VToolCubicBezierPath *>(item);
2849  tool->ShowVisualization(true);
2850  const auto spl = tool->getSplinePath();
2851 
2852  formView->setTitle(tr("Spline - Fixed"));
2853  addPropertyLabel(tr("Selection"), AttrName);
2854  addPropertyCurveName(tool, tr("Name:"), tr("SplPath_"), spl.FirstPoint().name(), spl.LastPoint().name(), true);
2855  addPropertyLabel(tr("Attributes"), AttrName);
2856  addPropertyLineColor(tool, tr("Color:"), AttrColor);
2857  addPropertyCurveLineType(tool, tr("Linetype:"));
2858  addPropertyLineWeight(tool, tr("Lineweight:"));
2859 }
2860 
2861 //---------------------------------------------------------------------------------------------------------------------
2863 {
2864  VToolTriangle *tool = qgraphicsitem_cast<VToolTriangle *>(item);
2865  tool->ShowVisualization(true);
2866 
2867  formView->setTitle(tr("Point - Intersect Axis and Triangle"));
2868  addPropertyLabel(tr("Selection"), AttrName);
2869  addPropertyObjectName(tool, tr("Point name:"));
2870  addObjectProperty(tool, tool->AxisP1Name(), tr("1st axis point:"), AttrAxisP1, GOType::Point);
2871  addObjectProperty(tool, tool->AxisP2Name(), tr("2nd axis point:"), AttrAxisP2, GOType::Point);
2872  addObjectProperty(tool, tool->FirstPointName(), tr("First point:"), AttrFirstPoint, GOType::Point);
2873  addObjectProperty(tool, tool->SecondPointName(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2874 }
2875 
2876 //---------------------------------------------------------------------------------------------------------------------
2878 {
2879  VToolLineIntersectAxis *tool = qgraphicsitem_cast<VToolLineIntersectAxis *>(item);
2880  tool->ShowVisualization(true);
2881  formView->setTitle(tr("Point - Intersect Line and Axis"));
2882 
2883  addPropertyLabel(tr("Selection"), AttrName);
2884  addPropertyObjectName(tool, tr("Point name:"));
2885  addObjectProperty(tool, tool->BasePointName(), tr("Axis point:"), AttrBasePoint, GOType::Point);
2886  addObjectProperty(tool, tool->FirstLinePoint(), tr("First point:"), AttrFirstPoint, GOType::Point);
2887  addObjectProperty(tool, tool->SecondLinePoint(), tr("Second point:"), AttrSecondPoint, GOType::Point);
2888 
2889  addPropertyLabel(tr("Geometry"), AttrName);
2890  addPropertyFormula(tr("Angle:"), tool->GetFormulaAngle(), AttrAngle);
2891 
2892  addPropertyLabel(tr("Attributes"), AttrName);
2893  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2894  addPropertyLineType(tool, tr("Linetype:"));
2895  addPropertyLineWeight(tool, tr("Lineweight:"));
2896 }
2897 
2898 //---------------------------------------------------------------------------------------------------------------------
2900 {
2901  VToolCurveIntersectAxis *tool = qgraphicsitem_cast<VToolCurveIntersectAxis *>(item);
2902  tool->ShowVisualization(true);
2903  formView->setTitle(tr("Point - Intersect Curve and Axis"));
2904 
2905  addPropertyLabel(tr("Selection"), AttrName);
2906  addPropertyObjectName(tool, tr("Point name:"));
2907  addObjectProperty(tool, tool->BasePointName(), tr("Axis point:"), AttrBasePoint, GOType::Point);
2908 
2909  addObjectProperty(tool, tool->CurveName(), tr("Curve:"), AttrCurve, GOType::AllCurves);
2910 
2911  addPropertyLabel(tr("Geometry"), AttrName);
2912  addPropertyFormula(tr("Angle:"), tool->GetFormulaAngle(), AttrAngle);
2913 
2914  addPropertyLabel(tr("Attributes"), AttrName);
2915  addPropertyLineColor(tool, tr("Color:"), AttrLineColor);
2916  addPropertyLineType(tool, tr("Linetype:"));
2917  addPropertyLineWeight(tool, tr("Lineweight:"));
2918 }
2919 
2920 //---------------------------------------------------------------------------------------------------------------------
2922 {
2923  VToolRotation *tool = qgraphicsitem_cast<VToolRotation *>(item);
2924  tool->ShowVisualization(true);
2925  formView->setTitle(tr("Rotation"));
2926 
2927  addPropertyLabel(tr("Selection"), AttrName);
2928  addObjectProperty(tool, tool->getOriginPointName(), tr("Rotation point:"), AttrCenter, GOType::Point);
2929  addPropertyOperationSuffix(tool, tr("Suffix:"));
2930 
2931  addPropertyLabel(tr("Geometry"), AttrName);
2932  addPropertyFormula(tr("Angle:"), tool->GetFormulaAngle(), AttrAngle);
2933 }
2934 
2935 //---------------------------------------------------------------------------------------------------------------------
2937 {
2938  VToolMove *tool = qgraphicsitem_cast<VToolMove *>(item);
2939  tool->ShowVisualization(true);
2940  formView->setTitle(tr("Move"));
2941 
2942  addPropertyLabel(tr("Selection"), AttrName);
2943  addPropertyOperationSuffix(tool, tr("Suffix:"));
2944  addObjectProperty(tool, tool->getOriginPointName(), tr("Origin point:"), AttrCenter, GOType::Point);
2945 
2946  addPropertyLabel(tr("Geometry"), AttrName);
2947  addPropertyFormula(tr("Angle:"), tool->GetFormulaAngle(), AttrAngle);
2948  addPropertyFormula(tr("Length:"), tool->GetFormulaLength(), AttrLength);
2949  addPropertyFormula(tr("Rotation angle:"), tool->getFormulaRotation(), AttrRotationAngle);
2950 }
2951 
2952 //---------------------------------------------------------------------------------------------------------------------
2954 {
2955  VToolMirrorByLine *tool = qgraphicsitem_cast<VToolMirrorByLine *>(item);
2956  tool->ShowVisualization(true);
2957  formView->setTitle(tr("Mirror by Line"));
2958 
2959  addPropertyLabel(tr("Selection"), AttrName);
2960 
2961  addObjectProperty(tool, tool->firstLinePointName(), tr("First line point:"), AttrP1Line, GOType::Point);
2962  addObjectProperty(tool, tool->secondLinePointName(), tr("Second line point:"), AttrP2Line, GOType::Point);
2963 
2964  addPropertyOperationSuffix(tool, tr("Suffix:"));
2965 }
2966 
2967 //---------------------------------------------------------------------------------------------------------------------
2969 {
2970  VToolMirrorByAxis *tool = qgraphicsitem_cast<VToolMirrorByAxis *>(item);
2971  tool->ShowVisualization(true);
2972  formView->setTitle(tr("Mirror by Axis"));
2973 
2974  addPropertyLabel(tr("Selection"), AttrName);
2975  addObjectProperty(tool, tool->getOriginPointName(), tr("Axis point:"), AttrCenter, GOType::Point);
2976  addPropertyAxisType(tool, tr("Axis type:"));
2977  addPropertyOperationSuffix(tool, tr("Suffix:"));
2978 }
2979 
2980 //---------------------------------------------------------------------------------------------------------------------
2982 {
2983  VToolEllipticalArc *tool = qgraphicsitem_cast<VToolEllipticalArc *>(item);
2984  tool->ShowVisualization(true);
2985  formView->setTitle(tr("Arc - Elliptical"));
2986 
2987  addPropertyLabel(tr("Selection"), AttrName);
2988  addPropertyCurveName(tool, tr("Name:"), tr("Arc_"), tool->CenterPointName(), QString().setNum(tool->getId()), true);
2989  addObjectProperty(tool, tool->CenterPointName(), tr("Center point:"), AttrCenter, GOType::Point);
2990 
2991  addPropertyLabel(tr("Geometry"), AttrName);
2992  addPropertyFormula(tr("Radius:"), tool->GetFormulaRadius1(), AttrRadius1);
2993  addPropertyFormula(tr("Radius:"), tool->GetFormulaRadius2(), AttrRadius2);
2994  addPropertyFormula(tr("First angle:"), tool->GetFormulaF1(), AttrAngle1);
2995  addPropertyFormula(tr("Second angle:"), tool->GetFormulaF2(), AttrAngle2);
2996  addPropertyFormula(tr("Rotation angle:"), tool->GetFormulaRotationAngle(), AttrRotationAngle);
2997 
2998  addPropertyLabel(tr("Attributes"), AttrName);
2999  addPropertyLineColor(tool, tr("Color:"), AttrColor);
3000  addPropertyCurveLineType(tool, tr("Linetype:"));
3001  addPropertyLineWeight(tool, tr("Lineweight:"));
3002 }
3003 
3004 //---------------------------------------------------------------------------------------------------------------------
3006 {
3007  VToolBasePoint *tool = qgraphicsitem_cast<VToolBasePoint *>(currentItem);
3008  idToProperty[AttrName]->setValue(tool->name());
3009  idToProperty[QLatin1String("Coordinates")]->setValue(tool->GetBasePointPos());
3010 }
3011 
3012 //---------------------------------------------------------------------------------------------------------------------
3014 {
3015  VToolEndLine *tool = qgraphicsitem_cast<VToolEndLine *>(currentItem);
3016  idToProperty[AttrName]->setValue(tool->name());
3017 
3018  {
3020  idToProperty[AttrLineColor]->setValue(index);
3021  }
3022 
3023  {
3024  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3025  idToProperty[AttrLineType]->setValue(index);
3026  }
3027 
3028  {
3030  idToProperty[AttrLineWeight]->setValue(index);
3031  }
3032 
3033  {
3035  tool->BasePointName());
3036  idToProperty[AttrBasePoint]->setValue(index);
3037  }
3038 
3039  QVariant valueFormula;
3040  valueFormula.setValue(tool->GetFormulaLength());
3041  idToProperty[AttrLength]->setValue(valueFormula);
3042 
3043  QVariant valueAngle;
3044  valueAngle.setValue(tool->GetFormulaAngle());
3045  idToProperty[AttrAngle]->setValue(valueAngle);
3046 }
3047 
3048 //---------------------------------------------------------------------------------------------------------------------
3050 {
3051  VToolAlongLine *tool = qgraphicsitem_cast<VToolAlongLine *>(currentItem);
3052  idToProperty[AttrName]->setValue(tool->name());
3053 
3054  {
3056  idToProperty[AttrLineColor]->setValue(index);
3057  }
3058 
3059  {
3060  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3061  idToProperty[AttrLineType]->setValue(index);
3062  }
3063 
3064  {
3066  idToProperty[AttrLineWeight]->setValue(index);
3067  }
3068 
3069  {
3071  tool->BasePointName());
3072  idToProperty[AttrBasePoint]->setValue(index);
3073  }
3074 
3075  {
3077  tool->SecondPointName());
3078  idToProperty[AttrSecondPoint]->setValue(index);
3079  }
3080 
3081  QVariant valueFormula;
3082  valueFormula.setValue(tool->GetFormulaLength());
3083  idToProperty[AttrLength]->setValue(valueFormula);
3084 }
3085 
3086 //---------------------------------------------------------------------------------------------------------------------
3088 {
3089  VToolArc *tool = qgraphicsitem_cast<VToolArc *>(currentItem);
3090  idToProperty[AttrObjName]->setValue(tr("Arc_") + tool->CenterPointName() + "_" + QString().setNum(tool->getId()));
3091 
3092  QVariant valueRadius;
3093  valueRadius.setValue(tool->GetFormulaRadius());
3094  idToProperty[AttrRadius]->setValue(valueRadius);
3095 
3096  QVariant valueFirstAngle;
3097  valueFirstAngle.setValue(tool->GetFormulaF1());
3098  idToProperty[AttrAngle1]->setValue(valueFirstAngle);
3099 
3100  QVariant valueSecondAngle;
3101  valueSecondAngle.setValue(tool->GetFormulaF2());
3102  idToProperty[AttrAngle2]->setValue(valueSecondAngle);
3103 
3104  {
3106  tool->CenterPointName());
3107  idToProperty[AttrCenter]->setValue(index);
3108  }
3109 
3110  {
3112  idToProperty[AttrColor]->setValue(index);
3113  }
3114 
3115  {
3116  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3117  idToProperty[AttrPenStyle]->setValue(index);
3118  }
3119 
3120  {
3122  idToProperty[AttrLineWeight]->setValue(index);
3123  }
3124 }
3125 
3126 //---------------------------------------------------------------------------------------------------------------------
3128 {
3129  VToolArcWithLength *tool = qgraphicsitem_cast<VToolArcWithLength *>(currentItem);
3130 
3131  idToProperty[AttrObjName]->setValue(tr("Arc_") + tool->CenterPointName() + "_" + QString().setNum(tool->getId()));
3132 
3133  QVariant valueRadius;
3134  valueRadius.setValue(tool->GetFormulaRadius());
3135  idToProperty[AttrRadius]->setValue(valueRadius);
3136 
3137  QVariant valueFirstAngle;
3138  valueFirstAngle.setValue(tool->GetFormulaF1());
3139  idToProperty[AttrAngle1]->setValue(valueFirstAngle);
3140 
3141  QVariant valueLength;
3142  valueLength.setValue(tool->GetFormulaLength());
3143  idToProperty[AttrLength]->setValue(valueLength);
3144 
3145  {
3147  tool->CenterPointName());
3148  idToProperty[AttrCenter]->setValue(index);
3149  }
3150 
3151  {
3153  idToProperty[AttrColor]->setValue(index);
3154  }
3155 
3156  {
3157  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3158  idToProperty[AttrPenStyle]->setValue(index);
3159  }
3160 
3161  {
3163  idToProperty[AttrLineWeight]->setValue(index);
3164  }
3165 }
3166 
3167 //---------------------------------------------------------------------------------------------------------------------
3169 {
3170  VToolBisector *tool = qgraphicsitem_cast<VToolBisector *>(currentItem);
3171 
3172  idToProperty[AttrName]->setValue(tool->name());
3173 
3174  QVariant valueFormula;
3175  valueFormula.setValue(tool->GetFormulaLength());
3176  idToProperty[AttrLength]->setValue(valueFormula);
3177 
3178  {
3180  idToProperty[AttrLineColor]->setValue(index);
3181  }
3182 
3183  {
3184  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3185  idToProperty[AttrLineType]->setValue(index);
3186  }
3187 
3188  {
3190  idToProperty[AttrLineWeight]->setValue(index);
3191  }
3192  {
3194  tool->FirstPointName());
3195  idToProperty[AttrFirstPoint]->setValue(index);
3196  }
3197  {
3199  tool->BasePointName());
3200  idToProperty[AttrBasePoint]->setValue(index);
3201  }
3202  {
3204  tool->ThirdPointName());
3205  idToProperty[AttrThirdPoint]->setValue(index);
3206  }
3207 }
3208 
3209 //---------------------------------------------------------------------------------------------------------------------
3211 {
3212  VToolTrueDarts *tool = qgraphicsitem_cast<VToolTrueDarts *>(currentItem);
3213 
3214  idToProperty[AttrName1]->setValue(tool->nameP1());
3215  idToProperty[AttrName2]->setValue(tool->nameP2());
3216 
3217  {
3219  tool->BaseLineP1Name());
3220  idToProperty[AttrFirstPoint]->setValue(index);
3221  }
3222  {
3224  tool->BaseLineP2Name());
3225  idToProperty[AttrSecondPoint]->setValue(index);
3226  }
3227 
3228  {
3230  tool->DartP1Name());
3231  idToProperty[AttrDartP1]->setValue(index);
3232  }
3233 
3234  {
3236  tool->DartP2Name());
3237  idToProperty[AttrDartP2]->setValue(index);
3238  }
3239 
3240  {
3242  tool->DartP3Name());
3243  idToProperty[AttrDartP3]->setValue(index);
3244  }
3245 }
3246 
3247 //---------------------------------------------------------------------------------------------------------------------
3249 {
3250  VToolCutArc *tool = qgraphicsitem_cast<VToolCutArc *>(currentItem);
3251 
3252  idToProperty[AttrName]->setValue(tool->name());
3253 
3254  {
3256  tool->CurveName());
3257  idToProperty[AttrArc]->setValue(index);
3258  }
3259 
3260  QVariant valueFormula;
3261  valueFormula.setValue(tool->GetFormula());
3262  idToProperty[AttrLength]->setValue(valueFormula);
3263 }
3264 
3265 //---------------------------------------------------------------------------------------------------------------------
3267 {
3268  VToolCutSpline *tool = qgraphicsitem_cast<VToolCutSpline *>(currentItem);
3269 
3270  idToProperty[AttrName]->setValue(tool->name());
3271 
3272  {
3274  tool->CurveName());
3275  idToProperty[AttrCurve]->setValue(index);
3276  }
3277 
3278  QVariant valueFormula;
3279  valueFormula.setValue(tool->GetFormula());
3280  idToProperty[AttrLength]->setValue(valueFormula);
3281 }
3282 
3283 //---------------------------------------------------------------------------------------------------------------------
3285 {
3286  VToolCutSplinePath *tool = qgraphicsitem_cast<VToolCutSplinePath *>(currentItem);
3287 
3288  idToProperty[AttrName]->setValue(tool->name());
3289 
3290  {
3292  tool->CurveName());
3293  idToProperty[AttrCurve]->setValue(index);
3294  }
3295 
3296  QVariant valueFormula;
3297  valueFormula.setValue(tool->GetFormula());
3298  idToProperty[AttrLength]->setValue(valueFormula);
3299 }
3300 
3301 //---------------------------------------------------------------------------------------------------------------------
3303 {
3304  VToolHeight *tool = qgraphicsitem_cast<VToolHeight *>(currentItem);
3305 
3306  idToProperty[AttrName]->setValue(tool->name());
3307 
3308  {
3310  idToProperty[AttrLineColor]->setValue(index);
3311  }
3312 
3313  {
3314  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3315  idToProperty[AttrLineType]->setValue(index);
3316  }
3317 
3318  {
3320  idToProperty[AttrLineWeight]->setValue(index);
3321  }
3322 
3323  {
3325  tool->BasePointName());
3326  idToProperty[AttrBasePoint]->setValue(index);
3327  }
3328 
3329  {
3331  tool->FirstLinePointName());
3332  idToProperty[AttrP1Line]->setValue(index);
3333  }
3334 
3335  {
3337  tool->SecondLinePointName());
3338  idToProperty[AttrP2Line]->setValue(index);
3339  }
3340 }
3341 
3342 //---------------------------------------------------------------------------------------------------------------------
3344 {
3345  VToolLine *tool = qgraphicsitem_cast<VToolLine *>(currentItem);
3346 
3347  idToProperty[AttrObjName]->setValue(tr("Line_") + tool->FirstPointName() + "_" + tool->SecondPointName());
3348 
3349  {
3351  idToProperty[AttrLineColor]->setValue(index);
3352  }
3353 
3354  {
3355  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3356  idToProperty[AttrLineType]->setValue(index);
3357  }
3358 
3359  {
3361  idToProperty[AttrLineWeight]->setValue(index);
3362  }
3363 
3364  {
3366  tool->FirstPointName());
3367  idToProperty[AttrFirstPoint]->setValue(index);
3368  }
3369  {
3371  tool->SecondPointName());
3372  idToProperty[AttrSecondPoint]->setValue(index);
3373  }
3374 }
3375 
3376 //---------------------------------------------------------------------------------------------------------------------
3378 {
3379  VToolLineIntersect *tool = qgraphicsitem_cast<VToolLineIntersect *>(currentItem);
3380 
3381  idToProperty[AttrName]->setValue(tool->name());
3382 
3383  {
3385  tool->Line1P1Name());
3386  idToProperty[AttrP1Line1]->setValue(index);
3387  }
3388 
3389  {
3391  tool->Line1P2Name());
3392  idToProperty[AttrP2Line1]->setValue(index);
3393  }
3394 
3395  {
3397  tool->Line2P1Name());
3398  idToProperty[AttrP1Line2]->setValue(index);
3399  }
3400 
3401  {
3403  tool->Line2P2Name());
3404  idToProperty[AttrP2Line2]->setValue(index);
3405  }
3406 }
3407 
3408 //---------------------------------------------------------------------------------------------------------------------
3410 {
3411  VToolNormal *tool = qgraphicsitem_cast<VToolNormal *>(currentItem);
3412 
3413  QVariant valueFormula;
3414  valueFormula.setValue(tool->GetFormulaLength());
3415  idToProperty[AttrLength]->setValue(valueFormula);
3416 
3417  idToProperty[AttrName]->setValue(tool->name());
3418 
3419  idToProperty[AttrAngle]->setValue( tool->GetAngle());
3420 
3421  {
3423  idToProperty[AttrLineColor]->setValue(index);
3424  }
3425 
3426  {
3427  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3428  idToProperty[AttrLineType]->setValue(index);
3429  }
3430 
3431  {
3433  idToProperty[AttrLineWeight]->setValue(index);
3434  }
3435 
3436  {
3438  tool->BasePointName());
3439  idToProperty[AttrBasePoint]->setValue(index);
3440  }
3441 
3442  {
3444  tool->SecondPointName());
3445  idToProperty[AttrSecondPoint]->setValue(index);
3446  }
3447 }
3448 
3449 //---------------------------------------------------------------------------------------------------------------------
3451 {
3452  VToolPointOfContact *tool = qgraphicsitem_cast<VToolPointOfContact *>(currentItem);
3453 
3454  QVariant valueFormula;
3455  valueFormula.setValue(tool->getArcRadius());
3456  idToProperty[AttrRadius]->setValue(valueFormula);
3457 
3458  idToProperty[AttrName]->setValue(tool->name());
3459 
3460  {
3462  tool->ArcCenterPointName());
3463  idToProperty[AttrCenter]->setValue(index);
3464  }
3465 
3466  {
3468  tool->FirstPointName());
3469  idToProperty[AttrFirstPoint]->setValue(index);
3470  }
3471 
3472  {
3474  tool->SecondPointName());
3475  idToProperty[AttrSecondPoint]->setValue(index);
3476  }
3477 }
3478 
3479 //---------------------------------------------------------------------------------------------------------------------
3481 {
3482  PointIntersectXYTool *tool = qgraphicsitem_cast<PointIntersectXYTool *>(currentItem);
3483 
3484  idToProperty[AttrName]->setValue(tool->name());
3485 
3486  {
3488  tool->firstPointName());
3489  idToProperty[AttrFirstPoint]->setValue(index);
3490  }
3491 
3492  {
3494  tool->secondPointName());
3495  idToProperty[AttrSecondPoint]->setValue(index);
3496  }
3497 
3498  {
3500  idToProperty[AttrLineColor]->setValue(index);
3501  }
3502 
3503  {
3504  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3505  idToProperty[AttrLineType]->setValue(index);
3506  }
3507 
3508  {
3510  idToProperty[AttrLineWeight]->setValue(index);
3511  }
3512 }
3513 
3514 //---------------------------------------------------------------------------------------------------------------------
3516 {
3517  VToolPointOfIntersectionArcs *tool = qgraphicsitem_cast<VToolPointOfIntersectionArcs *>(currentItem);
3518 
3519  idToProperty[AttrName]->setValue(tool->name());
3520  idToProperty[AttrCrossPoint]->setValue(static_cast<int>(tool->GetCrossCirclesPoint())-1);
3521 
3522  {
3524  tool->FirstArcName());
3525  idToProperty[AttrFirstArc]->setValue(index);
3526  }
3527 
3528  {
3530  tool->SecondArcName());
3531  idToProperty[AttrSecondArc]->setValue(index);
3532  }
3533 }
3534 
3535 //---------------------------------------------------------------------------------------------------------------------
3537 {
3538  IntersectCirclesTool *tool = qgraphicsitem_cast<IntersectCirclesTool *>(currentItem);
3539 
3540  idToProperty[AttrName]->setValue(tool->name());
3541  idToProperty[AttrCrossPoint]->setValue(static_cast<int>(tool->GetCrossCirclesPoint())-1);
3542 
3543  QVariant c1Radius;
3544  c1Radius.setValue(tool->GetFirstCircleRadius());
3545  idToProperty[AttrC1Radius]->setValue(c1Radius);
3546 
3547  QVariant c2Radius;
3548  c2Radius.setValue(tool->GetSecondCircleRadius());
3549  idToProperty[AttrC2Radius]->setValue(c2Radius);
3550 
3551  {
3553  tool->FirstCircleCenterPointName());
3554  idToProperty[AttrC1Center]->setValue(index);
3555  }
3556 
3557  {
3559  tool->SecondCircleCenterPointName());
3560  idToProperty[AttrC2Center]->setValue(index);
3561  }
3562 }
3563 
3564 //---------------------------------------------------------------------------------------------------------------------
3566 {
3567  VToolPointOfIntersectionCurves *tool = qgraphicsitem_cast<VToolPointOfIntersectionCurves *>(currentItem);
3568 
3569  idToProperty[AttrName]->setValue(tool->name());
3570  idToProperty[AttrVCrossPoint]->setValue(static_cast<int>(tool->GetVCrossPoint())-1);
3571  idToProperty[AttrHCrossPoint]->setValue(static_cast<int>(tool->GetHCrossPoint())-1);
3572 
3573  {
3575  tool->FirstCurveName());
3576  idToProperty[AttrCurve1]->setValue(index);
3577  }
3578 
3579  {
3581  tool->SecondCurveName());
3582  idToProperty[AttrCurve2]->setValue(index);
3583  }
3584 }
3585 
3586 //---------------------------------------------------------------------------------------------------------------------
3588 {
3589  IntersectCircleTangentTool *tool = qgraphicsitem_cast<IntersectCircleTangentTool *>(currentItem);
3590 
3591  idToProperty[AttrName]->setValue(tool->name());
3592  idToProperty[AttrCrossPoint]->setValue(static_cast<int>(tool->GetCrossCirclesPoint())-1);
3593 
3594  QVariant cRadius;
3595  cRadius.setValue(tool->GetCircleRadius());
3596  idToProperty[AttrCRadius]->setValue(cRadius);
3597 
3598  {
3600  tool->CircleCenterPointName());
3601  idToProperty[AttrCCenter]->setValue(index);
3602  }
3603 
3604  {
3606  tool->TangentPointName());
3607  idToProperty[AttrTangent]->setValue(index);
3608  }
3609 }
3610 
3611 //---------------------------------------------------------------------------------------------------------------------
3613 {
3614  VToolPointFromArcAndTangent *tool = qgraphicsitem_cast<VToolPointFromArcAndTangent *>(currentItem);
3615 
3616  idToProperty[AttrName]->setValue(tool->name());
3617  idToProperty[AttrCrossPoint]->setValue(static_cast<int>(tool->GetCrossCirclesPoint())-1);
3618 
3619  {
3621  tool->TangentPointName());
3622  idToProperty[AttrTangent]->setValue(index);
3623  }
3624 
3625  {
3627  tool->ArcName());
3628  idToProperty[AttrArc]->setValue(index);
3629  }
3630 }
3631 
3632 //---------------------------------------------------------------------------------------------------------------------
3634 {
3635  VToolShoulderPoint *tool = qgraphicsitem_cast<VToolShoulderPoint *>(currentItem);
3636 
3637  QVariant valueFormula;
3638  valueFormula.setValue(tool->GetFormulaLength());
3639  idToProperty[AttrLength]->setValue(valueFormula);
3640 
3641  idToProperty[AttrName]->setValue(tool->name());
3642 
3643  {
3645  idToProperty[AttrLineColor]->setValue(index);
3646  }
3647 
3648  {
3649  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3650  idToProperty[AttrLineType]->setValue(index);
3651  }
3652 
3653  {
3655  idToProperty[AttrLineWeight]->setValue(index);
3656  }
3657 
3658  {
3660  tool->BasePointName());
3661  idToProperty[AttrBasePoint]->setValue(index);
3662  }
3663 
3664  {
3666  tool->SecondPointName());
3667  idToProperty[AttrSecondPoint]->setValue(index);
3668  }
3669 
3670  {
3672  tool->ShoulderPointName());
3673  idToProperty[AttrThirdPoint]->setValue(index);
3674  }
3675 }
3676 
3677 //---------------------------------------------------------------------------------------------------------------------
3679 {
3680  VToolSpline *tool = qgraphicsitem_cast<VToolSpline *>(currentItem);
3681  const VSpline spl = tool->getSpline();
3682  idToProperty[AttrObjName]->setValue(tr("Spl_") + spl.GetP1().name() + "_" + spl.GetP4().name());
3683 
3684  {
3686  spl.GetP1().name());
3687  idToProperty[AttrFirstPoint]->setValue(index);
3688  }
3689 
3690  {
3692  spl.GetP4().name());
3693  idToProperty[AttrSecondPoint]->setValue(index);
3694  }
3695 
3696  VFormula angle1F(spl.GetStartAngleFormula(), tool->getData());
3697  angle1F.setCheckZero(false);
3698  angle1F.setToolId(tool->getId());
3699  angle1F.setPostfix(degreeSymbol);
3700  QVariant angle1;
3701  angle1.setValue(angle1F);
3702  idToProperty[AttrAngle1]->setValue(angle1);
3703 
3704  VFormula length1F(spl.GetC1LengthFormula(), tool->getData());
3705  length1F.setCheckZero(false);
3706  length1F.setToolId(tool->getId());
3707  length1F.setPostfix(UnitsToStr(qApp->patternUnit()));
3708  QVariant length1;
3709  length1.setValue(length1F);
3710  idToProperty[AttrLength1]->setValue(length1);
3711 
3712  VFormula angle2F(spl.GetEndAngleFormula(), tool->getData());
3713  angle2F.setCheckZero(false);
3714  angle2F.setToolId(tool->getId());
3715  angle2F.setPostfix(degreeSymbol);
3716  QVariant angle2;
3717  angle2.setValue(angle2F);
3718  idToProperty[AttrAngle2]->setValue(angle2);
3719 
3720  VFormula length2F(spl.GetC2LengthFormula(), tool->getData());
3721  length2F.setCheckZero(false);
3722  length2F.setToolId(tool->getId());
3723  length2F.setPostfix(UnitsToStr(qApp->patternUnit()));
3724  QVariant length2;
3725  length2.setValue(length2F);
3726  idToProperty[AttrLength2]->setValue(length2);
3727 
3728 
3729 
3731  tool->getLineColor()));
3732 
3733  {
3734  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3735  idToProperty[AttrPenStyle]->setValue(index);
3736  }
3737 
3738  {
3740  idToProperty[AttrLineWeight]->setValue(index);
3741  }
3742 }
3743 
3744 //---------------------------------------------------------------------------------------------------------------------
3746 {
3747  VToolCubicBezier *tool = qgraphicsitem_cast<VToolCubicBezier *>(currentItem);
3748  const auto spl = tool->getSpline();
3749  idToProperty[AttrObjName]->setValue(tr("Spl_") + spl.GetP1().name() + "_" + spl.GetP4().name());
3750 
3752  tool->getLineColor()));
3753 
3754  {
3755  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3756  idToProperty[AttrPenStyle]->setValue(index);
3757  }
3758 
3759  {
3761  idToProperty[AttrLineWeight]->setValue(index);
3762  }
3763 
3764  {
3766  spl.GetP1().name());
3767  idToProperty[AttrPoint1]->setValue(index);
3768  }
3769 
3770  {
3772  spl.GetP2().name());
3773  idToProperty[AttrPoint2]->setValue(index);
3774  }
3775 
3776  {
3778  spl.GetP3().name());
3779  idToProperty[AttrPoint3]->setValue(index);
3780  }
3781 
3782  {
3784  spl.GetP4().name());
3785  idToProperty[AttrPoint4]->setValue(index);
3786  }
3787 }
3788 
3789 //---------------------------------------------------------------------------------------------------------------------
3791 {
3792  VToolSplinePath *tool = qgraphicsitem_cast<VToolSplinePath *>(currentItem);
3793 
3794  idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(tool->name()));
3795 
3797  tool->getLineColor()));
3798 
3799  {
3800  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3801  idToProperty[AttrPenStyle]->setValue(index);
3802  }
3803 
3804  {
3806  idToProperty[AttrLineWeight]->setValue(index);
3807  }
3808 
3809 }
3810 
3811 //---------------------------------------------------------------------------------------------------------------------
3813 {
3814  VToolCubicBezierPath *tool = qgraphicsitem_cast<VToolCubicBezierPath *>(currentItem);
3815 
3816  idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(tool->name()));
3817 
3819  tool->getLineColor()));
3820 
3821  {
3822  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
3823  idToProperty[AttrPenStyle]->setValue(index);
3824  }
3825 
3826  {
3828  idToProperty[AttrLineWeight]->setValue(index);
3829  }
3830 }
3831 
3832 //---------------------------------------------------------------------------------------------------------------------
3834 {
3835  VToolTriangle *tool = qgraphicsitem_cast<VToolTriangle *>(currentItem);
3836 
3837  idToProperty[AttrName]->setValue(tool->name());
3838 
3839  {
3841  tool->AxisP1Name());
3842  idToProperty[AttrAxisP1]->setValue(index);
3843  }
3844 
3845  {
3847  tool->AxisP2Name());
3848  idToProperty[AttrAxisP2]->setValue(index);
3849  }
3850 
3851  {
3853  tool->FirstPointName());
3854  idToProperty[AttrFirstPoint]->setValue(index);
3855  }
3856 
3857  {
3859  tool->SecondPointName());
3860  idToProperty[AttrSecondPoint]->setValue(index);
3861  }
3862 }
3863 
3864 //---------------------------------------------------------------------------------------------------------------------
3866 {
3867  VToolLineIntersectAxis *tool = qgraphicsitem_cast<VToolLineIntersectAxis *>(currentItem);
3868  idToProperty[AttrName]->setValue(tool->name());
3869 
3870  {
3872  idToProperty[AttrLineColor]->setValue(index);
3873  }
3874 
3875  {
3876  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3877  idToProperty[AttrLineType]->setValue(index);
3878  }
3879 
3880  {
3882  idToProperty[AttrLineWeight]->setValue(index);
3883  }
3884 
3885  {
3887  tool->BasePointName());
3888  idToProperty[AttrBasePoint]->setValue(index);
3889  }
3890 
3891  {
3893  tool->FirstLinePoint());
3894  idToProperty[AttrFirstPoint]->setValue(index);
3895  }
3896 
3897  {
3899  tool->SecondLinePoint());
3900  idToProperty[AttrSecondPoint]->setValue(index);
3901  }
3902 
3903  QVariant valueAngle;
3904  valueAngle.setValue(tool->GetFormulaAngle());
3905  idToProperty[AttrAngle]->setValue(valueAngle);
3906 }
3907 
3908 //---------------------------------------------------------------------------------------------------------------------
3910 {
3911  VToolCurveIntersectAxis *tool = qgraphicsitem_cast<VToolCurveIntersectAxis *>(currentItem);
3912  idToProperty[AttrName]->setValue(tool->name());
3913 
3914  {
3916  idToProperty[AttrLineColor]->setValue(index);
3917  }
3918 
3919  {
3920  const qint32 index = VPE::LineTypeProperty::indexOfLineType(lineTypeList(), tool->getLineType());
3921  idToProperty[AttrLineType]->setValue(index);
3922  }
3923 
3924  {
3926  idToProperty[AttrLineWeight]->setValue(index);
3927  }
3928 
3929  {
3931  tool->BasePointName());
3932  idToProperty[AttrBasePoint]->setValue(index);
3933  }
3934 
3935  {
3937  tool->CurveName());
3938  idToProperty[AttrCurve]->setValue(index);
3939  }
3940 
3941  QVariant valueAngle;
3942  valueAngle.setValue(tool->GetFormulaAngle());
3943  idToProperty[AttrAngle]->setValue(valueAngle);
3944 }
3945 
3946 //---------------------------------------------------------------------------------------------------------------------
3948 {
3949  VToolRotation *tool = qgraphicsitem_cast<VToolRotation *>(currentItem);
3950  idToProperty[AttrSuffix]->setValue(tool->Suffix());
3951 
3952  QVariant valueAngle;
3953  valueAngle.setValue(tool->GetFormulaAngle());
3954  idToProperty[AttrAngle]->setValue(valueAngle);
3955 
3956  {
3958  tool->getOriginPointName());
3959  idToProperty[AttrCenter]->setValue(index);
3960  }
3961 }
3962 
3963 //---------------------------------------------------------------------------------------------------------------------
3965 {
3966  VToolMove *tool = qgraphicsitem_cast<VToolMove *>(currentItem);
3967  idToProperty[AttrSuffix]->setValue(tool->Suffix());
3968 
3969  QVariant valueAngle;
3970  valueAngle.setValue(tool->GetFormulaAngle());
3971  idToProperty[AttrAngle]->setValue(valueAngle);
3972 
3973  QVariant valueLength;
3974  valueLength.setValue(tool->GetFormulaLength());
3975  idToProperty[AttrLength]->setValue(valueLength);
3976 
3977  QVariant valueRotation;
3978  valueRotation.setValue(tool->getFormulaRotation());
3979  idToProperty[AttrRotationAngle]->setValue(valueRotation);
3980 
3981  {
3983  tool->getOriginPointName());
3984  idToProperty[AttrCenter]->setValue(index);
3985  }
3986 }
3987 
3988 //---------------------------------------------------------------------------------------------------------------------
3990 {
3991  VToolMirrorByLine *tool = qgraphicsitem_cast<VToolMirrorByLine *>(currentItem);
3992  idToProperty[AttrSuffix]->setValue(tool->Suffix());
3993 
3994  {
3996  tool->firstLinePointName());
3997  idToProperty[AttrP1Line]->setValue(index);
3998  }
3999 
4000  {
4002  tool->secondLinePointName());
4003  idToProperty[AttrP2Line]->setValue(index);
4004  }
4005 }
4006 
4007 //---------------------------------------------------------------------------------------------------------------------
4009 {
4010  VToolMirrorByAxis *tool = qgraphicsitem_cast<VToolMirrorByAxis *>(currentItem);
4011  idToProperty[AttrAxisType]->setValue(static_cast<int>(tool->getAxisType())-1);
4012  idToProperty[AttrSuffix]->setValue(tool->Suffix());
4013 
4014  {
4016  tool->getOriginPointName());
4017  idToProperty[AttrCenter]->setValue(index);
4018  }
4019 }
4020 
4021 //---------------------------------------------------------------------------------------------------------------------
4023 {
4024  VToolEllipticalArc *tool = qgraphicsitem_cast<VToolEllipticalArc *>(currentItem);
4025 
4026  idToProperty[AttrObjName]->setValue(tr("Arc_") + tool->CenterPointName() + "_" + QString().setNum(tool->getId()));
4027 
4028  QVariant valueFormulaRadius1;
4029  valueFormulaRadius1.setValue(tool->GetFormulaRadius1());
4030  idToProperty[AttrRadius1]->setValue(valueFormulaRadius1);
4031 
4032  QVariant valueFormulaRadius2;
4033  valueFormulaRadius2.setValue(tool->GetFormulaRadius2());
4034  idToProperty[AttrRadius2]->setValue(valueFormulaRadius2);
4035 
4036  QVariant valueFormulaF1;
4037  valueFormulaF1.setValue(tool->GetFormulaF1());
4038  idToProperty[AttrAngle1]->setValue(valueFormulaF1);
4039 
4040  QVariant valueFormulaF2;
4041  valueFormulaF2.setValue(tool->GetFormulaF2());
4042  idToProperty[AttrAngle2]->setValue(valueFormulaF2);
4043 
4044  QVariant valueFormulaRotationAngle;
4045  valueFormulaRotationAngle.setValue(tool->GetFormulaRotationAngle());
4046  idToProperty[AttrRotationAngle]->setValue(valueFormulaRotationAngle);
4047 
4048  {
4050  tool->CenterPointName());
4051  idToProperty[AttrCenter]->setValue(index);
4052  }
4053 
4054  {
4056  idToProperty[AttrColor]->setValue(index);
4057  }
4058 
4059  {
4060  const qint32 index = VPE::LineTypeProperty::indexOfLineType(curveLineTypeList(), tool->GetPenStyle());
4061  idToProperty[AttrPenStyle]->setValue(index);
4062  }
4063 
4064  {
4066  idToProperty[AttrLineWeight]->setValue(index);
4067  }
4068 }
4069 
4070 //---------------------------------------------------------------------------------------------------------------------
4072 {
4073  static QStringList attr = QStringList() << AttrName /* 0 */
4074  << QLatin1String("Coordinates") /* 1 */
4075  << AttrBasePoint /* 2 */
4076  << AttrLineType /* 3 */
4077  << AttrLength /* 4 */
4078  << AttrAngle /* 5 */
4079  << AttrFirstPoint /* 6 */
4080  << AttrSecondPoint /* 7 */
4081  << AttrRadius /* 8 */
4082  << AttrAngle1 /* 9 */
4083  << AttrAngle2 /* 10 */
4084  << AttrCenter /* 11 */
4085  << AttrThirdPoint /* 12 */
4086  << AttrArc /* 13 */
4087  << VToolCutSpline::AttrSpline /* 14 */
4089  << AttrP1Line /* 16 */
4090  << AttrP2Line /* 17 */
4091  << AttrP1Line1 /* 18 */
4092  << AttrP2Line1 /* 19 */
4093  << AttrP1Line2 /* 20 */
4094  << AttrP2Line2 /* 21 */
4095  << AttrPShoulder /* 22 */
4096  << AttrAxisP1 /* 23 */
4097  << AttrAxisP2 /* 24 */
4098  << AttrKCurve /*Not used*/ /* 25 */
4099  << AttrLineColor /* 26 */
4100  << AttrColor /* 27 */
4101  << AttrCrossPoint /* 28 */
4102  << AttrC1Radius /* 29 */
4103  << AttrC2Radius /* 30 */
4104  << AttrCRadius /* 31 */
4105  << AttrName1 /* 32 */
4106  << AttrName2 /* 33 */
4107  << AttrVCrossPoint /* 34 */
4108  << AttrHCrossPoint /* 35 */
4109  << AttrLength1 /* 36 */
4110  << AttrLength2 /* 37 */
4111  << AttrSuffix /* 38 */
4112  << AttrAxisType /* 39 */
4113  << AttrRadius1 /* 40 */
4114  << AttrRadius2 /* 41 */
4115  << AttrRotationAngle /* 42 */
4116  << AttrDartP1 /* 43 */
4117  << AttrDartP2 /* 44 */
4118  << AttrDartP3 /* 45 */
4119  << AttrCurve /* 46 */
4120  << AttrFirstArc /* 47 */
4121  << AttrSecondArc /* 48 */
4122  << AttrC1Center /* 49 */
4123  << AttrC2Center /* 50 */
4124  << AttrCurve1 /* 51 */
4125  << AttrCurve2 /* 52 */
4126  << AttrCCenter /* 53 */
4127  << AttrTangent /* 54 */
4128  << AttrPoint1 /* 55 */
4129  << AttrPoint2 /* 56 */
4130  << AttrPoint3 /* 57 */
4131  << AttrPoint4 /* 58 */
4132  << AttrPenStyle /* 59 */
4133  << AttrLineWeight /* 60 */
4134  << AttrObjName; /* 61 */
4135  return attr;
4136 }
void setLineColor(const QString &value)
void setSecondPointId(const quint32 &value)
void setFirstPointId(const quint32 &value)
void SetCircleCenterId(const quint32 &value)
void SetCircleRadius(const VFormula &value)
void SetTangentPointId(const quint32 &value)
CrossCirclesPoint GetCrossCirclesPoint() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString FirstCircleCenterPointName() const
void SetSecondCircleRadius(const VFormula &value)
VFormula GetFirstCircleRadius() const
void SetFirstCircleCenterId(const quint32 &value)
VFormula GetSecondCircleRadius() const
QString SecondCircleCenterPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetSecondCircleCenterId(const quint32 &value)
CrossCirclesPoint GetCrossCirclesPoint() const
void SetFirstCircleRadius(const VFormula &value)
The PointIntersectXYTool class tool for creation point intersection two lines.
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString Suffix() const
void setLineColor(const QString &value)
void SetPenStyle(const QString &value)
QString name() const
QString getLineColor() const
void setLineWeight(const QString &value)
setLineWeight set line weight of the spline
QString GetPenStyle() const
QString getLineWeight() const
getLineWeight return line weight of the spline
The VAbstractTool abstract class for all tools.
Definition: vabstracttool.h:80
const VContainer * getData() const
getData return pointer to data container.
virtual void ShowVisualization(bool show)=0
static QMap< QString, QString > ColorsList()
quint32 getId() const
getId return object id.
The VContainer class container of all variables.
Definition: vcontainer.h:141
static bool IsUnique(const QString &name)
Definition: vcontainer.cpp:585
const QSharedPointer< VGObject > GetGObject(quint32 id) const
GetGObject returns a point by id.
Definition: vcontainer.cpp:150
const QSharedPointer< T > GeometricObject(const quint32 &id) const
Definition: vcontainer.h:266
static QStringList AllUniqueNames()
Definition: vcontainer.cpp:591
const QHash< quint32, QSharedPointer< VGObject > > * DataGObjects() const
data container with datagObjects return container of gObjects
Definition: vcontainer.cpp:706
virtual void setLineType(const QString &value)
Definition: vdrawtool.cpp:253
virtual void setLineWeight(const QString &value)
Definition: vdrawtool.cpp:268
QString getLineWeight() const
Definition: vdrawtool.cpp:262
QString getLineType() const
Definition: vdrawtool.cpp:247
void SetFormula(const VFormula &formula)
Sets the formula.
bool error() const
Definition: vformula.cpp:238
qreal getDoubleValue() const
Definition: vformula.cpp:172
QString value
Definition: vformula.h:100
QString GetFormula(FormulaType type=FormulaType::ToUser) const
Definition: vformula.cpp:135
void setToolId(const quint32 &value)
Definition: vformula.cpp:216
void setCheckZero(bool value)
Definition: vformula.cpp:184
void setPostfix(const QString &value)
Definition: vformula.cpp:228
virtual QString name() const
name return name graphical object.
Definition: vgobject.cpp:148
Class for holding a double property.
virtual void setSetting(const QString &key, const QVariant &value)
Sets the settings. Available settings:
static int indexOfLineType(const QMap< QString, QString > &styles, const QString &style)
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual void setLineTypes(const QMap< QString, QString > &styles)
Sets the line styles.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual void setLineWeights(const QMap< QString, QString > &weights)
Sets the line styles.
static int indexOfLineWeight(const QMap< QString, QString > &lineWeights, const QString &weight)
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual void setLiterals(const QStringList &literals)
Sets the enumeration literals.
Class for holding a string property.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
static int indexOfColor(const QMap< QString, QString > &colors, const QString &color)
virtual void setColors(const QMap< QString, QString > &colors)
Sets the colors.
static int indexOfObject(const QMap< QString, quint32 > &objects, const QString &object)
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
void setObjectsList(const QMap< QString, quint32 > &objects)
Sets the objects list.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
This class populates a form layout with the properties in a model.
This is the base model for managing all the properties and passing them to the view.
virtual bool addProperty(VProperty *property, const QString &id, const QString &parentid=QString(), bool emitsignals=true)
Adds the property to the model and attaches it to the parentid.
virtual void clear(bool emit_signals=true)
Clears the model, deletes the property set managed by this model.
void onDataChangedByEditor(VProperty *property)
This signal is being emitted, when the setData method is being called.
virtual void setValue(const QVariant &value)
Sets the value of the property.
Definition: vproperty.cpp:171
virtual VProperty * getParent() const
Gets the parent of this property.
Definition: vproperty.cpp:251
Class for holding a string property.
void setReadOnly(bool readOnly)
void setClearButtonEnable(bool value)
The VPointF class keep data of point.
Definition: vpointf.h:75
VSpline class that implements the spline.
Definition: vspline.h:75
virtual VPointF GetP4() const Q_DECL_OVERRIDE
GetP4 return last spline point.
Definition: vspline.cpp:321
QString GetC1LengthFormula() const
Definition: vspline.cpp:391
virtual VPointF GetP1() const Q_DECL_OVERRIDE
GetP1 return first spline point.
Definition: vspline.cpp:281
QString GetStartAngleFormula() const
Definition: vspline.cpp:353
QString GetEndAngleFormula() const
Definition: vspline.cpp:359
QString GetC2LengthFormula() const
Definition: vspline.cpp:397
The VToolAlongLine class tool for creation point along line.
QString SecondPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetSecondPointId(const quint32 &value)
VFormula GetFormulaLength() const
VFormula GetFormulaRadius() const
void SetFormulaLength(const VFormula &value)
QString CenterPointName() const
void setCenter(const quint32 &value)
VFormula GetFormulaF1() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetFormulaRadius(const VFormula &value)
void SetFormulaF1(const VFormula &value)
The VToolArc class tool for creation arc.
Definition: vtoolarc.h:69
void SetFormulaF2(const VFormula &value)
Definition: vtoolarc.cpp:314
void SetFormulaRadius(const VFormula &value)
Definition: vtoolarc.cpp:257
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
Definition: vtoolarc.cpp:345
QString CenterPointName() const
Definition: vtoolarc.cpp:215
VFormula GetFormulaF1() const
Definition: vtoolarc.cpp:272
void SetFormulaF1(const VFormula &value)
Definition: vtoolarc.cpp:285
@ Type
Definition: vtoolarc.h:83
VFormula GetFormulaRadius() const
Definition: vtoolarc.cpp:244
VFormula GetFormulaF2() const
Definition: vtoolarc.cpp:301
void setCenter(const quint32 &value)
Definition: vtoolarc.cpp:230
The VToolBasePoint class tool for creation pattern base point. Only base point can move....
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QPointF GetBasePointPos() const
void SetBasePointPos(const QPointF &pos)
The VToolBisector class tool for creation bisector point.
Definition: vtoolbisector.h:74
void SetFirstPointId(const quint32 &value)
QString FirstPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetThirdPointId(const quint32 &value)
QString ThirdPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
VCubicBezierPath getSplinePath() const
void setSpline(const VCubicBezier &spl)
VCubicBezier getSpline() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void setCurveId(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetFormulaAngle(const VFormula &value)
The VToolCutArc class tool for cutting arc.
Definition: vtoolcutarc.h:73
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
The VToolCutSplinePath class for tool CutSplinePath. This tool find point on splinePath and cut splin...
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
static const QString AttrSplinePath
The VToolCutSpline class for tool CutSpline. This tool find point on spline and cut spline on two.
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
static const QString AttrSpline
void SetFormula(const VFormula &value)
Definition: vtoolcut.cpp:133
void setCurveCutId(const quint32 &value)
Definition: vtoolcut.cpp:112
VFormula GetFormula() const
Definition: vtoolcut.cpp:123
QString CurveName() const
Definition: vtoolcut.cpp:145
QString nameP1() const
QString nameP2() const
The VToolEllipticalArc class tool for creation elliptical arc.
void setCenter(const quint32 &value)
void SetFormulaF2(const VFormula &value)
void SetFormulaRotationAngle(const VFormula &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
VFormula GetFormulaRotationAngle() const
void SetFormulaRadius1(const VFormula &value)
VFormula GetFormulaF2() const
VFormula GetFormulaRadius1() const
void SetFormulaF1(const VFormula &value)
QString CenterPointName() const
void SetFormulaRadius2(const VFormula &value)
VFormula GetFormulaF1() const
VFormula GetFormulaRadius2() const
The VToolEndLine class tool for creation point on the line end.
Definition: vtoolendline.h:74
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
VFormula GetFormulaAngle() const
void SetFormulaAngle(const VFormula &value)
The VToolHeight class tool for creation point of height. Help find point of projection onto line.
Definition: vtoolheight.h:75
void SetP1LineId(const quint32 &value)
QString SecondLinePointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetP2LineId(const quint32 &value)
QString FirstLinePointName() const
void SetSecondPointId(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetFirstPointId(const quint32 &value)
void SetFormulaAngle(const VFormula &value)
The VToolLineIntersect class help find point intersection lines.
QString Line2P1Name() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString Line2P2Name() const
QString Line1P1Name() const
QString Line1P2Name() const
void SetP1Line2(const quint32 &value)
void SetP2Line2(const quint32 &value)
void SetP2Line1(const quint32 &value)
void SetP1Line1(const quint32 &value)
VFormula GetFormulaLength() const
void SetAngle(const qreal &value)
QString getLineColor() const
QString BasePointName() const
qreal GetAngle() const
void SetFormulaLength(const VFormula &value)
void SetBasePointId(const quint32 &value)
void setLineColor(const QString &value)
The VToolLine class tool for creation line.
Definition: vtoolline.h:75
void SetFirstPoint(const quint32 &value)
Definition: vtoolline.cpp:573
void setLineColor(const QString &value)
Definition: vtoolline.cpp:551
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
Definition: vtoolline.cpp:502
void SetSecondPoint(const quint32 &value)
Definition: vtoolline.cpp:490
QString SecondPointName() const
Definition: vtoolline.cpp:240
void setLineWeight(const QString &value) Q_DECL_OVERRIDE
Definition: vtoolline.cpp:536
QString getLineColor() const
Definition: vtoolline.cpp:545
QString FirstPointName() const
Definition: vtoolline.cpp:234
virtual void setLineType(const QString &value) Q_DECL_OVERRIDE
Definition: vtoolline.cpp:527
void setOriginPointId(const quint32 &value)
AxisType getAxisType() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString getOriginPointName() const
void setSecondLinePointId(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString secondLinePointName() const
void setFirstLinePointId(const quint32 &value)
QString firstLinePointName() const
void setFormulaRotation(const VFormula &value)
Definition: vtoolmove.cpp:455
QString getOriginPointName() const
Definition: vtoolmove.cpp:467
VFormula getFormulaRotation() const
Definition: vtoolmove.cpp:444
void SetFormulaLength(const VFormula &value)
Definition: vtoolmove.cpp:432
VFormula GetFormulaLength() const
Definition: vtoolmove.cpp:421
void SetFormulaAngle(const VFormula &value)
Definition: vtoolmove.cpp:409
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
Definition: vtoolmove.cpp:495
void setOriginPointId(const quint32 &value)
Definition: vtoolmove.cpp:486
VFormula GetFormulaAngle() const
Definition: vtoolmove.cpp:398
The VToolNormal class tool for creation point on normal. Normal begin from first point of line.
Definition: vtoolnormal.h:74
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
QString SecondPointName() const
void SetSecondPointId(const quint32 &value)
void showOptionsToolSinglePoint(QGraphicsItem *item)
void showOptionsToolLineIntersect(QGraphicsItem *item)
void changeDataToolEndLine(VPE::VProperty *property)
void addObjectProperty(Tool *tool, const QString &pointName, const QString &propertyName, const QString &id, GOType objType)
void showOptionsToolEndLine(QGraphicsItem *item)
void userChangedData(VPE::VProperty *property)
void changeDataToolTrueDarts(VPE::VProperty *property)
void showOptionsToolSpline(QGraphicsItem *item)
void addPropertyOperationSuffix(Tool *tool, const QString &propertyName, bool readOnly=false)
void showItemOptions(QGraphicsItem *item)
void setCurveVCrossPoint(const QVariant &value)
void changeDataToolAlongLine(VPE::VProperty *property)
void showOptionsToolCutSplinePath(QGraphicsItem *item)
void showOptionsToolLineIntersectAxis(QGraphicsItem *item)
void showOptionsToolMirrorByAxis(QGraphicsItem *item)
void addPropertyLineType(Tool *tool, const QString &propertyName)
VToolOptionsPropertyBrowser(const VContainer *data, QDockWidget *parent)
void setCurveHCrossPoint(const QVariant &value)
void showOptionsToolEllipticalArc(QGraphicsItem *item)
void addPropertyCurveName(Tool *tool, const QString &propertyName, const QString &prefix, const QString &firstPoint, const QString &secondPoint, bool readOnly=false)
void showOptionsToolRotation(QGraphicsItem *item)
void setCirclesCrossPoint(const QVariant &value)
void changeDataToolNormal(VPE::VProperty *property)
void addPropertyCrossPoint(Tool *tool, const QString &propertyName)
void changeDataToolCubicBezierPath(VPE::VProperty *property)
void addPropertyLineName(Tool *tool, const QString &propertyName, bool readOnly=false)
void addProperty(VPE::VProperty *property, const QString &id)
void changeDataToolPointOfIntersectionCurves(VPE::VProperty *property)
void addPropertyObjectName(Tool *tool, const QString &propertyName, bool readOnly=false)
void showOptionsToolCutArc(QGraphicsItem *item)
void changeDataToolPointFromCircleAndTangent(VPE::VProperty *property)
void showOptionsToolPointOfIntersectionCircles(QGraphicsItem *item)
void showOptionsToolCurveIntersectAxis(QGraphicsItem *item)
void changeDataToolMove(VPE::VProperty *property)
void changeDataToolHeight(VPE::VProperty *property)
void addPropertyPointName1(Tool *tool, const QString &propertyName)
void showOptionsToolSplinePath(QGraphicsItem *item)
Type getCrossPoint(const QVariant &value)
void addPropertyAxisType(Tool *tool, const QString &propertyName)
void changeDataToolCubicBezier(VPE::VProperty *property)
QMap< QString, VPE::VProperty * > idToProperty
void changeDataToolEllipticalArc(VPE::VProperty *property)
void showOptionsToolArc(QGraphicsItem *item)
void showOptionsToolPointOfIntersection(QGraphicsItem *item)
void addPropertyLineColor(Tool *tool, const QString &propertyName, const QString &id)
void changeDataToolBisector(VPE::VProperty *property)
void changeDataToolPointOfContact(VPE::VProperty *property)
void showOptionsToolPointFromCircleAndTangent(QGraphicsItem *item)
void addPropertyParentPointName(const QString &pointName, const QString &propertyName, const QString &propertyAttribute)
void showOptionsToolAlongLine(QGraphicsItem *item)
void changeDataToolPointOfIntersectionCircles(VPE::VProperty *property)
void changeDataToolLineIntersectAxis(VPE::VProperty *property)
void addPropertyCurveLineType(Tool *tool, const QString &propertyName)
void addPropertyHCrossPoint(Tool *tool, const QString &propertyName)
void setOperationSuffix(const QString &suffix)
QMap< QString, quint32 > getObjectList(Tool *tool, GOType objType)
void showOptionsToolCubicBezierPath(QGraphicsItem *item)
void setAxisType(const QVariant &value)
void showOptionsToolTrueDarts(QGraphicsItem *item)
void changeDataToolMirrorByAxis(VPE::VProperty *property)
void showOptionsToolShoulderPoint(QGraphicsItem *item)
void addPropertyLabel(const QString &propertyName, const QString &propertyAttribute)
void changeDataToolArcWithLength(VPE::VProperty *property)
void changeDataToolTriangle(VPE::VProperty *property)
void changeDataToolCutArc(VPE::VProperty *property)
void changeDataToolSpline(VPE::VProperty *property)
void showOptionsToolPointOfIntersectionArcs(QGraphicsItem *item)
void showOptionsToolCubicBezier(QGraphicsItem *item)
void showOptionsToolNormal(QGraphicsItem *item)
void changeDataToolPointOfIntersectionArcs(VPE::VProperty *property)
void addPropertyVCrossPoint(Tool *tool, const QString &propertyName)
void changeDataToolPointOfIntersection(VPE::VProperty *property)
void changeDataToolLineIntersect(VPE::VProperty *property)
void addPropertyFormula(const QString &propertyName, const VFormula &formula, const QString &attrName)
void changeDataToolCutSplinePath(VPE::VProperty *property)
void showOptionsToolLine(QGraphicsItem *item)
void changeDataToolArc(VPE::VProperty *property)
void changeDataToolMirrorByLine(VPE::VProperty *property)
void showOptionsToolPointOfIntersectionCurves(QGraphicsItem *item)
void showOptionsToolPointOfContact(QGraphicsItem *item)
void showOptionsToolArcWithLength(QGraphicsItem *item)
void addPropertyLineWeight(Tool *tool, const QString &propertyName)
QMap< VPE::VProperty *, QString > propertyToId
void changeDataToolLine(VPE::VProperty *property)
void showOptionsToolHeight(QGraphicsItem *item)
void showOptionsToolCutSpline(QGraphicsItem *item)
void changeDataToolSplinePath(VPE::VProperty *property)
void showOptionsToolBisector(QGraphicsItem *item)
void changeDataToolCutSpline(VPE::VProperty *property)
void showOptionsToolMove(QGraphicsItem *item)
void changeDataToolCurveIntersectAxis(VPE::VProperty *property)
void addPropertyPointName2(Tool *tool, const QString &propertyName)
void showOptionsToolTriangle(QGraphicsItem *item)
void showOptionsToolMirrorByLine(QGraphicsItem *item)
void changeDataToolPointFromArcAndTangent(VPE::VProperty *property)
void showOptionsToolPointFromArcAndTangent(QGraphicsItem *item)
void changeDataToolShoulderPoint(VPE::VProperty *property)
void changeDataToolSinglePoint(VPE::VProperty *property)
void changeDataToolRotation(VPE::VProperty *property)
void SetTangentPointId(const quint32 &value)
CrossCirclesPoint GetCrossCirclesPoint() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
The VToolPointOfContact class tool for creation point intersection arc ad line.
void SetSecondPointId(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetFirstPointId(const quint32 &value)
void setArcRadius(const VFormula &value)
VFormula getArcRadius() const
QString FirstPointName() const
QString SecondPointName() const
void setCenter(const quint32 &value)
QString ArcCenterPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
CrossCirclesPoint GetCrossCirclesPoint() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
The VToolRecord class record about tool in history.
Definition: vtoolrecord.h:64
Tool getTypeTool() const
getTypeTool return tool type.
Definition: vtoolrecord.h:114
quint32 getId() const
getId return tool id.
Definition: vtoolrecord.h:94
QString getOriginPointName() const
void SetFormulaAngle(const VFormula &value)
VFormula GetFormulaAngle() const
void setOriginPointId(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
The VToolShoulderPoint class tool for creation of point Length to Line. This tool for special situati...
QString ShoulderPointName() const
void SetP2Line(const quint32 &value)
QString SecondPointName() const
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void setPShoulder(const quint32 &value)
QString name() const
The VToolSplinePath class tool for creation spline path.
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
VSplinePath getSplinePath() const
The VToolSpline class tool for creation spline. I mean bezier curve.
Definition: vtoolspline.h:74
VSpline getSpline() const
void setSpline(const VSpline &spl)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
The VToolTriangle class for tool that find point intersection two foots right triangle (triangle with...
Definition: vtooltriangle.h:75
void SetAxisP1Id(const quint32 &value)
QString SecondPointName() const
QString AxisP2Name() const
void SetSecondPointId(const quint32 &value)
QString FirstPointName() const
void SetAxisP2Id(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
void SetFirstPointId(const quint32 &value)
QString AxisP1Name() const
void SetDartP3Id(const quint32 &value)
QString DartP2Name() const
QString DartP3Name() const
void SetBaseLineP2Id(const quint32 &value)
void SetDartP2Id(const quint32 &value)
QString BaseLineP2Name() const
QString DartP1Name() const
QString BaseLineP1Name() const
void SetDartP1Id(const quint32 &value)
void SetBaseLineP1Id(const quint32 &value)
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE
const QString degreeSymbol
Definition: def.cpp:196
QString UnitsToStr(const Unit &unit, const bool translate)
UnitsToStr translate unit to string.
Definition: def.cpp:702
#define SCASSERT(cond)
Definition: def.h:317
Tool
Definition: def.h:161
@ LAST_ONE_DO_NOT_USE
const QString AttrPoint2
Definition: ifcdef.cpp:116
const QString AttrBasePoint
Definition: ifcdef.cpp:95
const QString AttrC1Radius
Definition: ifcdef.cpp:141
const QString AttrName
Definition: ifcdef.cpp:76
const QString AttrLength
Definition: ifcdef.cpp:94
const QString AttrPShoulder
Definition: ifcdef.cpp:114
const QString AttrName1
Definition: ifcdef.cpp:79
const QString AttrLineType
Definition: ifcdef.cpp:90
const QString AttrSecondPoint
Definition: ifcdef.cpp:97
const QString AttrC2Radius
Definition: ifcdef.cpp:142
const QString AttrCurve2
Definition: ifcdef.cpp:129
const QString AttrFirstPoint
Definition: ifcdef.cpp:96
const QString AttrLineWeight
Definition: ifcdef.cpp:91
const QString AttrP1Line1
Definition: ifcdef.cpp:110
const QString AttrP1Line
Definition: ifcdef.cpp:108
const QString AttrPenStyle
Definition: ifcdef.cpp:132
const QString AttrSecondArc
Definition: ifcdef.cpp:134
const QString AttrAngle
Definition: ifcdef.cpp:103
const QString AttrCurve
Definition: ifcdef.cpp:127
const QString AttrFirstArc
Definition: ifcdef.cpp:133
const QString AttrRadius2
Definition: ifcdef.cpp:102
const QString AttrCurve1
Definition: ifcdef.cpp:128
const QString AttrP2Line
Definition: ifcdef.cpp:109
const QString AttrAxisType
Definition: ifcdef.cpp:138
const QString AttrC1Center
Definition: ifcdef.cpp:139
const QString AttrCrossPoint
Definition: ifcdef.cpp:135
QMap< QString, QString > lineTypeList()
Definition: ifcdef.cpp:239
const QString AttrTangent
Definition: ifcdef.cpp:144
const QString AttrPoint3
Definition: ifcdef.cpp:117
const QString AttrDartP2
Definition: ifcdef.cpp:86
const QString AttrLength2
Definition: ifcdef.cpp:107
QMap< QString, QString > curveLineTypeList()
Definition: ifcdef.cpp:231
const QString AttrPoint1
Definition: ifcdef.cpp:115
const QString AttrAxisP2
Definition: ifcdef.cpp:126
const QString AttrRotationAngle
Definition: ifcdef.cpp:151
const QString AttrDartP1
Definition: ifcdef.cpp:85
const QString LineTypeNone
Definition: ifcdef.cpp:158
const QString AttrRadius1
Definition: ifcdef.cpp:101
const QString AttrObjName
Definition: ifcdef.cpp:92
const QString AttrRadius
Definition: ifcdef.cpp:100
const QString AttrName2
Definition: ifcdef.cpp:82
const QString AttrHCrossPoint
Definition: ifcdef.cpp:137
const QString AttrLength1
Definition: ifcdef.cpp:106
const QString AttrC2Center
Definition: ifcdef.cpp:140
const QString AttrKCurve
Definition: ifcdef.cpp:121
const QString AttrThirdPoint
Definition: ifcdef.cpp:98
const QString AttrVCrossPoint
Definition: ifcdef.cpp:136
const QString AttrDartP3
Definition: ifcdef.cpp:87
const QString AttrAxisP1
Definition: ifcdef.cpp:125
const QString AttrCRadius
Definition: ifcdef.cpp:145
const QString AttrLineColor
Definition: ifcdef.cpp:130
const QString AttrAngle2
Definition: ifcdef.cpp:105
const QString AttrP2Line2
Definition: ifcdef.cpp:113
const QString AttrP1Line2
Definition: ifcdef.cpp:112
const QString AttrPoint4
Definition: ifcdef.cpp:118
const QString AttrColor
Definition: ifcdef.cpp:131
const QString AttrSuffix
Definition: ifcdef.cpp:147
const QString AttrP2Line1
Definition: ifcdef.cpp:111
const QString AttrCCenter
Definition: ifcdef.cpp:143
const QString AttrArc
Definition: ifcdef.cpp:146
QMap< QString, QString > lineWeightList()
Definition: ifcdef.cpp:276
const QString AttrAngle1
Definition: ifcdef.cpp:104
const QString AttrCenter
Definition: ifcdef.cpp:99
#define NULL_ID
Definition: ifcdef.h:76
QString NameRegExp()
Definition: qmudef.cpp:281
#define qApp
Definition: vapplication.h:67
GOType
Definition: vgeometrydef.h:56
@ CubicBezierPath
@ SplinePath
@ EllipticalArc
@ CubicBezier
@ Calculation