From bfaeddfc85d4349559ac9f91a01b7195f67f3d0d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 18 Jun 2015 20:23:24 +0300 Subject: [PATCH] VTools static library. --HG-- branch : feature --- share/translations.pro | 5 +- src/app/app.pri | 3 - src/app/app.pro | 45 ++++--- src/app/core/vapplication.cpp | 73 +---------- src/app/core/vapplication.h | 80 ----------- src/app/core/vformulapropertyeditor.cpp | 2 +- src/app/core/vtooloptionspropertybrowser.cpp | 4 +- src/app/dialogs/app/dialoghistory.cpp | 8 +- src/app/dialogs/app/dialoghistory.h | 2 +- src/app/dialogs/app/dialogincrements.cpp | 2 + src/app/dialogs/app/dialogincrements.h | 2 +- src/app/dialogs/dialogs.h | 28 ---- src/app/dialogs/dialogs.pri | 95 +------------- src/app/mainwindow.h | 1 + src/app/options.cpp | 4 - src/app/options.h | 6 - src/app/xml/vpattern.cpp | 30 +++-- src/app/xml/vpattern.h | 7 +- src/libs/ifc/ifcdef.cpp | 111 ---------------- src/libs/ifc/ifcdef.h | 10 +- src/libs/ifc/xml/vabstractpattern.h | 7 + src/libs/ifc/xml/vdomdocument.h | 2 +- src/libs/libs.pro | 5 +- src/libs/vgeometry/vgeometry.pro | 9 -- src/libs/vmisc/def.cpp | 124 ++++++++++++++++++ src/libs/vmisc/def.h | 16 +++ src/libs/vmisc/vabstractapplication.cpp | 68 +++++++++- src/libs/vmisc/vabstractapplication.h | 94 ++++++++++++- src/libs/vpatterndb/vcontainer.cpp | 4 +- src/libs/vpatterndb/vcontainer.h | 2 +- src/libs/vtools/dialogs/dialogs.pri | 98 ++++++++++++++ .../support}/dialogeditwrongformula.cpp | 7 +- .../dialogs/support}/dialogeditwrongformula.h | 2 +- .../support}/dialogeditwrongformula.ui | 0 .../vtools/dialogs/support}/dialogundo.cpp | 4 +- .../vtools/dialogs/support}/dialogundo.h | 0 .../vtools/dialogs/support}/dialogundo.ui | 0 src/libs/vtools/dialogs/tooldialogs.h | 63 +++++++++ .../vtools}/dialogs/tools/dialogalongline.cpp | 5 +- .../vtools}/dialogs/tools/dialogalongline.h | 0 .../vtools}/dialogs/tools/dialogalongline.ui | 0 .../vtools}/dialogs/tools/dialogarc.cpp | 9 +- .../vtools}/dialogs/tools/dialogarc.h | 0 .../vtools}/dialogs/tools/dialogarc.ui | 0 .../dialogs/tools/dialogarcwithlength.cpp | 9 +- .../dialogs/tools/dialogarcwithlength.h | 0 .../dialogs/tools/dialogarcwithlength.ui | 0 .../vtools}/dialogs/tools/dialogbisector.cpp | 9 +- .../vtools}/dialogs/tools/dialogbisector.h | 0 .../vtools}/dialogs/tools/dialogbisector.ui | 0 .../tools/dialogcurveintersectaxis.cpp | 9 +- .../dialogs/tools/dialogcurveintersectaxis.h | 0 .../dialogs/tools/dialogcurveintersectaxis.ui | 0 .../vtools}/dialogs/tools/dialogcutarc.cpp | 10 +- .../vtools}/dialogs/tools/dialogcutarc.h | 0 .../vtools}/dialogs/tools/dialogcutarc.ui | 0 .../vtools}/dialogs/tools/dialogcutspline.cpp | 8 +- .../vtools}/dialogs/tools/dialogcutspline.h | 0 .../vtools}/dialogs/tools/dialogcutspline.ui | 0 .../dialogs/tools/dialogcutsplinepath.cpp | 8 +- .../dialogs/tools/dialogcutsplinepath.h | 0 .../dialogs/tools/dialogcutsplinepath.ui | 0 .../vtools}/dialogs/tools/dialogdetail.cpp | 11 +- .../vtools}/dialogs/tools/dialogdetail.h | 0 .../vtools}/dialogs/tools/dialogdetail.ui | 0 .../vtools}/dialogs/tools/dialogendline.cpp | 9 +- .../vtools}/dialogs/tools/dialogendline.h | 0 .../vtools}/dialogs/tools/dialogendline.ui | 0 .../vtools}/dialogs/tools/dialogheight.cpp | 0 .../vtools}/dialogs/tools/dialogheight.h | 0 .../vtools}/dialogs/tools/dialogheight.ui | 0 .../vtools}/dialogs/tools/dialogline.cpp | 7 +- .../vtools}/dialogs/tools/dialogline.h | 0 .../vtools}/dialogs/tools/dialogline.ui | 0 .../dialogs/tools/dialoglineintersect.cpp | 1 - .../dialogs/tools/dialoglineintersect.h | 0 .../dialogs/tools/dialoglineintersect.ui | 0 .../dialogs/tools/dialoglineintersectaxis.cpp | 9 +- .../dialogs/tools/dialoglineintersectaxis.h | 0 .../dialogs/tools/dialoglineintersectaxis.ui | 0 .../vtools}/dialogs/tools/dialognormal.cpp | 5 +- .../vtools}/dialogs/tools/dialognormal.h | 0 .../vtools}/dialogs/tools/dialognormal.ui | 0 .../tools/dialogpointfromarcandtangent.cpp | 0 .../tools/dialogpointfromarcandtangent.h | 0 .../tools/dialogpointfromarcandtangent.ui | 0 .../tools/dialogpointfromcircleandtangent.cpp | 9 +- .../tools/dialogpointfromcircleandtangent.h | 0 .../tools/dialogpointfromcircleandtangent.ui | 0 .../dialogs/tools/dialogpointofcontact.cpp | 10 +- .../dialogs/tools/dialogpointofcontact.h | 0 .../dialogs/tools/dialogpointofcontact.ui | 0 .../tools/dialogpointofintersection.cpp | 7 +- .../dialogs/tools/dialogpointofintersection.h | 0 .../tools/dialogpointofintersection.ui | 0 .../tools/dialogpointofintersectionarcs.cpp | 0 .../tools/dialogpointofintersectionarcs.h | 1 - .../tools/dialogpointofintersectionarcs.ui | 0 .../dialogpointofintersectioncircles.cpp | 9 +- .../tools/dialogpointofintersectioncircles.h | 1 - .../tools/dialogpointofintersectioncircles.ui | 0 .../dialogs/tools/dialogshoulderpoint.cpp | 9 +- .../dialogs/tools/dialogshoulderpoint.h | 0 .../dialogs/tools/dialogshoulderpoint.ui | 0 .../dialogs/tools/dialogsinglepoint.cpp | 0 .../vtools}/dialogs/tools/dialogsinglepoint.h | 0 .../dialogs/tools/dialogsinglepoint.ui | 0 .../vtools}/dialogs/tools/dialogspline.cpp | 0 .../vtools}/dialogs/tools/dialogspline.h | 0 .../vtools}/dialogs/tools/dialogspline.ui | 0 .../dialogs/tools/dialogsplinepath.cpp | 0 .../vtools}/dialogs/tools/dialogsplinepath.h | 0 .../vtools}/dialogs/tools/dialogsplinepath.ui | 0 .../vtools}/dialogs/tools/dialogtool.cpp | 17 ++- .../vtools}/dialogs/tools/dialogtool.h | 8 +- .../vtools}/dialogs/tools/dialogtriangle.cpp | 7 +- .../vtools}/dialogs/tools/dialogtriangle.h | 0 .../vtools}/dialogs/tools/dialogtriangle.ui | 0 .../dialogs/tools/dialoguniondetails.cpp | 0 .../dialogs/tools/dialoguniondetails.h | 0 .../dialogs/tools/dialoguniondetails.ui | 0 src/libs/vtools/stable.cpp | 30 +++++ src/libs/vtools/stable.h | 82 ++++++++++++ .../vtools}/tools/drawTools/drawtools.h | 0 .../tools/drawTools/vabstractspline.cpp | 2 +- .../vtools}/tools/drawTools/vabstractspline.h | 5 +- .../vtools}/tools/drawTools/vdrawtool.cpp | 22 ++-- .../vtools}/tools/drawTools/vdrawtool.h | 9 +- .../tools/drawTools/vtoolalongline.cpp | 14 +- .../vtools}/tools/drawTools/vtoolalongline.h | 8 +- .../vtools}/tools/drawTools/vtoolarc.cpp | 14 +- .../vtools}/tools/drawTools/vtoolarc.h | 6 +- .../tools/drawTools/vtoolarcwithlength.cpp | 13 +- .../tools/drawTools/vtoolarcwithlength.h | 9 +- .../vtools}/tools/drawTools/vtoolbisector.cpp | 12 +- .../vtools}/tools/drawTools/vtoolbisector.h | 9 +- .../drawTools/vtoolcurveintersectaxis.cpp | 17 ++- .../tools/drawTools/vtoolcurveintersectaxis.h | 6 +- .../vtools}/tools/drawTools/vtoolcut.cpp | 2 +- .../vtools}/tools/drawTools/vtoolcut.h | 5 +- .../vtools}/tools/drawTools/vtoolcutarc.cpp | 14 +- .../vtools}/tools/drawTools/vtoolcutarc.h | 8 +- .../tools/drawTools/vtoolcutspline.cpp | 13 +- .../vtools}/tools/drawTools/vtoolcutspline.h | 8 +- .../tools/drawTools/vtoolcutsplinepath.cpp | 13 +- .../tools/drawTools/vtoolcutsplinepath.h | 8 +- .../vtools}/tools/drawTools/vtoolendline.cpp | 17 ++- .../vtools}/tools/drawTools/vtoolendline.h | 9 +- .../vtools}/tools/drawTools/vtoolheight.cpp | 7 +- .../vtools}/tools/drawTools/vtoolheight.h | 8 +- .../vtools}/tools/drawTools/vtoolline.cpp | 7 +- .../vtools}/tools/drawTools/vtoolline.h | 7 +- .../tools/drawTools/vtoollineintersect.cpp | 6 +- .../tools/drawTools/vtoollineintersect.h | 8 +- .../drawTools/vtoollineintersectaxis.cpp | 16 ++- .../tools/drawTools/vtoollineintersectaxis.h | 7 +- .../tools/drawTools/vtoollinepoint.cpp | 2 +- .../vtools}/tools/drawTools/vtoollinepoint.h | 4 +- .../vtools}/tools/drawTools/vtoolnormal.cpp | 12 +- .../vtools}/tools/drawTools/vtoolnormal.h | 8 +- .../vtools}/tools/drawTools/vtoolpoint.cpp | 2 +- .../vtools}/tools/drawTools/vtoolpoint.h | 2 +- .../drawTools/vtoolpointfromarcandtangent.cpp | 6 +- .../drawTools/vtoolpointfromarcandtangent.h | 7 +- .../vtoolpointfromcircleandtangent.cpp | 7 +- .../vtoolpointfromcircleandtangent.h | 7 +- .../tools/drawTools/vtoolpointofcontact.cpp | 13 +- .../tools/drawTools/vtoolpointofcontact.h | 16 ++- .../drawTools/vtoolpointofintersection.cpp | 8 +- .../drawTools/vtoolpointofintersection.h | 6 +- .../vtoolpointofintersectionarcs.cpp | 6 +- .../drawTools/vtoolpointofintersectionarcs.h | 7 +- .../vtoolpointofintersectioncircles.cpp | 7 +- .../vtoolpointofintersectioncircles.h | 8 +- .../tools/drawTools/vtoolshoulderpoint.cpp | 12 +- .../tools/drawTools/vtoolshoulderpoint.h | 8 +- .../tools/drawTools/vtoolsinglepoint.cpp | 21 ++- .../tools/drawTools/vtoolsinglepoint.h | 2 +- .../vtools}/tools/drawTools/vtoolspline.cpp | 11 +- .../vtools}/tools/drawTools/vtoolspline.h | 7 +- .../tools/drawTools/vtoolsplinepath.cpp | 9 +- .../vtools}/tools/drawTools/vtoolsplinepath.h | 11 +- .../vtools}/tools/drawTools/vtooltriangle.cpp | 7 +- .../vtools}/tools/drawTools/vtooltriangle.h | 8 +- .../vtools}/tools/nodeDetails/nodedetails.h | 0 .../tools/nodeDetails/vabstractnode.cpp | 7 +- .../vtools}/tools/nodeDetails/vabstractnode.h | 2 +- .../vtools}/tools/nodeDetails/vnodearc.cpp | 8 +- .../vtools}/tools/nodeDetails/vnodearc.h | 5 +- .../vtools}/tools/nodeDetails/vnodepoint.cpp | 10 +- .../vtools}/tools/nodeDetails/vnodepoint.h | 5 +- .../vtools}/tools/nodeDetails/vnodespline.cpp | 9 +- .../vtools}/tools/nodeDetails/vnodespline.h | 6 +- .../tools/nodeDetails/vnodesplinepath.cpp | 8 +- .../tools/nodeDetails/vnodesplinepath.h | 5 +- src/{app => libs/vtools}/tools/tools.h | 0 src/{app => libs/vtools}/tools/tools.pri | 0 .../vtools}/tools/vabstracttool.cpp | 14 +- .../vtools}/tools/vabstracttool.h | 6 +- src/{app => libs/vtools}/tools/vdatatool.cpp | 0 src/{app => libs/vtools}/tools/vdatatool.h | 2 +- .../vtools}/tools/vtooldetail.cpp | 26 ++-- src/{app => libs/vtools}/tools/vtooldetail.h | 7 +- .../vtools}/tools/vtooluniondetails.cpp | 18 +-- .../vtools}/tools/vtooluniondetails.h | 13 +- .../vtools}/undocommands/adddet.cpp | 0 .../vtools}/undocommands/adddet.h | 0 .../vtools}/undocommands/adddetnode.cpp | 0 .../vtools}/undocommands/adddetnode.h | 0 .../vtools}/undocommands/addpatternpiece.cpp | 0 .../vtools}/undocommands/addpatternpiece.h | 0 .../vtools}/undocommands/addtocalc.cpp | 5 +- .../vtools}/undocommands/addtocalc.h | 0 .../vtools}/undocommands/adduniondetails.cpp | 0 .../vtools}/undocommands/adduniondetails.h | 0 .../vtools}/undocommands/deletedetail.cpp | 2 +- .../vtools}/undocommands/deletedetail.h | 0 .../undocommands/deletepatternpiece.cpp | 0 .../vtools}/undocommands/deletepatternpiece.h | 0 .../vtools}/undocommands/deltool.cpp | 0 .../vtools}/undocommands/deltool.h | 0 .../vtools}/undocommands/movedetail.cpp | 5 +- .../vtools}/undocommands/movedetail.h | 0 .../vtools}/undocommands/movelabel.cpp | 5 +- .../vtools}/undocommands/movelabel.h | 0 .../vtools}/undocommands/movespline.cpp | 2 + .../vtools}/undocommands/movespline.h | 2 +- .../vtools}/undocommands/movesplinepath.cpp | 0 .../vtools}/undocommands/movesplinepath.h | 2 +- .../vtools}/undocommands/movespoint.cpp | 5 +- .../vtools}/undocommands/movespoint.h | 0 .../vtools}/undocommands/renamepp.cpp | 1 - .../vtools}/undocommands/renamepp.h | 0 .../undocommands/savedetailoptions.cpp | 2 + .../vtools}/undocommands/savedetailoptions.h | 0 .../vtools}/undocommands/savetooloptions.cpp | 1 - .../vtools}/undocommands/savetooloptions.h | 0 .../vtools}/undocommands/undocommands.pri | 0 .../vtools}/undocommands/vundocommand.cpp | 0 .../vtools}/undocommands/vundocommand.h | 4 +- .../vtools}/visualization/visline.cpp | 0 .../vtools}/visualization/visline.h | 0 .../vtools}/visualization/vispath.cpp | 0 .../vtools}/visualization/vispath.h | 0 .../visualization/vistoolalongline.cpp | 4 +- .../vtools}/visualization/vistoolalongline.h | 0 .../vtools}/visualization/vistoolarc.cpp | 6 +- .../vtools}/visualization/vistoolarc.h | 0 .../visualization/vistoolarcwithlength.cpp | 6 +- .../visualization/vistoolarcwithlength.h | 0 .../vtools}/visualization/vistoolbisector.cpp | 4 +- .../vtools}/visualization/vistoolbisector.h | 0 .../vistoolcurveintersectaxis.cpp | 4 +- .../visualization/vistoolcurveintersectaxis.h | 0 .../vtools}/visualization/vistoolcutarc.cpp | 4 +- .../vtools}/visualization/vistoolcutarc.h | 0 .../visualization/vistoolcutspline.cpp | 4 +- .../vtools}/visualization/vistoolcutspline.h | 0 .../visualization/vistoolcutsplinepath.cpp | 4 +- .../visualization/vistoolcutsplinepath.h | 0 .../vtools}/visualization/vistoolendline.cpp | 4 +- .../vtools}/visualization/vistoolendline.h | 0 .../vtools}/visualization/vistoolheight.cpp | 2 +- .../vtools}/visualization/vistoolheight.h | 0 .../vtools}/visualization/vistoolline.cpp | 4 +- .../vtools}/visualization/vistoolline.h | 0 .../visualization/vistoollineintersect.cpp | 4 +- .../visualization/vistoollineintersect.h | 0 .../vistoollineintersectaxis.cpp | 4 +- .../visualization/vistoollineintersectaxis.h | 0 .../vtools}/visualization/vistoolnormal.cpp | 2 +- .../vtools}/visualization/vistoolnormal.h | 0 .../vistoolpointfromarcandtangent.cpp | 6 +- .../vistoolpointfromarcandtangent.h | 2 +- .../vistoolpointfromcircleandtangent.cpp | 4 +- .../vistoolpointfromcircleandtangent.h | 2 +- .../visualization/vistoolpointofcontact.cpp | 2 +- .../visualization/vistoolpointofcontact.h | 0 .../vistoolpointofintersection.cpp | 4 +- .../vistoolpointofintersection.h | 0 .../vistoolpointofintersectionarcs.cpp | 7 +- .../vistoolpointofintersectionarcs.h | 4 +- .../vistoolpointofintersectioncircles.cpp | 4 +- .../vistoolpointofintersectioncircles.h | 2 +- .../visualization/vistoolshoulderpoint.cpp | 2 +- .../visualization/vistoolshoulderpoint.h | 0 .../vtools}/visualization/vistoolspline.cpp | 6 +- .../vtools}/visualization/vistoolspline.h | 0 .../visualization/vistoolsplinepath.cpp | 0 .../vtools}/visualization/vistoolsplinepath.h | 2 +- .../vtools}/visualization/vistooltriangle.cpp | 4 +- .../vtools}/visualization/vistooltriangle.h | 0 .../vtools}/visualization/visualization.cpp | 5 +- .../vtools}/visualization/visualization.h | 4 +- .../vtools}/visualization/visualization.pri | 0 src/libs/vtools/vtools.pri | 13 ++ src/libs/vtools/vtools.pro | 106 +++++++++++++++ src/libs/vwidgets/stable.h | 2 +- 298 files changed, 1333 insertions(+), 946 deletions(-) create mode 100644 src/libs/vtools/dialogs/dialogs.pri rename src/{app/dialogs/tools => libs/vtools/dialogs/support}/dialogeditwrongformula.cpp (98%) rename src/{app/dialogs/tools => libs/vtools/dialogs/support}/dialogeditwrongformula.h (99%) rename src/{app/dialogs/tools => libs/vtools/dialogs/support}/dialogeditwrongformula.ui (100%) rename src/{app/dialogs/app => libs/vtools/dialogs/support}/dialogundo.cpp (96%) rename src/{app/dialogs/app => libs/vtools/dialogs/support}/dialogundo.h (100%) rename src/{app/dialogs/app => libs/vtools/dialogs/support}/dialogundo.ui (100%) create mode 100644 src/libs/vtools/dialogs/tooldialogs.h rename src/{app => libs/vtools}/dialogs/tools/dialogalongline.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogalongline.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogalongline.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogarc.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogarc.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogarc.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogarcwithlength.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogarcwithlength.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogarcwithlength.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogbisector.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogbisector.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogbisector.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcurveintersectaxis.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogcurveintersectaxis.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcurveintersectaxis.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutarc.cpp (97%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutarc.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutarc.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutspline.cpp (97%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutspline.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutspline.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutsplinepath.cpp (97%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutsplinepath.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogcutsplinepath.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogdetail.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogdetail.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogdetail.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogendline.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogendline.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogendline.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogheight.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogheight.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogheight.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogline.cpp (97%) rename src/{app => libs/vtools}/dialogs/tools/dialogline.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogline.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersect.cpp (99%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersect.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersect.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersectaxis.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersectaxis.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoglineintersectaxis.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialognormal.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialognormal.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialognormal.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromarcandtangent.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromarcandtangent.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromarcandtangent.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromcircleandtangent.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromcircleandtangent.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointfromcircleandtangent.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofcontact.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofcontact.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofcontact.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersection.cpp (97%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersection.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersection.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectionarcs.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectionarcs.h (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectionarcs.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectioncircles.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectioncircles.h (99%) rename src/{app => libs/vtools}/dialogs/tools/dialogpointofintersectioncircles.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogshoulderpoint.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogshoulderpoint.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogshoulderpoint.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsinglepoint.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsinglepoint.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsinglepoint.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogspline.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogspline.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogspline.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsplinepath.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsplinepath.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogsplinepath.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogtool.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogtool.h (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogtriangle.cpp (98%) rename src/{app => libs/vtools}/dialogs/tools/dialogtriangle.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialogtriangle.ui (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoguniondetails.cpp (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoguniondetails.h (100%) rename src/{app => libs/vtools}/dialogs/tools/dialoguniondetails.ui (100%) create mode 100644 src/libs/vtools/stable.cpp create mode 100644 src/libs/vtools/stable.h rename src/{app => libs/vtools}/tools/drawTools/drawtools.h (100%) rename src/{app => libs/vtools}/tools/drawTools/vabstractspline.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vabstractspline.h (96%) rename src/{app => libs/vtools}/tools/drawTools/vdrawtool.cpp (94%) rename src/{app => libs/vtools}/tools/drawTools/vdrawtool.h (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolalongline.cpp (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolalongline.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolarc.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolarc.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoolarcwithlength.cpp (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolarcwithlength.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolbisector.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolbisector.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcurveintersectaxis.cpp (95%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcurveintersectaxis.h (94%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcut.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcut.h (95%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutarc.cpp (95%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutarc.h (88%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutspline.cpp (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutspline.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutsplinepath.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolcutsplinepath.h (90%) rename src/{app => libs/vtools}/tools/drawTools/vtoolendline.cpp (94%) rename src/{app => libs/vtools}/tools/drawTools/vtoolendline.h (87%) rename src/{app => libs/vtools}/tools/drawTools/vtoolheight.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolheight.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolline.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolline.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoollineintersect.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoollineintersect.h (91%) rename src/{app => libs/vtools}/tools/drawTools/vtoollineintersectaxis.cpp (95%) rename src/{app => libs/vtools}/tools/drawTools/vtoollineintersectaxis.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoollinepoint.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoollinepoint.h (94%) rename src/{app => libs/vtools}/tools/drawTools/vtoolnormal.cpp (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolnormal.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpoint.cpp (99%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpoint.h (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointfromarcandtangent.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointfromarcandtangent.h (93%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointfromcircleandtangent.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointfromcircleandtangent.h (93%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofcontact.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofcontact.h (79%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersection.cpp (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersection.h (93%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersectionarcs.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersectionarcs.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersectioncircles.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolpointofintersectioncircles.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoolshoulderpoint.cpp (97%) rename src/{app => libs/vtools}/tools/drawTools/vtoolshoulderpoint.h (91%) rename src/{app => libs/vtools}/tools/drawTools/vtoolsinglepoint.cpp (94%) rename src/{app => libs/vtools}/tools/drawTools/vtoolsinglepoint.h (96%) rename src/{app => libs/vtools}/tools/drawTools/vtoolspline.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolspline.h (92%) rename src/{app => libs/vtools}/tools/drawTools/vtoolsplinepath.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtoolsplinepath.h (89%) rename src/{app => libs/vtools}/tools/drawTools/vtooltriangle.cpp (98%) rename src/{app => libs/vtools}/tools/drawTools/vtooltriangle.h (92%) rename src/{app => libs/vtools}/tools/nodeDetails/nodedetails.h (100%) rename src/{app => libs/vtools}/tools/nodeDetails/vabstractnode.cpp (96%) rename src/{app => libs/vtools}/tools/nodeDetails/vabstractnode.h (95%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodearc.cpp (96%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodearc.h (90%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodepoint.cpp (97%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodepoint.h (92%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodespline.cpp (96%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodespline.h (89%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodesplinepath.cpp (96%) rename src/{app => libs/vtools}/tools/nodeDetails/vnodesplinepath.h (90%) rename src/{app => libs/vtools}/tools/tools.h (100%) rename src/{app => libs/vtools}/tools/tools.pri (100%) rename src/{app => libs/vtools}/tools/vabstracttool.cpp (98%) rename src/{app => libs/vtools}/tools/vabstracttool.h (98%) rename src/{app => libs/vtools}/tools/vdatatool.cpp (100%) rename src/{app => libs/vtools}/tools/vdatatool.h (98%) rename src/{app => libs/vtools}/tools/vtooldetail.cpp (97%) rename src/{app => libs/vtools}/tools/vtooldetail.h (94%) rename src/{app => libs/vtools}/tools/vtooluniondetails.cpp (98%) rename src/{app => libs/vtools}/tools/vtooluniondetails.h (89%) rename src/{app => libs/vtools}/undocommands/adddet.cpp (100%) rename src/{app => libs/vtools}/undocommands/adddet.h (100%) rename src/{app => libs/vtools}/undocommands/adddetnode.cpp (100%) rename src/{app => libs/vtools}/undocommands/adddetnode.h (100%) rename src/{app => libs/vtools}/undocommands/addpatternpiece.cpp (100%) rename src/{app => libs/vtools}/undocommands/addpatternpiece.h (100%) rename src/{app => libs/vtools}/undocommands/addtocalc.cpp (97%) rename src/{app => libs/vtools}/undocommands/addtocalc.h (100%) rename src/{app => libs/vtools}/undocommands/adduniondetails.cpp (100%) rename src/{app => libs/vtools}/undocommands/adduniondetails.h (100%) rename src/{app => libs/vtools}/undocommands/deletedetail.cpp (98%) rename src/{app => libs/vtools}/undocommands/deletedetail.h (100%) rename src/{app => libs/vtools}/undocommands/deletepatternpiece.cpp (100%) rename src/{app => libs/vtools}/undocommands/deletepatternpiece.h (100%) rename src/{app => libs/vtools}/undocommands/deltool.cpp (100%) rename src/{app => libs/vtools}/undocommands/deltool.h (100%) rename src/{app => libs/vtools}/undocommands/movedetail.cpp (99%) rename src/{app => libs/vtools}/undocommands/movedetail.h (100%) rename src/{app => libs/vtools}/undocommands/movelabel.cpp (98%) rename src/{app => libs/vtools}/undocommands/movelabel.h (100%) rename src/{app => libs/vtools}/undocommands/movespline.cpp (98%) rename src/{app => libs/vtools}/undocommands/movespline.h (98%) rename src/{app => libs/vtools}/undocommands/movesplinepath.cpp (100%) rename src/{app => libs/vtools}/undocommands/movesplinepath.h (98%) rename src/{app => libs/vtools}/undocommands/movespoint.cpp (99%) rename src/{app => libs/vtools}/undocommands/movespoint.h (100%) rename src/{app => libs/vtools}/undocommands/renamepp.cpp (99%) rename src/{app => libs/vtools}/undocommands/renamepp.h (100%) rename src/{app => libs/vtools}/undocommands/savedetailoptions.cpp (99%) rename src/{app => libs/vtools}/undocommands/savedetailoptions.h (100%) rename src/{app => libs/vtools}/undocommands/savetooloptions.cpp (99%) rename src/{app => libs/vtools}/undocommands/savetooloptions.h (100%) rename src/{app => libs/vtools}/undocommands/undocommands.pri (100%) rename src/{app => libs/vtools}/undocommands/vundocommand.cpp (100%) rename src/{app => libs/vtools}/undocommands/vundocommand.h (97%) rename src/{app => libs/vtools}/visualization/visline.cpp (100%) rename src/{app => libs/vtools}/visualization/visline.h (100%) rename src/{app => libs/vtools}/visualization/vispath.cpp (100%) rename src/{app => libs/vtools}/visualization/vispath.h (100%) rename src/{app => libs/vtools}/visualization/vistoolalongline.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolalongline.h (100%) rename src/{app => libs/vtools}/visualization/vistoolarc.cpp (96%) rename src/{app => libs/vtools}/visualization/vistoolarc.h (100%) rename src/{app => libs/vtools}/visualization/vistoolarcwithlength.cpp (96%) rename src/{app => libs/vtools}/visualization/vistoolarcwithlength.h (100%) rename src/{app => libs/vtools}/visualization/vistoolbisector.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoolbisector.h (100%) rename src/{app => libs/vtools}/visualization/vistoolcurveintersectaxis.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoolcurveintersectaxis.h (100%) rename src/{app => libs/vtools}/visualization/vistoolcutarc.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolcutarc.h (100%) rename src/{app => libs/vtools}/visualization/vistoolcutspline.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolcutspline.h (100%) rename src/{app => libs/vtools}/visualization/vistoolcutsplinepath.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoolcutsplinepath.h (100%) rename src/{app => libs/vtools}/visualization/vistoolendline.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolendline.h (100%) rename src/{app => libs/vtools}/visualization/vistoolheight.cpp (99%) rename src/{app => libs/vtools}/visualization/vistoolheight.h (100%) rename src/{app => libs/vtools}/visualization/vistoolline.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolline.h (100%) rename src/{app => libs/vtools}/visualization/vistoollineintersect.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoollineintersect.h (100%) rename src/{app => libs/vtools}/visualization/vistoollineintersectaxis.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoollineintersectaxis.h (100%) rename src/{app => libs/vtools}/visualization/vistoolnormal.cpp (99%) rename src/{app => libs/vtools}/visualization/vistoolnormal.h (100%) rename src/{app => libs/vtools}/visualization/vistoolpointfromarcandtangent.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolpointfromarcandtangent.h (98%) rename src/{app => libs/vtools}/visualization/vistoolpointfromcircleandtangent.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoolpointfromcircleandtangent.h (98%) rename src/{app => libs/vtools}/visualization/vistoolpointofcontact.cpp (99%) rename src/{app => libs/vtools}/visualization/vistoolpointofcontact.h (100%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersection.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersection.h (100%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersectionarcs.cpp (96%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersectionarcs.h (96%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersectioncircles.cpp (98%) rename src/{app => libs/vtools}/visualization/vistoolpointofintersectioncircles.h (98%) rename src/{app => libs/vtools}/visualization/vistoolshoulderpoint.cpp (99%) rename src/{app => libs/vtools}/visualization/vistoolshoulderpoint.h (100%) rename src/{app => libs/vtools}/visualization/vistoolspline.cpp (97%) rename src/{app => libs/vtools}/visualization/vistoolspline.h (100%) rename src/{app => libs/vtools}/visualization/vistoolsplinepath.cpp (100%) rename src/{app => libs/vtools}/visualization/vistoolsplinepath.h (98%) rename src/{app => libs/vtools}/visualization/vistooltriangle.cpp (98%) rename src/{app => libs/vtools}/visualization/vistooltriangle.h (100%) rename src/{app => libs/vtools}/visualization/visualization.cpp (98%) rename src/{app => libs/vtools}/visualization/visualization.h (97%) rename src/{app => libs/vtools}/visualization/visualization.pri (100%) create mode 100644 src/libs/vtools/vtools.pri create mode 100644 src/libs/vtools/vtools.pro diff --git a/share/translations.pro b/share/translations.pro index 7ea6a416b..3dffe4e10 100644 --- a/share/translations.pro +++ b/share/translations.pro @@ -16,7 +16,8 @@ DEPENDPATH += \ ../src/libs/vlayout \ ../src/libs/vgeometry \ ../src/libs/vpatterndb \ - ../src/libs/vmisc + ../src/libs/vmisc \ + ../src/libs/vtools include(../src/app/app.pri) include(../src/libs/qmuparser/qmuparser.pri) @@ -26,6 +27,8 @@ include(../src/libs/vobj/vobj.pri) include(../src/libs/vlayout/vlayout.pri) include(../src/libs/vgeometry/vgeometry.pri) include(../src/libs/vpatterndb/vpatterndb.pri) +include(../src/libs/vmisc/vmisc.pri) +include(../src/libs/vtools/vtools.pri) # Add here path to new translation file with name "valentina_*_*.ts" if you want to add new language. # Same paths in variable INSTALL_TRANSLATIONS (app.pro). diff --git a/src/app/app.pri b/src/app/app.pri index 807bc2eae..b1d37898b 100644 --- a/src/app/app.pri +++ b/src/app/app.pri @@ -1,9 +1,6 @@ # Suport subdirectories. Just better project code tree. include(dialogs/dialogs.pri) -include(tools/tools.pri) include(xml/xml.pri) -include(undocommands/undocommands.pri) -include(visualization/visualization.pri) include(core/core.pri) # ADD TO EACH PATH $$PWD VARIABLE!!!!!! diff --git a/src/app/app.pro b/src/app/app.pro index bb1af6526..b9b809e4e 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -83,6 +83,7 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${UI_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + -isystem "$${OUT_PWD}/../libs/vtools/$${UI_DIR}" \ # For VTools UI files $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer @@ -101,6 +102,7 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${UI_DIR}" \ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + -isystem "$${OUT_PWD}/../libs/vtools/$${UI_DIR}" \ # For VTools UI files $$CLANG_DEBUG_CXXFLAGS # See Valentina.pri for more details. # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and @@ -560,6 +562,27 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer DEPENDPATH += $${PWD}/../libs/vpropertyexplorer +# When the GNU linker sees a library, it discards all symbols that it doesn't need. +# Add dependent library the first. + +#VPatternDB static library (depend on vgeometry) +unix|win32: LIBS += -L$$OUT_PWD/../libs/vpatterndb/$${DESTDIR} -lvpatterndb + +INCLUDEPATH += $$PWD/../libs/vpatterndb +DEPENDPATH += $$PWD/../libs/vpatterndb + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a + +# VGeometry static library (depend on ifc) +unix|win32: LIBS += -L$$OUT_PWD/../libs/vgeometry/$${DESTDIR}/ -lvgeometry + +INCLUDEPATH += $$PWD/../libs/vgeometry +DEPENDPATH += $$PWD/../libs/vgeometry + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/vgeometry.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/libvgeometry.a + # IFC static library unix|win32: LIBS += -L$$OUT_PWD/../libs/ifc/$${DESTDIR}/ -lifc @@ -587,23 +610,15 @@ DEPENDPATH += $$PWD/../libs/vlayout win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vlayout/$${DESTDIR}/vlayout.lib else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vlayout/$${DESTDIR}/libvlayout.a -# VGeometry static library -unix|win32: LIBS += -L$$OUT_PWD/../libs/vgeometry/$${DESTDIR}/ -lvgeometry +#VTools static library (depend on vwidgets and vmisc) +unix|win32: LIBS += -L$$OUT_PWD/../libs/vtools/$${DESTDIR}/ -lvtools -INCLUDEPATH += $$PWD/../libs/vgeometry -DEPENDPATH += $$PWD/../libs/vgeometry +INCLUDEPATH += $$PWD/../libs/vtools +INCLUDEPATH += $$OUT_PWD/../libs/vtools/$${UI_DIR} # For UI files +DEPENDPATH += $$PWD/../libs/vtools -win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/vgeometry.lib -else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/libvgeometry.a - -#VPatternDB static library -unix|win32: LIBS += -L$$OUT_PWD/../libs/vpatterndb/$${DESTDIR}/ -lvpatterndb - -INCLUDEPATH += $$PWD/../libs/vpatterndb -DEPENDPATH += $$PWD/../libs/vpatterndb - -win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib -else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vtools/$${DESTDIR}/vtools.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vtools/$${DESTDIR}/libvtools.a #VMisc static library unix|win32: LIBS += -L$$OUT_PWD/../libs/vmisc/$${DESTDIR}/ -lvmisc diff --git a/src/app/core/vapplication.cpp b/src/app/core/vapplication.cpp index 943ce03f2..91415c7ed 100644 --- a/src/app/core/vapplication.cpp +++ b/src/app/core/vapplication.cpp @@ -32,7 +32,7 @@ #include "../libs/ifc/exception/vexceptionconversionerror.h" #include "../libs/ifc/exception/vexceptionemptyparameter.h" #include "../libs/ifc/exception/vexceptionwrongid.h" -#include "vmaingraphicsview.h" +#include "../libs/vwidgets/vmaingraphicsview.h" #include "../version.h" #include "../vmisc/logging.h" @@ -156,9 +156,9 @@ const QString VApplication::GistFileName = QStringLiteral("gist.json"); * @param argv command line. */ VApplication::VApplication(int &argc, char **argv) - : VAbstractApplication(argc, argv), _patternUnit(Unit::Cm), - trVars(nullptr), undoStack(nullptr), sceneView(nullptr), currentScene(nullptr), autoSaveTimer(nullptr), - mainWindow(nullptr), openingPattern(false), doc(nullptr), log(nullptr), + : VAbstractApplication(argc, argv), + trVars(nullptr), autoSaveTimer(nullptr), + log(nullptr), #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) out(nullptr), logLock(nullptr) #else @@ -223,15 +223,6 @@ void VApplication::NewValentina(const QString &fileName) } } -//--------------------------------------------------------------------------------------------------------------------- -void VApplication::CheckFactor(qreal &oldFactor, const qreal &Newfactor) -{ - if (Newfactor <= 2 && Newfactor >= 0.5) - { - oldFactor = Newfactor; - } -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief notify Reimplemented from QApplication::notify(). @@ -465,12 +456,6 @@ void VApplication::ClearOldLogs() const } } -//--------------------------------------------------------------------------------------------------------------------- -void VApplication::setPatternUnit(const Unit &patternUnit) -{ - _patternUnit = patternUnit; -} - //--------------------------------------------------------------------------------------------------------------------- void VApplication::InitOptions() { @@ -535,56 +520,6 @@ void VApplication::InitOptions() } } -//--------------------------------------------------------------------------------------------------------------------- -double VApplication::toPixel(double val) const -{ - return ToPixel(val, _patternUnit); -} - -//--------------------------------------------------------------------------------------------------------------------- -double VApplication::fromPixel(double pix) const -{ - return FromPixel(pix, _patternUnit); -} - -//--------------------------------------------------------------------------------------------------------------------- -QWidget *VApplication::getMainWindow() const -{ - return mainWindow; -} - -//--------------------------------------------------------------------------------------------------------------------- -void VApplication::setMainWindow(QWidget *value) -{ - SCASSERT(value != nullptr) - mainWindow = value; -} - -//--------------------------------------------------------------------------------------------------------------------- -bool VApplication::getOpeningPattern() const -{ - return openingPattern; -} - -//--------------------------------------------------------------------------------------------------------------------- -void VApplication::setOpeningPattern() -{ - openingPattern = !openingPattern; -} - -//--------------------------------------------------------------------------------------------------------------------- -QGraphicsScene *VApplication::getCurrentScene() const -{ - SCASSERT(currentScene != nullptr); - return currentScene; -} - -//--------------------------------------------------------------------------------------------------------------------- -void VApplication::setCurrentScene(QGraphicsScene *value) -{ - currentScene = value; -} - //--------------------------------------------------------------------------------------------------------------------- QStringList VApplication::LabelLanguages() { diff --git a/src/app/core/vapplication.h b/src/app/core/vapplication.h index d480f4dba..bb86c87fd 100644 --- a/src/app/core/vapplication.h +++ b/src/app/core/vapplication.h @@ -36,7 +36,6 @@ #include "vsettings.h" class VApplication;// use in define -class QUndoStack; class VMainGraphicsView; class VPattern; class QFile; @@ -59,38 +58,18 @@ public: VApplication(int &argc, char ** argv); virtual ~VApplication(); static void NewValentina(const QString &fileName = QString()); - static void CheckFactor(qreal &oldFactor, const qreal &Newfactor); virtual bool notify(QObject * receiver, QEvent * event); - Unit patternUnit() const; - const Unit *patternUnitP() const; - void setPatternUnit(const Unit &patternUnit); void InitOptions(); - double toPixel(double val) const; - double fromPixel(double pix) const; - #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) static bool TryLock(QLockFile *lock); #endif //QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QString translationsPath() const; - QUndoStack *getUndoStack() const; - VMainGraphicsView *getSceneView() const; - void setSceneView(VMainGraphicsView *value); QTimer *getAutoSaveTimer() const; void setAutoSaveTimer(QTimer *value); - QWidget *getMainWindow() const; - void setMainWindow(QWidget *value); - bool getOpeningPattern() const; - void setOpeningPattern(); - - QGraphicsScene *getCurrentScene() const; - void setCurrentScene(QGraphicsScene *value); - - void setCurrentDocument(VPattern *doc); - VPattern *getCurrentDocument()const; static QStringList LabelLanguages(); @@ -100,7 +79,6 @@ public: virtual const VTranslateVars *TrVars(); void InitTrVars(); - #if defined(Q_OS_WIN) && defined(Q_CC_GNU) static void DrMingw(); void CollectReports() const; @@ -113,24 +91,9 @@ private slots: private: Q_DISABLE_COPY(VApplication) - Unit _patternUnit; VTranslateVars *trVars; - QUndoStack *undoStack; - VMainGraphicsView *sceneView; - QGraphicsScene *currentScene; QTimer *autoSaveTimer; - /** - * @brief mainWindow pointer to main window. Usefull if need create modal dialog. Without pointer to main window - * modality doesn't work. - */ - QWidget *mainWindow; - /** - * @brief openingPattern true when we opening pattern. If something will be wrong in formula this help understand if - * we can allow user use Undo option. - */ - bool openingPattern; - VPattern *doc; QFile *log; QTextStream *out; #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) @@ -155,36 +118,6 @@ private: void ClearOldLogs()const; }; -//--------------------------------------------------------------------------------------------------------------------- -inline Unit VApplication::patternUnit() const -{ - return _patternUnit; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline const Unit *VApplication::patternUnitP() const -{ - return &_patternUnit; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline QUndoStack *VApplication::getUndoStack() const -{ - return undoStack; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline VMainGraphicsView *VApplication::getSceneView() const -{ - return sceneView; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline void VApplication::setSceneView(VMainGraphicsView *value) -{ - sceneView = value; -} - //--------------------------------------------------------------------------------------------------------------------- inline QTimer *VApplication::getAutoSaveTimer() const { @@ -197,17 +130,4 @@ inline void VApplication::setAutoSaveTimer(QTimer *value) autoSaveTimer = value; } -//--------------------------------------------------------------------------------------------------------------------- -inline void VApplication::setCurrentDocument(VPattern *doc) -{ - this->doc = doc; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline VPattern *VApplication::getCurrentDocument() const -{ - SCASSERT(doc != nullptr) - return doc; -} - #endif // VAPPLICATION_H diff --git a/src/app/core/vformulapropertyeditor.cpp b/src/app/core/vformulapropertyeditor.cpp index f208fee4a..b64c276c7 100644 --- a/src/app/core/vformulapropertyeditor.cpp +++ b/src/app/core/vformulapropertyeditor.cpp @@ -35,7 +35,7 @@ #include #include "../../libs/vpropertyexplorer/vproperty.h" -#include "../dialogs/tools/dialogeditwrongformula.h" +#include "../../libs/vtools/dialogs/support/dialogeditwrongformula.h" using namespace VPE; diff --git a/src/app/core/vtooloptionspropertybrowser.cpp b/src/app/core/vtooloptionspropertybrowser.cpp index 61fbea81c..3965a5d03 100644 --- a/src/app/core/vtooloptionspropertybrowser.cpp +++ b/src/app/core/vtooloptionspropertybrowser.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vtooloptionspropertybrowser.h" -#include "../tools/drawTools/drawtools.h" +#include "../../libs/vtools/tools/drawTools/drawtools.h" #include "../core/vapplication.h" -#include "vmaingraphicsview.h" +#include "../../libs/vwidgets/vmaingraphicsview.h" #include "../../libs/vwidgets/vgraphicssimpletextitem.h" #include "../../libs/vwidgets/vcontrolpointspline.h" #include "../../libs/vpropertyexplorer/vproperties.h" diff --git a/src/app/dialogs/app/dialoghistory.cpp b/src/app/dialogs/app/dialoghistory.cpp index b8ab94a54..7aaa5cbee 100644 --- a/src/app/dialogs/app/dialoghistory.cpp +++ b/src/app/dialogs/app/dialoghistory.cpp @@ -31,10 +31,10 @@ #include "../../libs/vgeometry/varc.h" #include "../../libs/vgeometry/vsplinepath.h" #include "../../libs/vgeometry/vpointf.h" -#include "../../tools/vabstracttool.h" -#include "../../tools/drawTools/vtoolcutspline.h" -#include "../../tools/drawTools/vtoolcutsplinepath.h" -#include "../../tools/drawTools/vtoolcutarc.h" +#include "../../libs/vtools/tools/vabstracttool.h" +#include "../../libs/vtools/tools/drawTools/vtoolcutspline.h" +#include "../../libs/vtools/tools/drawTools/vtoolcutsplinepath.h" +#include "../../libs/vtools/tools/drawTools/vtoolcutarc.h" #include "../../xml/vpattern.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/app/dialoghistory.h b/src/app/dialogs/app/dialoghistory.h index 57f57f257..74156e5a7 100644 --- a/src/app/dialogs/app/dialoghistory.h +++ b/src/app/dialogs/app/dialoghistory.h @@ -29,7 +29,7 @@ #ifndef DIALOGHISTORY_H #define DIALOGHISTORY_H -#include "../tools/dialogtool.h" +#include "../../libs/vtools/dialogs/tools/dialogtool.h" #include diff --git a/src/app/dialogs/app/dialogincrements.cpp b/src/app/dialogs/app/dialogincrements.cpp index 9339416e1..ee6cb8fe1 100644 --- a/src/app/dialogs/app/dialogincrements.cpp +++ b/src/app/dialogs/app/dialogincrements.cpp @@ -34,6 +34,8 @@ #include "../../xml/vstandardmeasurements.h" #include "../../xml/vindividualmeasurements.h" #include "../../libs/vmisc/vsettings.h" +#include "../../libs/qmuparser/qmudef.h" +#include "../../libs/vpatterndb/vtranslatevars.h" #include #include diff --git a/src/app/dialogs/app/dialogincrements.h b/src/app/dialogs/app/dialogincrements.h index 7d8d61c2a..69e6917d5 100644 --- a/src/app/dialogs/app/dialogincrements.h +++ b/src/app/dialogs/app/dialogincrements.h @@ -29,7 +29,7 @@ #ifndef DIALOGINCREMENTS_H #define DIALOGINCREMENTS_H -#include "../tools/dialogtool.h" +#include "../../libs/vtools/dialogs/tools/dialogtool.h" #include "../../xml/vpattern.h" class VIndividualMeasurements; diff --git a/src/app/dialogs/dialogs.h b/src/app/dialogs/dialogs.h index 9e55341a3..9ed30f866 100644 --- a/src/app/dialogs/dialogs.h +++ b/src/app/dialogs/dialogs.h @@ -29,34 +29,6 @@ #ifndef DIALOGS_H #define DIALOGS_H -#include "tools/dialogalongline.h" -#include "tools/dialogarc.h" -#include "tools/dialogarcwithlength.h" -#include "tools/dialogbisector.h" -#include "tools/dialogdetail.h" -#include "tools/dialogendline.h" -#include "tools/dialogline.h" -#include "tools/dialoglineintersect.h" -#include "tools/dialognormal.h" -#include "tools/dialogpointofcontact.h" -#include "tools/dialogshoulderpoint.h" -#include "tools/dialogsinglepoint.h" -#include "tools/dialogspline.h" -#include "tools/dialogsplinepath.h" -#include "tools/dialogheight.h" -#include "tools/dialogcutarc.h" -#include "tools/dialogcutspline.h" -#include "tools/dialogcutsplinepath.h" -#include "tools/dialoguniondetails.h" -#include "tools/dialogtriangle.h" -#include "tools/dialogpointofintersection.h" -#include "tools/dialoglineintersectaxis.h" -#include "tools/dialogcurveintersectaxis.h" -#include "tools/dialogpointofintersectionarcs.h" -#include "tools/dialogpointofintersectioncircles.h" -#include "tools/dialogpointfromcircleandtangent.h" -#include "tools/dialogpointfromarcandtangent.h" - #include "app/dialoghistory.h" #include "app/dialogincrements.h" #include "app/configdialog.h" diff --git a/src/app/dialogs/dialogs.pri b/src/app/dialogs/dialogs.pri index 0bf0be853..a761da7ad 100644 --- a/src/app/dialogs/dialogs.pri +++ b/src/app/dialogs/dialogs.pri @@ -3,29 +3,6 @@ HEADERS += \ $$PWD/dialogs.h \ - $$PWD/tools/dialogtriangle.h \ - $$PWD/tools/dialogtool.h \ - $$PWD/tools/dialogsplinepath.h \ - $$PWD/tools/dialogspline.h \ - $$PWD/tools/dialogsinglepoint.h \ - $$PWD/tools/dialogshoulderpoint.h \ - $$PWD/tools/dialogpointofintersection.h \ - $$PWD/tools/dialogpointofcontact.h \ - $$PWD/tools/dialognormal.h \ - $$PWD/tools/dialoglineintersect.h \ - $$PWD/tools/dialogline.h \ - $$PWD/tools/dialogheight.h \ - $$PWD/tools/dialogendline.h \ - $$PWD/tools/dialogdetail.h \ - $$PWD/tools/dialogbisector.h \ - $$PWD/tools/dialogarc.h \ - $$PWD/tools/dialogalongline.h \ - $$PWD/tools/dialogcutspline.h \ - $$PWD/tools/dialogcutsplinepath.h \ - $$PWD/tools/dialoguniondetails.h \ - $$PWD/tools/dialogcutarc.h \ - $$PWD/tools/dialogeditwrongformula.h \ - $$PWD/tools/dialoglineintersectaxis.h \ $$PWD/app/dialogincrements.h \ $$PWD/app/dialoghistory.h \ $$PWD/app/configdialog.h \ @@ -40,41 +17,11 @@ HEADERS += \ $$PWD/app/configpages/patternpage.h \ $$PWD/app/configpages/communitypage.h \ $$PWD/app/configpages/pathpage.h \ - $$PWD/app/dialogundo.h \ - $$PWD/tools/dialogcurveintersectaxis.h \ $$PWD/app/dialoglayoutsettings.h \ $$PWD/app/dialoglayoutprogress.h \ - $$PWD/app/dialogsavelayout.h \ - $$PWD/tools/dialogpointofintersectionarcs.h \ - $$PWD/tools/dialogpointofintersectioncircles.h \ - $$PWD/tools/dialogpointfromcircleandtangent.h \ - $$PWD/tools/dialogpointfromarcandtangent.h \ - $$PWD/tools/dialogarcwithlength.h + $$PWD/app/dialogsavelayout.h SOURCES += \ - $$PWD/tools/dialogtriangle.cpp \ - $$PWD/tools/dialogtool.cpp \ - $$PWD/tools/dialogsplinepath.cpp \ - $$PWD/tools/dialogspline.cpp \ - $$PWD/tools/dialogsinglepoint.cpp \ - $$PWD/tools/dialogshoulderpoint.cpp \ - $$PWD/tools/dialogpointofintersection.cpp \ - $$PWD/tools/dialogpointofcontact.cpp \ - $$PWD/tools/dialognormal.cpp \ - $$PWD/tools/dialoglineintersect.cpp \ - $$PWD/tools/dialogline.cpp \ - $$PWD/tools/dialogheight.cpp \ - $$PWD/tools/dialogendline.cpp \ - $$PWD/tools/dialogdetail.cpp \ - $$PWD/tools/dialogbisector.cpp \ - $$PWD/tools/dialogarc.cpp \ - $$PWD/tools/dialogalongline.cpp \ - $$PWD/tools/dialogcutspline.cpp \ - $$PWD/tools/dialogcutsplinepath.cpp \ - $$PWD/tools/dialoguniondetails.cpp \ - $$PWD/tools/dialogcutarc.cpp \ - $$PWD/tools/dialogeditwrongformula.cpp \ - $$PWD/tools/dialoglineintersectaxis.cpp \ $$PWD/app/dialogincrements.cpp \ $$PWD/app/dialoghistory.cpp \ $$PWD/app/configdialog.cpp \ @@ -88,40 +35,11 @@ SOURCES += \ $$PWD/app/configpages/patternpage.cpp \ $$PWD/app/configpages/communitypage.cpp \ $$PWD/app/configpages/pathpage.cpp \ - $$PWD/app/dialogundo.cpp \ - $$PWD/tools/dialogcurveintersectaxis.cpp \ $$PWD/app/dialoglayoutsettings.cpp \ $$PWD/app/dialoglayoutprogress.cpp \ - $$PWD/app/dialogsavelayout.cpp \ - $$PWD/tools/dialogpointofintersectionarcs.cpp \ - $$PWD/tools/dialogpointofintersectioncircles.cpp \ - $$PWD/tools/dialogpointfromcircleandtangent.cpp \ - $$PWD/tools/dialogpointfromarcandtangent.cpp \ - $$PWD/tools/dialogarcwithlength.cpp + $$PWD/app/dialogsavelayout.cpp FORMS += \ - $$PWD/tools/dialogtriangle.ui \ - $$PWD/tools/dialogsplinepath.ui \ - $$PWD/tools/dialogspline.ui \ - $$PWD/tools/dialogsinglepoint.ui \ - $$PWD/tools/dialogshoulderpoint.ui \ - $$PWD/tools/dialogpointofintersection.ui \ - $$PWD/tools/dialogpointofcontact.ui \ - $$PWD/tools/dialognormal.ui \ - $$PWD/tools/dialoglineintersect.ui \ - $$PWD/tools/dialogline.ui \ - $$PWD/tools/dialogheight.ui \ - $$PWD/tools/dialogendline.ui \ - $$PWD/tools/dialogdetail.ui \ - $$PWD/tools/dialogbisector.ui \ - $$PWD/tools/dialogarc.ui \ - $$PWD/tools/dialogalongline.ui \ - $$PWD/tools/dialogcutspline.ui \ - $$PWD/tools/dialogcutsplinepath.ui \ - $$PWD/tools/dialoguniondetails.ui \ - $$PWD/tools/dialogcutarc.ui \ - $$PWD/tools/dialogeditwrongformula.ui \ - $$PWD/tools/dialoglineintersectaxis.ui \ $$PWD/app/dialogincrements.ui \ $$PWD/app/dialoghistory.ui \ $$PWD/app/dialogpatternproperties.ui \ @@ -130,13 +48,6 @@ FORMS += \ $$PWD/app/dialogindividualmeasurements.ui \ $$PWD/app/dialogaboutapp.ui \ $$PWD/app/dialogpatternxmledit.ui \ - $$PWD/app/dialogundo.ui \ - $$PWD/tools/dialogcurveintersectaxis.ui \ $$PWD/app/dialoglayoutsettings.ui \ $$PWD/app/dialoglayoutprogress.ui \ - $$PWD/app/dialogsavelayout.ui \ - $$PWD/tools/dialogpointofintersectionarcs.ui \ - $$PWD/tools/dialogpointofintersectioncircles.ui \ - $$PWD/tools/dialogpointfromcircleandtangent.ui \ - $$PWD/tools/dialogpointfromarcandtangent.ui \ - $$PWD/tools/dialogarcwithlength.ui + $$PWD/app/dialogsavelayout.ui diff --git a/src/app/mainwindow.h b/src/app/mainwindow.h index 9751d35e7..37d1f8395 100644 --- a/src/app/mainwindow.h +++ b/src/app/mainwindow.h @@ -31,6 +31,7 @@ #include "mainwindowsnogui.h" #include "../libs/vwidgets/vmaingraphicsview.h" +#include "../libs/vtools/dialogs/tooldialogs.h" #include "dialogs/dialogs.h" #include "tools/vtooldetail.h" #include "tools/vtooluniondetails.h" diff --git a/src/app/options.cpp b/src/app/options.cpp index 2cc70763b..5983df9a4 100644 --- a/src/app/options.cpp +++ b/src/app/options.cpp @@ -28,7 +28,3 @@ #include "options.h" #include - -// From documantation: If you use QStringLiteral you should avoid declaring the same literal in multiple places: This -// furthermore blows up the binary sizes. -const QString degreeSymbol = QStringLiteral("°"); diff --git a/src/app/options.h b/src/app/options.h index f98ddce0c..61d989004 100644 --- a/src/app/options.h +++ b/src/app/options.h @@ -47,12 +47,6 @@ class QString; class QStringList; -#define SceneSize 50000 -#define DefPointRadius 1.5//mm - -extern const QString degreeSymbol; - -enum class Source : char { FromGui, FromFile, FromTool }; enum class Contour : char { OpenContour, CloseContour }; #endif // OPTIONS_H diff --git a/src/app/xml/vpattern.cpp b/src/app/xml/vpattern.cpp index b86ad5b92..a251be714 100644 --- a/src/app/xml/vpattern.cpp +++ b/src/app/xml/vpattern.cpp @@ -27,23 +27,25 @@ *************************************************************************/ #include "vpattern.h" -#include "../tools/vdatatool.h" -#include "../tools/vtooldetail.h" -#include "../tools/vtooluniondetails.h" -#include "../tools/drawTools/drawtools.h" -#include "../tools/nodeDetails/nodedetails.h" -#include "../libs/ifc/exception/vexceptionobjecterror.h" -#include "../libs/ifc/exception/vexceptionwrongid.h" -#include "../libs/ifc/exception/vexceptionconversionerror.h" -#include "../libs/ifc/exception/vexceptionemptyparameter.h" -#include "../libs/ifc/exception/vexceptionundo.h" -#include "../libs/ifc/xml/vpatternconverter.h" -#include "../libs/vmisc/undoevent.h" -#include "../libs/vmisc/vsettings.h" +#include "../../libs/vtools/tools/vdatatool.h" +#include "../../libs/vtools/tools/vtooldetail.h" +#include "../../libs/vtools/tools/vtooluniondetails.h" +#include "../../libs/vtools/tools/drawTools/drawtools.h" +#include "../../libs/vtools/tools/nodeDetails/nodedetails.h" +#include "../../libs/ifc/exception/vexceptionobjecterror.h" +#include "../../libs/ifc/exception/vexceptionwrongid.h" +#include "../../libs/ifc/exception/vexceptionconversionerror.h" +#include "../../libs/ifc/exception/vexceptionemptyparameter.h" +#include "../../libs/ifc/exception/vexceptionundo.h" +#include "../../libs/ifc/xml/vpatternconverter.h" +#include "../../libs/vmisc/undoevent.h" +#include "../../libs/vmisc/vsettings.h" #include "vstandardmeasurements.h" #include "vindividualmeasurements.h" #include "../../libs/qmuparser/qmuparsererror.h" -#include "../libs/vgeometry/varc.h" +#include "../../libs/vgeometry/varc.h" +#include "../xml/vpattern.h" +#include "../core/vapplication.h" #include #include diff --git a/src/app/xml/vpattern.h b/src/app/xml/vpattern.h index 733b17fae..cf2e7496b 100644 --- a/src/app/xml/vpattern.h +++ b/src/app/xml/vpattern.h @@ -36,9 +36,6 @@ class VDataTool; class VMainGraphicsScene; -enum class LabelType : char {NewPatternPiece, NewLabel}; -enum class CrossCirclesPoint : char {FirstPoint = 1, SecondPoint = 2}; - /** * @brief The VPattern class working with pattern file. */ @@ -54,7 +51,7 @@ public: void Parse(const Document &parse); void setCurrentData(); - void UpdateToolData(const quint32 &id, VContainer *data); + virtual void UpdateToolData(const quint32 &id, VContainer *data); virtual void IncrementReferens(quint32 id) const; virtual void DecrementReferens(quint32 id) const; @@ -68,7 +65,7 @@ public: QString GetAuthor() const; void SetAuthor(const QString &text); - QString GenerateLabel(const LabelType &type)const; + virtual QString GenerateLabel(const LabelType &type)const; public slots: void LiteParseTree(const Document &parse); diff --git a/src/libs/ifc/ifcdef.cpp b/src/libs/ifc/ifcdef.cpp index 8bfc8d93c..cd00687a7 100644 --- a/src/libs/ifc/ifcdef.cpp +++ b/src/libs/ifc/ifcdef.cpp @@ -28,8 +28,6 @@ #include "ifcdef.h" -const qreal PrintDPI = 96.0; - #define DefWidth 1.2//mm //--------------------------------------------------------------------------------------------------------------------- @@ -59,112 +57,3 @@ qreal WidthHairLine(Unit patternUnit) { return WidthMainLine(patternUnit)/3.0; } - -//--------------------------------------------------------------------------------------------------------------------- -double ToPixel(double val, const Unit &unit) -{ - switch (unit) - { - case Unit::Mm: - return (val / 25.4) * PrintDPI; - case Unit::Cm: - return ((val * 10.0) / 25.4) * PrintDPI; - case Unit::Inch: - return val * PrintDPI; - case Unit::Px: - return val; - default: - break; - } - return 0; -} - -//--------------------------------------------------------------------------------------------------------------------- -double FromPixel(double pix, const Unit &unit) -{ - switch (unit) - { - case Unit::Mm: - return (pix / PrintDPI) * 25.4; - case Unit::Cm: - return ((pix / PrintDPI) * 25.4) / 10.0; - case Unit::Inch: - return pix / PrintDPI; - case Unit::Px: - return pix; - default: - break; - } - return 0; -} - -//--------------------------------------------------------------------------------------------------------------------- -qreal UnitConvertor(qreal value, const Unit &from, const Unit &to) -{ - switch (from) - { - case Unit::Mm: - switch (to) - { - case Unit::Mm: - return value; - case Unit::Cm: - return value / 10.0; - case Unit::Inch: - return value / 25.4; - case Unit::Px: - return (value / 25.4) * PrintDPI; - default: - break; - } - break; - case Unit::Cm: - switch (to) - { - case Unit::Mm: - return value * 10.0; - case Unit::Cm: - return value; - case Unit::Inch: - return value / 2.54; - case Unit::Px: - return ((value * 10.0) / 25.4) * PrintDPI; - default: - break; - } - break; - case Unit::Inch: - switch (to) - { - case Unit::Mm: - return value * 25.4; - case Unit::Cm: - return value * 2.54; - case Unit::Inch: - return value; - case Unit::Px: - return value * PrintDPI; - default: - break; - } - break; - case Unit::Px: - switch (to) - { - case Unit::Mm: - return (value / PrintDPI) * 25.4; - case Unit::Cm: - return ((value / PrintDPI) * 25.4) / 10.0; - case Unit::Inch: - return value / PrintDPI; - case Unit::Px: - return value; - default: - break; - } - break; - default: - break; - } - return 0; -} diff --git a/src/libs/ifc/ifcdef.h b/src/libs/ifc/ifcdef.h index af4eb50ca..e84290cce 100644 --- a/src/libs/ifc/ifcdef.h +++ b/src/libs/ifc/ifcdef.h @@ -30,14 +30,13 @@ #define IFCDEF_H #include +#include "../vmisc/def.h" #ifdef Q_OS_WIN32 extern Q_CORE_EXPORT int qt_ntfs_permission_lookup; #include #endif /*Q_OS_WIN32*/ -enum class Unit : char { Mm, Cm, Inch, Px }; - static const quint32 null_id = 0; #define NULL_ID null_id//use this value for initialization variables that keeps id values. 0 mean uknown id value. @@ -58,14 +57,7 @@ static const quint32 null_id = 0; # define V_NOEXCEPT_EXPR(x) # endif -extern const qreal PrintDPI; - qreal WidthMainLine(Unit patternUnit); qreal WidthHairLine(Unit patternUnit); -double ToPixel(double val, const Unit &unit); -double FromPixel(double pix, const Unit &unit); - -qreal UnitConvertor(qreal value, const Unit &from, const Unit &to); - #endif // IFCDEF_H diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index c6f0acf30..201d9009c 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -35,8 +35,11 @@ #include enum class Document : char { LiteParse, LitePPParse, FullParse }; +enum class CrossCirclesPoint : char {FirstPoint = 1, SecondPoint = 2}; +enum class LabelType : char {NewPatternPiece, NewLabel}; class VDataTool; +class VContainer; class VAbstractPattern : public QObject, public VDomDocument { @@ -64,6 +67,10 @@ public: virtual void IncrementReferens(quint32 id) const=0; virtual void DecrementReferens(quint32 id) const=0; + virtual QString GenerateLabel(const LabelType &type)const=0; + + virtual void UpdateToolData(const quint32 &id, VContainer *data)=0; + QHash *getTools(); VDataTool *getTool(const quint32 &id); void AddTool(const quint32 &id, VDataTool *tool); diff --git a/src/libs/ifc/xml/vdomdocument.h b/src/libs/ifc/xml/vdomdocument.h index ab86e8bb9..b52c480f5 100644 --- a/src/libs/ifc/xml/vdomdocument.h +++ b/src/libs/ifc/xml/vdomdocument.h @@ -33,7 +33,7 @@ #include #include -#include "ifcdef.h" +#include "../ifc/ifcdef.h" #include "../vmisc/def.h" #include "../vmisc/logging.h" diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 83421d31b..0a75596bf 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -8,6 +8,5 @@ SUBDIRS = \ vgeometry \ vpatterndb \ vmisc \ - vwidgets - -vgeometry.depends = ifc + vwidgets \ + vtools diff --git a/src/libs/vgeometry/vgeometry.pro b/src/libs/vgeometry/vgeometry.pro index 43e050a5a..6676a3fda 100644 --- a/src/libs/vgeometry/vgeometry.pro +++ b/src/libs/vgeometry/vgeometry.pro @@ -94,12 +94,3 @@ CONFIG(debug, debug|release){ } } } - -# IFC static library -unix|win32: LIBS += -L$$OUT_PWD/../ifc/$${DESTDIR}/ -lifc - -INCLUDEPATH += $$PWD/../ifc -DEPENDPATH += $$PWD/../ifc - -win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../ifc/$${DESTDIR}/ifc.lib -else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../ifc/$${DESTDIR}/libifc.a diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index ed9826849..70ae01836 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -222,6 +222,10 @@ const QString in_Oprt = QStringLiteral("in"); const QString cursorArrowOpenHand = QStringLiteral("://cursor/cursor-arrow-openhand.png"); const QString cursorArrowCloseHand = QStringLiteral("://cursor/cursor-arrow-closehand.png"); +// From documantation: If you use QStringLiteral you should avoid declaring the same literal in multiple places: This +// furthermore blows up the binary sizes. +const QString degreeSymbol = QStringLiteral("°"); + //--------------------------------------------------------------------------------------------------------------------- void SetOverrideCursor(const QString &pixmapPath, int hotX, int hotY) { @@ -263,3 +267,123 @@ void RestoreOverrideCursor(const QString &pixmapPath) } #endif } + +const qreal PrintDPI = 96.0; + +//--------------------------------------------------------------------------------------------------------------------- +double ToPixel(double val, const Unit &unit) +{ + switch (unit) + { + case Unit::Mm: + return (val / 25.4) * PrintDPI; + case Unit::Cm: + return ((val * 10.0) / 25.4) * PrintDPI; + case Unit::Inch: + return val * PrintDPI; + case Unit::Px: + return val; + default: + break; + } + return 0; +} + +//--------------------------------------------------------------------------------------------------------------------- +double FromPixel(double pix, const Unit &unit) +{ + switch (unit) + { + case Unit::Mm: + return (pix / PrintDPI) * 25.4; + case Unit::Cm: + return ((pix / PrintDPI) * 25.4) / 10.0; + case Unit::Inch: + return pix / PrintDPI; + case Unit::Px: + return pix; + default: + break; + } + return 0; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal UnitConvertor(qreal value, const Unit &from, const Unit &to) +{ + switch (from) + { + case Unit::Mm: + switch (to) + { + case Unit::Mm: + return value; + case Unit::Cm: + return value / 10.0; + case Unit::Inch: + return value / 25.4; + case Unit::Px: + return (value / 25.4) * PrintDPI; + default: + break; + } + break; + case Unit::Cm: + switch (to) + { + case Unit::Mm: + return value * 10.0; + case Unit::Cm: + return value; + case Unit::Inch: + return value / 2.54; + case Unit::Px: + return ((value * 10.0) / 25.4) * PrintDPI; + default: + break; + } + break; + case Unit::Inch: + switch (to) + { + case Unit::Mm: + return value * 25.4; + case Unit::Cm: + return value * 2.54; + case Unit::Inch: + return value; + case Unit::Px: + return value * PrintDPI; + default: + break; + } + break; + case Unit::Px: + switch (to) + { + case Unit::Mm: + return (value / PrintDPI) * 25.4; + case Unit::Cm: + return ((value / PrintDPI) * 25.4) / 10.0; + case Unit::Inch: + return value / PrintDPI; + case Unit::Px: + return value; + default: + break; + } + break; + default: + break; + } + return 0; +} + +//--------------------------------------------------------------------------------------------------------------------- +void CheckFactor(qreal &oldFactor, const qreal &Newfactor) +{ + if (Newfactor <= 2 && Newfactor >= 0.5) + { + oldFactor = Newfactor; + } +} diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index d1693a929..067ae0b6d 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -33,9 +33,14 @@ #include #include +#define SceneSize 50000 +#define DefPointRadius 1.5//mm + enum class NodeDetail : char { Contour, Modeling }; enum class SceneObject : char { Point, Line, Spline, Arc, SplinePath, Detail, Unknown }; enum class MeasurementsType : char { Standard, Individual }; +enum class Unit : char { Mm, Cm, Inch, Px }; +enum class Source : char { FromGui, FromFile, FromTool }; enum class Tool : unsigned char { @@ -372,7 +377,18 @@ extern const QString in_Oprt; extern const QString cursorArrowOpenHand; extern const QString cursorArrowCloseHand; +extern const QString degreeSymbol; + void SetOverrideCursor(const QString & pixmapPath, int hotX = -1, int hotY = -1); void RestoreOverrideCursor(const QString & pixmapPath); +extern const qreal PrintDPI; + +double ToPixel(double val, const Unit &unit); +double FromPixel(double pix, const Unit &unit); + +qreal UnitConvertor(qreal value, const Unit &from, const Unit &to); + +void CheckFactor(qreal &oldFactor, const qreal &Newfactor); + #endif // DEF_H diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 20b79751d..dbda77219 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -27,16 +27,44 @@ *************************************************************************/ #include "vabstractapplication.h" +#include "../vmisc/def.h" //--------------------------------------------------------------------------------------------------------------------- VAbstractApplication::VAbstractApplication(int &argc, char **argv) - :QApplication(argc, argv), _patternType(MeasurementsType::Individual), settings(nullptr) + :QApplication(argc, argv), + undoStack(nullptr), + mainWindow(nullptr), + _patternUnit(Unit::Cm), + _patternType(MeasurementsType::Individual), + settings(nullptr), + currentScene(nullptr), + sceneView(nullptr), + doc(nullptr), + openingPattern(false) {} //--------------------------------------------------------------------------------------------------------------------- VAbstractApplication::~VAbstractApplication() {} +//--------------------------------------------------------------------------------------------------------------------- +Unit VAbstractApplication::patternUnit() const +{ + return _patternUnit; +} + +//--------------------------------------------------------------------------------------------------------------------- +const Unit *VAbstractApplication::patternUnitP() const +{ + return &_patternUnit; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setPatternUnit(const Unit &patternUnit) +{ + _patternUnit = patternUnit; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief OpenSettings get acsses to application settings. @@ -59,3 +87,41 @@ VSettings *VAbstractApplication::Settings() SCASSERT(settings != nullptr); return settings; } + + +//--------------------------------------------------------------------------------------------------------------------- +QGraphicsScene *VAbstractApplication::getCurrentScene() const +{ + SCASSERT(currentScene != nullptr); + return currentScene; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setCurrentScene(QGraphicsScene *value) +{ + currentScene = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +VMainGraphicsView *VAbstractApplication::getSceneView() const +{ + return sceneView; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setSceneView(VMainGraphicsView *value) +{ + sceneView = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +double VAbstractApplication::toPixel(double val) const +{ + return ToPixel(val, _patternUnit); +} + +//--------------------------------------------------------------------------------------------------------------------- +double VAbstractApplication::fromPixel(double pix) const +{ + return FromPixel(pix, _patternUnit); +} diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index dc8cfc57b..89f2a1ad2 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -30,11 +30,15 @@ #define VABSTRACTAPPLICATION_H #include +#include #include "def.h" #include "vsettings.h" class VAbstractApplication;// use in define class VTranslateVars; +class VAbstractPattern; +class VMainGraphicsView; +class QUndoStack; #if defined(qApp) #undef qApp @@ -49,23 +53,67 @@ public: virtual const VTranslateVars *TrVars()=0; + Unit patternUnit() const; + const Unit *patternUnitP() const; + void setPatternUnit(const Unit &patternUnit); + MeasurementsType patternType() const; void setPatternType(const MeasurementsType &patternType); void OpenSettings(); - VSettings *Settings(); + VSettings *Settings(); template QString LocaleToString(const T &value); + QGraphicsScene *getCurrentScene() const; + void setCurrentScene(QGraphicsScene *value); + + VMainGraphicsView *getSceneView() const; + void setSceneView(VMainGraphicsView *value); + + double toPixel(double val) const; + double fromPixel(double pix) const; + + void setCurrentDocument(VAbstractPattern *doc); + VAbstractPattern *getCurrentDocument()const; + + bool getOpeningPattern() const; + void setOpeningPattern(); + + QWidget *getMainWindow() const; + void setMainWindow(QWidget *value); + + QUndoStack *getUndoStack() const; + +protected: + QUndoStack *undoStack; + + /** + * @brief mainWindow pointer to main window. Usefull if need create modal dialog. Without pointer to main window + * modality doesn't work. + */ + QWidget *mainWindow; private: Q_DISABLE_COPY(VAbstractApplication) + Unit _patternUnit; MeasurementsType _patternType; /** * @brief settings pointer to settings. Help hide constructor creation settings. Make make code more readable. */ VSettings *settings; + + QGraphicsScene *currentScene; + VMainGraphicsView *sceneView; + + VAbstractPattern *doc; + + /** + * @brief openingPattern true when we opening pattern. If something will be wrong in formula this help understand if + * we can allow user use Undo option. + */ + bool openingPattern; }; //--------------------------------------------------------------------------------------------------------------------- @@ -89,4 +137,48 @@ QString VAbstractApplication::LocaleToString(const T &value) return loc.toString(value); } +//--------------------------------------------------------------------------------------------------------------------- +inline void VAbstractApplication::setCurrentDocument(VAbstractPattern *doc) +{ + this->doc = doc; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline VAbstractPattern *VAbstractApplication::getCurrentDocument() const +{ + SCASSERT(doc != nullptr) + return doc; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline bool VAbstractApplication::getOpeningPattern() const +{ + return openingPattern; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline void VAbstractApplication::setOpeningPattern() +{ + openingPattern = !openingPattern; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline QWidget *VAbstractApplication::getMainWindow() const +{ + return mainWindow; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline void VAbstractApplication::setMainWindow(QWidget *value) +{ + SCASSERT(value != nullptr) + mainWindow = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +inline QUndoStack *VAbstractApplication::getUndoStack() const +{ + return undoStack; +} + #endif // VABSTRACTAPPLICATION_H diff --git a/src/libs/vpatterndb/vcontainer.cpp b/src/libs/vpatterndb/vcontainer.cpp index eb9d4e3d8..14d90b9ef 100644 --- a/src/libs/vpatterndb/vcontainer.cpp +++ b/src/libs/vpatterndb/vcontainer.cpp @@ -454,9 +454,9 @@ const QMap > VContainer::DataAnglesArcs() con } //--------------------------------------------------------------------------------------------------------------------- -const QMap > VContainer::DataAnglesCurves() const +const QMap > VContainer::DataAnglesCurves() const { - return DataVar(VarType::SplineAngle); + return DataVar(VarType::SplineAngle); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vpatterndb/vcontainer.h b/src/libs/vpatterndb/vcontainer.h index 7197c171a..3e5260afc 100644 --- a/src/libs/vpatterndb/vcontainer.h +++ b/src/libs/vpatterndb/vcontainer.h @@ -156,7 +156,7 @@ public: const QMap > DataAngleLines() const; const QMap > DataRadiusesArcs() const; const QMap > DataAnglesArcs() const; - const QMap > DataAnglesCurves() const; + const QMap > DataAnglesCurves() const; static bool IsUnique(const QString &name); diff --git a/src/libs/vtools/dialogs/dialogs.pri b/src/libs/vtools/dialogs/dialogs.pri new file mode 100644 index 000000000..442315bba --- /dev/null +++ b/src/libs/vtools/dialogs/dialogs.pri @@ -0,0 +1,98 @@ +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +HEADERS += \ + $$PWD/tooldialogs.h \ + $$PWD/tools/dialogalongline.h \ + $$PWD/tools/dialogarc.h \ + $$PWD/tools/dialogarcwithlength.h \ + $$PWD/tools/dialogbisector.h \ + $$PWD/tools/dialogcurveintersectaxis.h \ + $$PWD/tools/dialogcutarc.h \ + $$PWD/tools/dialogcutspline.h \ + $$PWD/tools/dialogcutsplinepath.h \ + $$PWD/tools/dialogdetail.h \ + $$PWD/tools/dialogendline.h \ + $$PWD/tools/dialogheight.h \ + $$PWD/tools/dialogline.h \ + $$PWD/tools/dialoglineintersect.h \ + $$PWD/tools/dialoglineintersectaxis.h \ + $$PWD/tools/dialognormal.h \ + $$PWD/tools/dialogpointfromarcandtangent.h \ + $$PWD/tools/dialogpointfromcircleandtangent.h \ + $$PWD/tools/dialogpointofcontact.h \ + $$PWD/tools/dialogpointofintersection.h \ + $$PWD/tools/dialogpointofintersectionarcs.h \ + $$PWD/tools/dialogpointofintersectioncircles.h \ + $$PWD/tools/dialogshoulderpoint.h \ + $$PWD/tools/dialogsinglepoint.h \ + $$PWD/tools/dialogspline.h \ + $$PWD/tools/dialogsplinepath.h \ + $$PWD/tools/dialogtool.h \ + $$PWD/tools/dialogtriangle.h \ + $$PWD/tools/dialoguniondetails.h \ + $$PWD/support/dialogeditwrongformula.h \ + $$PWD/support/dialogundo.h + +SOURCES += \ + $$PWD/tools/dialogalongline.cpp \ + $$PWD/tools/dialogarc.cpp \ + $$PWD/tools/dialogarcwithlength.cpp \ + $$PWD/tools/dialogbisector.cpp \ + $$PWD/tools/dialogcurveintersectaxis.cpp \ + $$PWD/tools/dialogcutarc.cpp \ + $$PWD/tools/dialogcutspline.cpp \ + $$PWD/tools/dialogcutsplinepath.cpp \ + $$PWD/tools/dialogdetail.cpp \ + $$PWD/tools/dialogendline.cpp \ + $$PWD/tools/dialogheight.cpp \ + $$PWD/tools/dialogline.cpp \ + $$PWD/tools/dialoglineintersect.cpp \ + $$PWD/tools/dialoglineintersectaxis.cpp \ + $$PWD/tools/dialognormal.cpp \ + $$PWD/tools/dialogpointfromarcandtangent.cpp \ + $$PWD/tools/dialogpointfromcircleandtangent.cpp \ + $$PWD/tools/dialogpointofcontact.cpp \ + $$PWD/tools/dialogpointofintersection.cpp \ + $$PWD/tools/dialogpointofintersectionarcs.cpp \ + $$PWD/tools/dialogpointofintersectioncircles.cpp \ + $$PWD/tools/dialogshoulderpoint.cpp \ + $$PWD/tools/dialogsinglepoint.cpp \ + $$PWD/tools/dialogspline.cpp \ + $$PWD/tools/dialogsplinepath.cpp \ + $$PWD/tools/dialogtool.cpp \ + $$PWD/tools/dialogtriangle.cpp \ + $$PWD/tools/dialoguniondetails.cpp \ + $$PWD/support/dialogeditwrongformula.cpp \ + $$PWD/support/dialogundo.cpp + +FORMS += \ + $$PWD/tools/dialogalongline.ui \ + $$PWD/tools/dialogarc.ui \ + $$PWD/tools/dialogarcwithlength.ui \ + $$PWD/tools/dialogbisector.ui \ + $$PWD/tools/dialogcurveintersectaxis.ui \ + $$PWD/tools/dialogcutarc.ui \ + $$PWD/tools/dialogcutspline.ui \ + $$PWD/tools/dialogcutsplinepath.ui \ + $$PWD/tools/dialogdetail.ui \ + $$PWD/tools/dialogendline.ui \ + $$PWD/tools/dialogheight.ui \ + $$PWD/tools/dialogline.ui \ + $$PWD/tools/dialoglineintersect.ui \ + $$PWD/tools/dialoglineintersectaxis.ui \ + $$PWD/tools/dialognormal.ui \ + $$PWD/tools/dialogpointfromarcandtangent.ui \ + $$PWD/tools/dialogpointfromcircleandtangent.ui \ + $$PWD/tools/dialogpointofcontact.ui \ + $$PWD/tools/dialogpointofintersection.ui \ + $$PWD/tools/dialogpointofintersectionarcs.ui \ + $$PWD/tools/dialogpointofintersectioncircles.ui \ + $$PWD/tools/dialogshoulderpoint.ui \ + $$PWD/tools/dialogsinglepoint.ui \ + $$PWD/tools/dialogspline.ui \ + $$PWD/tools/dialogsplinepath.ui \ + $$PWD/tools/dialogtriangle.ui \ + $$PWD/tools/dialoguniondetails.ui \ + $$PWD/support/dialogeditwrongformula.ui \ + $$PWD/support/dialogundo.ui diff --git a/src/app/dialogs/tools/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp similarity index 98% rename from src/app/dialogs/tools/dialogeditwrongformula.cpp rename to src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index ac2df7d50..000744c4d 100644 --- a/src/app/dialogs/tools/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -28,7 +28,8 @@ #include "dialogeditwrongformula.h" #include "ui_dialogeditwrongformula.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" //--------------------------------------------------------------------------------------------------------------------- DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent) @@ -203,8 +204,8 @@ void DialogEditWrongFormula::ValChenged(int row) if (ui->radioButtonAnglesCurves->isChecked()) { const QString desc = QString("%1(%2) - %3").arg(item->text()) - .arg(*data->GetVariable(qApp->TrVars()->VarFromUser(item->text()))->GetValue()) - .arg(tr("Curve angle")); + .arg(*data->GetVariable(qApp->TrVars()->VarFromUser(item->text()))->GetValue()) + .arg(tr("Curve angle")); ui->labelDescription->setText(desc); return; } diff --git a/src/app/dialogs/tools/dialogeditwrongformula.h b/src/libs/vtools/dialogs/support/dialogeditwrongformula.h similarity index 99% rename from src/app/dialogs/tools/dialogeditwrongformula.h rename to src/libs/vtools/dialogs/support/dialogeditwrongformula.h index 18a3b5dfc..8c299ba58 100644 --- a/src/app/dialogs/tools/dialogeditwrongformula.h +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.h @@ -29,7 +29,7 @@ #ifndef DIALOGEDITWRONGFORMULA_H #define DIALOGEDITWRONGFORMULA_H -#include "dialogtool.h" +#include "../tools/dialogtool.h" namespace Ui { diff --git a/src/app/dialogs/tools/dialogeditwrongformula.ui b/src/libs/vtools/dialogs/support/dialogeditwrongformula.ui similarity index 100% rename from src/app/dialogs/tools/dialogeditwrongformula.ui rename to src/libs/vtools/dialogs/support/dialogeditwrongformula.ui diff --git a/src/app/dialogs/app/dialogundo.cpp b/src/libs/vtools/dialogs/support/dialogundo.cpp similarity index 96% rename from src/app/dialogs/app/dialogundo.cpp rename to src/libs/vtools/dialogs/support/dialogundo.cpp index c58ca6511..f915051be 100644 --- a/src/app/dialogs/app/dialogundo.cpp +++ b/src/libs/vtools/dialogs/support/dialogundo.cpp @@ -28,8 +28,8 @@ #include "dialogundo.h" #include "ui_dialogundo.h" -#include "../../core/vapplication.h" -#include "../../libs/ifc/exception/vexceptionundo.h" +#include "../../../ifc/exception/vexceptionundo.h" +#include "../../../vmisc/vabstractapplication.h" #include #include diff --git a/src/app/dialogs/app/dialogundo.h b/src/libs/vtools/dialogs/support/dialogundo.h similarity index 100% rename from src/app/dialogs/app/dialogundo.h rename to src/libs/vtools/dialogs/support/dialogundo.h diff --git a/src/app/dialogs/app/dialogundo.ui b/src/libs/vtools/dialogs/support/dialogundo.ui similarity index 100% rename from src/app/dialogs/app/dialogundo.ui rename to src/libs/vtools/dialogs/support/dialogundo.ui diff --git a/src/libs/vtools/dialogs/tooldialogs.h b/src/libs/vtools/dialogs/tooldialogs.h new file mode 100644 index 000000000..bcce4f6cf --- /dev/null +++ b/src/libs/vtools/dialogs/tooldialogs.h @@ -0,0 +1,63 @@ +/************************************************************************ + ** + ** @file dialogs.h + ** @author Roman Telezhynskyi + ** @date 16 6, 2015 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef TOOLDIALOGS_H +#define TOOLDIALOGS_H + +#include "dialogs/tools/dialogalongline.h" +#include "dialogs/tools/dialogarc.h" +#include "dialogs/tools/dialogarcwithlength.h" +#include "dialogs/tools/dialogbisector.h" +#include "dialogs/tools/dialogdetail.h" +#include "dialogs/tools/dialogendline.h" +#include "dialogs/tools/dialogline.h" +#include "dialogs/tools/dialoglineintersect.h" +#include "dialogs/tools/dialognormal.h" +#include "dialogs/tools/dialogpointofcontact.h" +#include "dialogs/tools/dialogshoulderpoint.h" +#include "dialogs/tools/dialogsinglepoint.h" +#include "dialogs/tools/dialogspline.h" +#include "dialogs/tools/dialogsplinepath.h" +#include "dialogs/tools/dialogheight.h" +#include "dialogs/tools/dialogcutarc.h" +#include "dialogs/tools/dialogcutspline.h" +#include "dialogs/tools/dialogcutsplinepath.h" +#include "dialogs/tools/dialoguniondetails.h" +#include "dialogs/tools/dialogtriangle.h" +#include "dialogs/tools/dialogpointofintersection.h" +#include "dialogs/tools/dialoglineintersectaxis.h" +#include "dialogs/tools/dialogcurveintersectaxis.h" +#include "dialogs/tools/dialogpointofintersectionarcs.h" +#include "dialogs/tools/dialogpointofintersectioncircles.h" +#include "dialogs/tools/dialogpointfromcircleandtangent.h" +#include "dialogs/tools/dialogpointfromarcandtangent.h" + +#include "dialogs/support/dialogeditwrongformula.h" +#include "dialogs/support/dialogundo.h" + +#endif // TOOLDIALOGS_H diff --git a/src/app/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp similarity index 98% rename from src/app/dialogs/tools/dialogalongline.cpp rename to src/libs/vtools/dialogs/tools/dialogalongline.cpp index 48cd4f89d..82793bb45 100644 --- a/src/app/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -30,8 +30,9 @@ #include "ui_dialogalongline.h" #include "../../visualization/vistoolalongline.h" #include "../../tools/vabstracttool.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "dialogeditwrongformula.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../../../vpatterndb/vtranslatevars.h" +#include "../support/dialogeditwrongformula.h" #include diff --git a/src/app/dialogs/tools/dialogalongline.h b/src/libs/vtools/dialogs/tools/dialogalongline.h similarity index 100% rename from src/app/dialogs/tools/dialogalongline.h rename to src/libs/vtools/dialogs/tools/dialogalongline.h diff --git a/src/app/dialogs/tools/dialogalongline.ui b/src/libs/vtools/dialogs/tools/dialogalongline.ui similarity index 100% rename from src/app/dialogs/tools/dialogalongline.ui rename to src/libs/vtools/dialogs/tools/dialogalongline.ui diff --git a/src/app/dialogs/tools/dialogarc.cpp b/src/libs/vtools/dialogs/tools/dialogarc.cpp similarity index 98% rename from src/app/dialogs/tools/dialogarc.cpp rename to src/libs/vtools/dialogs/tools/dialogarc.cpp index d1cf87595..3224f5065 100644 --- a/src/app/dialogs/tools/dialogarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarc.cpp @@ -32,11 +32,12 @@ #include #include -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../libs/ifc/xml/vdomdocument.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" +#include "../../../ifc/xml/vdomdocument.h" #include "../../visualization/vistoolarc.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogarc.h b/src/libs/vtools/dialogs/tools/dialogarc.h similarity index 100% rename from src/app/dialogs/tools/dialogarc.h rename to src/libs/vtools/dialogs/tools/dialogarc.h diff --git a/src/app/dialogs/tools/dialogarc.ui b/src/libs/vtools/dialogs/tools/dialogarc.ui similarity index 100% rename from src/app/dialogs/tools/dialogarc.ui rename to src/libs/vtools/dialogs/tools/dialogarc.ui diff --git a/src/app/dialogs/tools/dialogarcwithlength.cpp b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp similarity index 98% rename from src/app/dialogs/tools/dialogarcwithlength.cpp rename to src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp index a47126578..824e93a57 100644 --- a/src/app/dialogs/tools/dialogarcwithlength.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp @@ -32,11 +32,12 @@ #include #include -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../libs/ifc/xml/vdomdocument.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" +#include "../../../ifc/xml/vdomdocument.h" #include "../../visualization/vistoolarcwithlength.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- DialogArcWithLength::DialogArcWithLength(const VContainer *data, const quint32 &toolId, QWidget *parent) diff --git a/src/app/dialogs/tools/dialogarcwithlength.h b/src/libs/vtools/dialogs/tools/dialogarcwithlength.h similarity index 100% rename from src/app/dialogs/tools/dialogarcwithlength.h rename to src/libs/vtools/dialogs/tools/dialogarcwithlength.h diff --git a/src/app/dialogs/tools/dialogarcwithlength.ui b/src/libs/vtools/dialogs/tools/dialogarcwithlength.ui similarity index 100% rename from src/app/dialogs/tools/dialogarcwithlength.ui rename to src/libs/vtools/dialogs/tools/dialogarcwithlength.ui diff --git a/src/app/dialogs/tools/dialogbisector.cpp b/src/libs/vtools/dialogs/tools/dialogbisector.cpp similarity index 98% rename from src/app/dialogs/tools/dialogbisector.cpp rename to src/libs/vtools/dialogs/tools/dialogbisector.cpp index f22ae407b..495db4c07 100644 --- a/src/app/dialogs/tools/dialogbisector.cpp +++ b/src/libs/vtools/dialogs/tools/dialogbisector.cpp @@ -29,12 +29,13 @@ #include "dialogbisector.h" #include "ui_dialogbisector.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../vgeometry/vpointf.h" +#include "../vpatterndb/vcontainer.h" +#include "../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolbisector.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" +#include "../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogbisector.h b/src/libs/vtools/dialogs/tools/dialogbisector.h similarity index 100% rename from src/app/dialogs/tools/dialogbisector.h rename to src/libs/vtools/dialogs/tools/dialogbisector.h diff --git a/src/app/dialogs/tools/dialogbisector.ui b/src/libs/vtools/dialogs/tools/dialogbisector.ui similarity index 100% rename from src/app/dialogs/tools/dialogbisector.ui rename to src/libs/vtools/dialogs/tools/dialogbisector.ui diff --git a/src/app/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp similarity index 98% rename from src/app/dialogs/tools/dialogcurveintersectaxis.cpp rename to src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index 0af9b1d28..41fe7d6f3 100644 --- a/src/app/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -29,12 +29,13 @@ #include "dialogcurveintersectaxis.h" #include "ui_dialogcurveintersectaxis.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolcurveintersectaxis.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" #include diff --git a/src/app/dialogs/tools/dialogcurveintersectaxis.h b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.h similarity index 100% rename from src/app/dialogs/tools/dialogcurveintersectaxis.h rename to src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.h diff --git a/src/app/dialogs/tools/dialogcurveintersectaxis.ui b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.ui similarity index 100% rename from src/app/dialogs/tools/dialogcurveintersectaxis.ui rename to src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.ui diff --git a/src/app/dialogs/tools/dialogcutarc.cpp b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp similarity index 97% rename from src/app/dialogs/tools/dialogcutarc.cpp rename to src/libs/vtools/dialogs/tools/dialogcutarc.cpp index 7025bab80..46c02de81 100644 --- a/src/app/dialogs/tools/dialogcutarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutarc.cpp @@ -29,12 +29,12 @@ #include "dialogcutarc.h" #include "ui_dialogcutarc.h" -#include "../../libs/vgeometry/varc.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/varc.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolcutarc.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" -#include "dialogeditwrongformula.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogcutarc.h b/src/libs/vtools/dialogs/tools/dialogcutarc.h similarity index 100% rename from src/app/dialogs/tools/dialogcutarc.h rename to src/libs/vtools/dialogs/tools/dialogcutarc.h diff --git a/src/app/dialogs/tools/dialogcutarc.ui b/src/libs/vtools/dialogs/tools/dialogcutarc.ui similarity index 100% rename from src/app/dialogs/tools/dialogcutarc.ui rename to src/libs/vtools/dialogs/tools/dialogcutarc.ui diff --git a/src/app/dialogs/tools/dialogcutspline.cpp b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp similarity index 97% rename from src/app/dialogs/tools/dialogcutspline.cpp rename to src/libs/vtools/dialogs/tools/dialogcutspline.cpp index eba616608..6424936a1 100644 --- a/src/app/dialogs/tools/dialogcutspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutspline.cpp @@ -29,11 +29,11 @@ #include "dialogcutspline.h" #include "ui_dialogcutspline.h" -#include "../../libs/vgeometry/vspline.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../xml/vpattern.h" +#include "../../../vgeometry/vspline.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolcutspline.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogcutspline.h b/src/libs/vtools/dialogs/tools/dialogcutspline.h similarity index 100% rename from src/app/dialogs/tools/dialogcutspline.h rename to src/libs/vtools/dialogs/tools/dialogcutspline.h diff --git a/src/app/dialogs/tools/dialogcutspline.ui b/src/libs/vtools/dialogs/tools/dialogcutspline.ui similarity index 100% rename from src/app/dialogs/tools/dialogcutspline.ui rename to src/libs/vtools/dialogs/tools/dialogcutspline.ui diff --git a/src/app/dialogs/tools/dialogcutsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp similarity index 97% rename from src/app/dialogs/tools/dialogcutsplinepath.cpp rename to src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp index 3b62c85ef..f9128f4c7 100644 --- a/src/app/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.cpp @@ -29,11 +29,11 @@ #include "dialogcutsplinepath.h" #include "ui_dialogcutsplinepath.h" -#include "../../libs/vgeometry/vsplinepath.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../xml/vpattern.h" +#include "../../../vgeometry/vsplinepath.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolcutsplinepath.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogcutsplinepath.h b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.h similarity index 100% rename from src/app/dialogs/tools/dialogcutsplinepath.h rename to src/libs/vtools/dialogs/tools/dialogcutsplinepath.h diff --git a/src/app/dialogs/tools/dialogcutsplinepath.ui b/src/libs/vtools/dialogs/tools/dialogcutsplinepath.ui similarity index 100% rename from src/app/dialogs/tools/dialogcutsplinepath.ui rename to src/libs/vtools/dialogs/tools/dialogcutsplinepath.ui diff --git a/src/app/dialogs/tools/dialogdetail.cpp b/src/libs/vtools/dialogs/tools/dialogdetail.cpp similarity index 98% rename from src/app/dialogs/tools/dialogdetail.cpp rename to src/libs/vtools/dialogs/tools/dialogdetail.cpp index 30c53d53c..b42229ee8 100644 --- a/src/app/dialogs/tools/dialogdetail.cpp +++ b/src/libs/vtools/dialogs/tools/dialogdetail.cpp @@ -30,12 +30,11 @@ #include -#include "../../libs/vgeometry/varc.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vgeometry/vsplinepath.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../libs/ifc/xml/vdomdocument.h" -#include "../../xml/vabstractmeasurements.h" +#include "../../../vgeometry/varc.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vgeometry/vsplinepath.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../ifc/xml/vdomdocument.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogdetail.h b/src/libs/vtools/dialogs/tools/dialogdetail.h similarity index 100% rename from src/app/dialogs/tools/dialogdetail.h rename to src/libs/vtools/dialogs/tools/dialogdetail.h diff --git a/src/app/dialogs/tools/dialogdetail.ui b/src/libs/vtools/dialogs/tools/dialogdetail.ui similarity index 100% rename from src/app/dialogs/tools/dialogdetail.ui rename to src/libs/vtools/dialogs/tools/dialogdetail.ui diff --git a/src/app/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp similarity index 98% rename from src/app/dialogs/tools/dialogendline.cpp rename to src/libs/vtools/dialogs/tools/dialogendline.cpp index 002b10a7b..a193ed962 100644 --- a/src/app/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -29,12 +29,13 @@ #include "dialogendline.h" #include "ui_dialogendline.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolendline.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" #include //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogendline.h b/src/libs/vtools/dialogs/tools/dialogendline.h similarity index 100% rename from src/app/dialogs/tools/dialogendline.h rename to src/libs/vtools/dialogs/tools/dialogendline.h diff --git a/src/app/dialogs/tools/dialogendline.ui b/src/libs/vtools/dialogs/tools/dialogendline.ui similarity index 100% rename from src/app/dialogs/tools/dialogendline.ui rename to src/libs/vtools/dialogs/tools/dialogendline.ui diff --git a/src/app/dialogs/tools/dialogheight.cpp b/src/libs/vtools/dialogs/tools/dialogheight.cpp similarity index 100% rename from src/app/dialogs/tools/dialogheight.cpp rename to src/libs/vtools/dialogs/tools/dialogheight.cpp diff --git a/src/app/dialogs/tools/dialogheight.h b/src/libs/vtools/dialogs/tools/dialogheight.h similarity index 100% rename from src/app/dialogs/tools/dialogheight.h rename to src/libs/vtools/dialogs/tools/dialogheight.h diff --git a/src/app/dialogs/tools/dialogheight.ui b/src/libs/vtools/dialogs/tools/dialogheight.ui similarity index 100% rename from src/app/dialogs/tools/dialogheight.ui rename to src/libs/vtools/dialogs/tools/dialogheight.ui diff --git a/src/app/dialogs/tools/dialogline.cpp b/src/libs/vtools/dialogs/tools/dialogline.cpp similarity index 97% rename from src/app/dialogs/tools/dialogline.cpp rename to src/libs/vtools/dialogs/tools/dialogline.cpp index d3badadb5..6f3839a5e 100644 --- a/src/app/dialogs/tools/dialogline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogline.cpp @@ -29,11 +29,10 @@ #include "dialogline.h" #include "ui_dialogline.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" #include "../../visualization/vistoolline.h" -#include "../../core/vapplication.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogline.h b/src/libs/vtools/dialogs/tools/dialogline.h similarity index 100% rename from src/app/dialogs/tools/dialogline.h rename to src/libs/vtools/dialogs/tools/dialogline.h diff --git a/src/app/dialogs/tools/dialogline.ui b/src/libs/vtools/dialogs/tools/dialogline.ui similarity index 100% rename from src/app/dialogs/tools/dialogline.ui rename to src/libs/vtools/dialogs/tools/dialogline.ui diff --git a/src/app/dialogs/tools/dialoglineintersect.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp similarity index 99% rename from src/app/dialogs/tools/dialoglineintersect.cpp rename to src/libs/vtools/dialogs/tools/dialoglineintersect.cpp index adb003cf5..da3a4e742 100644 --- a/src/app/dialogs/tools/dialoglineintersect.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersect.cpp @@ -33,7 +33,6 @@ #include "../../libs/vpatterndb/vcontainer.h" #include "../../visualization/vistoollineintersect.h" #include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialoglineintersect.h b/src/libs/vtools/dialogs/tools/dialoglineintersect.h similarity index 100% rename from src/app/dialogs/tools/dialoglineintersect.h rename to src/libs/vtools/dialogs/tools/dialoglineintersect.h diff --git a/src/app/dialogs/tools/dialoglineintersect.ui b/src/libs/vtools/dialogs/tools/dialoglineintersect.ui similarity index 100% rename from src/app/dialogs/tools/dialoglineintersect.ui rename to src/libs/vtools/dialogs/tools/dialoglineintersect.ui diff --git a/src/app/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp similarity index 98% rename from src/app/dialogs/tools/dialoglineintersectaxis.cpp rename to src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index 0ad55d5fd..ebca04988 100644 --- a/src/app/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -29,12 +29,13 @@ #include "dialoglineintersectaxis.h" #include "ui_dialoglineintersectaxis.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoollineintersectaxis.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" #include diff --git a/src/app/dialogs/tools/dialoglineintersectaxis.h b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.h similarity index 100% rename from src/app/dialogs/tools/dialoglineintersectaxis.h rename to src/libs/vtools/dialogs/tools/dialoglineintersectaxis.h diff --git a/src/app/dialogs/tools/dialoglineintersectaxis.ui b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.ui similarity index 100% rename from src/app/dialogs/tools/dialoglineintersectaxis.ui rename to src/libs/vtools/dialogs/tools/dialoglineintersectaxis.ui diff --git a/src/app/dialogs/tools/dialognormal.cpp b/src/libs/vtools/dialogs/tools/dialognormal.cpp similarity index 98% rename from src/app/dialogs/tools/dialognormal.cpp rename to src/libs/vtools/dialogs/tools/dialognormal.cpp index 37f0408cc..1480b5728 100644 --- a/src/app/dialogs/tools/dialognormal.cpp +++ b/src/libs/vtools/dialogs/tools/dialognormal.cpp @@ -29,9 +29,10 @@ #include "dialognormal.h" #include "ui_dialognormal.h" #include "../../visualization/vistoolnormal.h" -#include "../../../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" +#include "../../../vpatterndb/vtranslatevars.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialognormal.h b/src/libs/vtools/dialogs/tools/dialognormal.h similarity index 100% rename from src/app/dialogs/tools/dialognormal.h rename to src/libs/vtools/dialogs/tools/dialognormal.h diff --git a/src/app/dialogs/tools/dialognormal.ui b/src/libs/vtools/dialogs/tools/dialognormal.ui similarity index 100% rename from src/app/dialogs/tools/dialognormal.ui rename to src/libs/vtools/dialogs/tools/dialognormal.ui diff --git a/src/app/dialogs/tools/dialogpointfromarcandtangent.cpp b/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp similarity index 100% rename from src/app/dialogs/tools/dialogpointfromarcandtangent.cpp rename to src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.cpp diff --git a/src/app/dialogs/tools/dialogpointfromarcandtangent.h b/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.h similarity index 100% rename from src/app/dialogs/tools/dialogpointfromarcandtangent.h rename to src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.h diff --git a/src/app/dialogs/tools/dialogpointfromarcandtangent.ui b/src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointfromarcandtangent.ui rename to src/libs/vtools/dialogs/tools/dialogpointfromarcandtangent.ui diff --git a/src/app/dialogs/tools/dialogpointfromcircleandtangent.cpp b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp similarity index 98% rename from src/app/dialogs/tools/dialogpointfromcircleandtangent.cpp rename to src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp index 803675563..fa9c61d9b 100644 --- a/src/app/dialogs/tools/dialogpointfromcircleandtangent.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.cpp @@ -29,11 +29,12 @@ #include "dialogpointfromcircleandtangent.h" #include "ui_dialogpointfromcircleandtangent.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolpointfromcircleandtangent.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "dialogeditwrongformula.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- DialogPointFromCircleAndTangent::DialogPointFromCircleAndTangent(const VContainer *data, const quint32 &toolId, diff --git a/src/app/dialogs/tools/dialogpointfromcircleandtangent.h b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.h similarity index 100% rename from src/app/dialogs/tools/dialogpointfromcircleandtangent.h rename to src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.h diff --git a/src/app/dialogs/tools/dialogpointfromcircleandtangent.ui b/src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointfromcircleandtangent.ui rename to src/libs/vtools/dialogs/tools/dialogpointfromcircleandtangent.ui diff --git a/src/app/dialogs/tools/dialogpointofcontact.cpp b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp similarity index 98% rename from src/app/dialogs/tools/dialogpointofcontact.cpp rename to src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp index bd4c6df7c..56d9c9808 100644 --- a/src/app/dialogs/tools/dialogpointofcontact.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofcontact.cpp @@ -28,12 +28,12 @@ #include "dialogpointofcontact.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolpointofcontact.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" -#include "dialogeditwrongformula.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogpointofcontact.h b/src/libs/vtools/dialogs/tools/dialogpointofcontact.h similarity index 100% rename from src/app/dialogs/tools/dialogpointofcontact.h rename to src/libs/vtools/dialogs/tools/dialogpointofcontact.h diff --git a/src/app/dialogs/tools/dialogpointofcontact.ui b/src/libs/vtools/dialogs/tools/dialogpointofcontact.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointofcontact.ui rename to src/libs/vtools/dialogs/tools/dialogpointofcontact.ui diff --git a/src/app/dialogs/tools/dialogpointofintersection.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp similarity index 97% rename from src/app/dialogs/tools/dialogpointofintersection.cpp rename to src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp index 510154b4b..ed249ae5b 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersection.cpp @@ -29,11 +29,10 @@ #include "dialogpointofintersection.h" #include "ui_dialogpointofintersection.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" #include "../../visualization/vistoolpointofintersection.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" +#include "../../../vwidgets/vmaingraphicsscene.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogpointofintersection.h b/src/libs/vtools/dialogs/tools/dialogpointofintersection.h similarity index 100% rename from src/app/dialogs/tools/dialogpointofintersection.h rename to src/libs/vtools/dialogs/tools/dialogpointofintersection.h diff --git a/src/app/dialogs/tools/dialogpointofintersection.ui b/src/libs/vtools/dialogs/tools/dialogpointofintersection.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointofintersection.ui rename to src/libs/vtools/dialogs/tools/dialogpointofintersection.ui diff --git a/src/app/dialogs/tools/dialogpointofintersectionarcs.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp similarity index 100% rename from src/app/dialogs/tools/dialogpointofintersectionarcs.cpp rename to src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.cpp diff --git a/src/app/dialogs/tools/dialogpointofintersectionarcs.h b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.h similarity index 98% rename from src/app/dialogs/tools/dialogpointofintersectionarcs.h rename to src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.h index c57909acd..b33e70f92 100644 --- a/src/app/dialogs/tools/dialogpointofintersectionarcs.h +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.h @@ -30,7 +30,6 @@ #define DIALOGPOINTOFINTERSECTIONARCS_H #include "dialogtool.h" -#include "../../xml/vpattern.h" namespace Ui { diff --git a/src/app/dialogs/tools/dialogpointofintersectionarcs.ui b/src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointofintersectionarcs.ui rename to src/libs/vtools/dialogs/tools/dialogpointofintersectionarcs.ui diff --git a/src/app/dialogs/tools/dialogpointofintersectioncircles.cpp b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp similarity index 98% rename from src/app/dialogs/tools/dialogpointofintersectioncircles.cpp rename to src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp index a83bba9ac..df7e723f6 100644 --- a/src/app/dialogs/tools/dialogpointofintersectioncircles.cpp +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.cpp @@ -29,11 +29,12 @@ #include "dialogpointofintersectioncircles.h" #include "ui_dialogpointofintersectioncircles.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolpointofintersectioncircles.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "dialogeditwrongformula.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- DialogPointOfIntersectionCircles::DialogPointOfIntersectionCircles(const VContainer *data, const quint32 &toolId, diff --git a/src/app/dialogs/tools/dialogpointofintersectioncircles.h b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.h similarity index 99% rename from src/app/dialogs/tools/dialogpointofintersectioncircles.h rename to src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.h index 192564776..06521767d 100644 --- a/src/app/dialogs/tools/dialogpointofintersectioncircles.h +++ b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.h @@ -30,7 +30,6 @@ #define DIALOGPOINTOFINTERSECTIONCIRCLES_H #include "dialogtool.h" -#include "../../xml/vpattern.h" namespace Ui { diff --git a/src/app/dialogs/tools/dialogpointofintersectioncircles.ui b/src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.ui similarity index 100% rename from src/app/dialogs/tools/dialogpointofintersectioncircles.ui rename to src/libs/vtools/dialogs/tools/dialogpointofintersectioncircles.ui diff --git a/src/app/dialogs/tools/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp similarity index 98% rename from src/app/dialogs/tools/dialogshoulderpoint.cpp rename to src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index deac5ef6f..e30f7c1e6 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp @@ -29,12 +29,13 @@ #include "dialogshoulderpoint.h" #include "ui_dialogshoulderpoint.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../visualization/vistoolshoulderpoint.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" -#include "dialogeditwrongformula.h" +#include "../support/dialogeditwrongformula.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogshoulderpoint.h b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.h similarity index 100% rename from src/app/dialogs/tools/dialogshoulderpoint.h rename to src/libs/vtools/dialogs/tools/dialogshoulderpoint.h diff --git a/src/app/dialogs/tools/dialogshoulderpoint.ui b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.ui similarity index 100% rename from src/app/dialogs/tools/dialogshoulderpoint.ui rename to src/libs/vtools/dialogs/tools/dialogshoulderpoint.ui diff --git a/src/app/dialogs/tools/dialogsinglepoint.cpp b/src/libs/vtools/dialogs/tools/dialogsinglepoint.cpp similarity index 100% rename from src/app/dialogs/tools/dialogsinglepoint.cpp rename to src/libs/vtools/dialogs/tools/dialogsinglepoint.cpp diff --git a/src/app/dialogs/tools/dialogsinglepoint.h b/src/libs/vtools/dialogs/tools/dialogsinglepoint.h similarity index 100% rename from src/app/dialogs/tools/dialogsinglepoint.h rename to src/libs/vtools/dialogs/tools/dialogsinglepoint.h diff --git a/src/app/dialogs/tools/dialogsinglepoint.ui b/src/libs/vtools/dialogs/tools/dialogsinglepoint.ui similarity index 100% rename from src/app/dialogs/tools/dialogsinglepoint.ui rename to src/libs/vtools/dialogs/tools/dialogsinglepoint.ui diff --git a/src/app/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp similarity index 100% rename from src/app/dialogs/tools/dialogspline.cpp rename to src/libs/vtools/dialogs/tools/dialogspline.cpp diff --git a/src/app/dialogs/tools/dialogspline.h b/src/libs/vtools/dialogs/tools/dialogspline.h similarity index 100% rename from src/app/dialogs/tools/dialogspline.h rename to src/libs/vtools/dialogs/tools/dialogspline.h diff --git a/src/app/dialogs/tools/dialogspline.ui b/src/libs/vtools/dialogs/tools/dialogspline.ui similarity index 100% rename from src/app/dialogs/tools/dialogspline.ui rename to src/libs/vtools/dialogs/tools/dialogspline.ui diff --git a/src/app/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp similarity index 100% rename from src/app/dialogs/tools/dialogsplinepath.cpp rename to src/libs/vtools/dialogs/tools/dialogsplinepath.cpp diff --git a/src/app/dialogs/tools/dialogsplinepath.h b/src/libs/vtools/dialogs/tools/dialogsplinepath.h similarity index 100% rename from src/app/dialogs/tools/dialogsplinepath.h rename to src/libs/vtools/dialogs/tools/dialogsplinepath.h diff --git a/src/app/dialogs/tools/dialogsplinepath.ui b/src/libs/vtools/dialogs/tools/dialogsplinepath.ui similarity index 100% rename from src/app/dialogs/tools/dialogsplinepath.ui rename to src/libs/vtools/dialogs/tools/dialogsplinepath.ui diff --git a/src/app/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp similarity index 98% rename from src/app/dialogs/tools/dialogtool.cpp rename to src/libs/vtools/dialogs/tools/dialogtool.cpp index 612c31f1a..209b3fb43 100644 --- a/src/app/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -27,14 +27,17 @@ *************************************************************************/ #include "dialogtool.h" -#include "../../libs/vpatterndb/calculator.h" -#include "../../libs/vpatterndb/vcontainer.h" -#include "../../libs/vgeometry/varc.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vgeometry/vsplinepath.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vcontainer.h" +#include "../../../vpatterndb/vtranslatevars.h" +#include "../../../vgeometry/varc.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vgeometry/vsplinepath.h" #include "../../tools/vabstracttool.h" -#include "../../../libs/qmuparser/qmuparsererror.h" -#include "../../libs/ifc/xml/vdomdocument.h" +#include "../../../qmuparser/qmuparsererror.h" +#include "../../../qmuparser/qmudef.h" +#include "../../../ifc/xml/vdomdocument.h" + #include #include #include diff --git a/src/app/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h similarity index 98% rename from src/app/dialogs/tools/dialogtool.h rename to src/libs/vtools/dialogs/tools/dialogtool.h index 20b8e102c..1b9ffd2db 100644 --- a/src/app/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -29,11 +29,11 @@ #ifndef DIALOGTOOL_H #define DIALOGTOOL_H -#include "../../core/vapplication.h" -#include "../libs/vmisc/logging.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" +#include "../../../vmisc/vabstractapplication.h" +#include "../../../vmisc/logging.h" +#include "../../../vwidgets/vmaingraphicsscene.h" #include "../../visualization/visualization.h" -#include "../../xml/vpattern.h" +#include "../../../ifc/xml/vabstractpattern.h" #include #include diff --git a/src/app/dialogs/tools/dialogtriangle.cpp b/src/libs/vtools/dialogs/tools/dialogtriangle.cpp similarity index 98% rename from src/app/dialogs/tools/dialogtriangle.cpp rename to src/libs/vtools/dialogs/tools/dialogtriangle.cpp index 97bfbee1b..74a8bc681 100644 --- a/src/app/dialogs/tools/dialogtriangle.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtriangle.cpp @@ -28,11 +28,10 @@ #include "dialogtriangle.h" #include "ui_dialogtriangle.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vcontainer.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vcontainer.h" #include "../../visualization/vistooltriangle.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" +#include "../../../vwidgets/vmaingraphicsscene.h" //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/app/dialogs/tools/dialogtriangle.h b/src/libs/vtools/dialogs/tools/dialogtriangle.h similarity index 100% rename from src/app/dialogs/tools/dialogtriangle.h rename to src/libs/vtools/dialogs/tools/dialogtriangle.h diff --git a/src/app/dialogs/tools/dialogtriangle.ui b/src/libs/vtools/dialogs/tools/dialogtriangle.ui similarity index 100% rename from src/app/dialogs/tools/dialogtriangle.ui rename to src/libs/vtools/dialogs/tools/dialogtriangle.ui diff --git a/src/app/dialogs/tools/dialoguniondetails.cpp b/src/libs/vtools/dialogs/tools/dialoguniondetails.cpp similarity index 100% rename from src/app/dialogs/tools/dialoguniondetails.cpp rename to src/libs/vtools/dialogs/tools/dialoguniondetails.cpp diff --git a/src/app/dialogs/tools/dialoguniondetails.h b/src/libs/vtools/dialogs/tools/dialoguniondetails.h similarity index 100% rename from src/app/dialogs/tools/dialoguniondetails.h rename to src/libs/vtools/dialogs/tools/dialoguniondetails.h diff --git a/src/app/dialogs/tools/dialoguniondetails.ui b/src/libs/vtools/dialogs/tools/dialoguniondetails.ui similarity index 100% rename from src/app/dialogs/tools/dialoguniondetails.ui rename to src/libs/vtools/dialogs/tools/dialoguniondetails.ui diff --git a/src/libs/vtools/stable.cpp b/src/libs/vtools/stable.cpp new file mode 100644 index 000000000..e291c2801 --- /dev/null +++ b/src/libs/vtools/stable.cpp @@ -0,0 +1,30 @@ +/************************************************************************ + ** + ** @file stable.cpp + ** @author Roman Telezhynskyi + ** @date November 15, 2013 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +// Build the precompiled headers. +#include "stable.h" diff --git a/src/libs/vtools/stable.h b/src/libs/vtools/stable.h new file mode 100644 index 000000000..fd7241f19 --- /dev/null +++ b/src/libs/vtools/stable.h @@ -0,0 +1,82 @@ +/************************************************************************ + ** + ** @file stable.h + ** @author Roman Telezhynskyi + ** @date November 15, 2013 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef STABLE_H +#define STABLE_H + +/* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ +#ifndef __clang__ +#pragma message("Compiling precompiled headers for VTools library.\n") +#endif + +/* Add C includes here */ + +#if defined __cplusplus +/* Add C++ includes here */ +#include + +/*In all cases we need include core header for getting defined values*/ +//#ifdef QT_CORE_LIB +//# include +//#endif + +#ifdef QT_GUI_LIB +# include +#endif + +#ifdef QT_XML_LIB +# include +#endif + +//In Windows you can't use same header in all modes. +#if !defined(Q_OS_WIN) +# ifdef QT_WIDGETS_LIB +# include +# endif + +# ifdef QT_SVG_LIB +# include +# endif + +# ifdef QT_PRINTSUPPORT_LIB +# include +# endif + + //Build doesn't work, if include this headers on Windows. +# ifdef QT_XMLPATTERNS_LIB +# include +# endif + +# ifdef QT_NETWORK_LIB +# include +# endif +#endif/*Q_OS_WIN*/ + +#endif /*__cplusplus*/ + +#endif // STABLE_H diff --git a/src/app/tools/drawTools/drawtools.h b/src/libs/vtools/tools/drawTools/drawtools.h similarity index 100% rename from src/app/tools/drawTools/drawtools.h rename to src/libs/vtools/tools/drawTools/drawtools.h diff --git a/src/app/tools/drawTools/vabstractspline.cpp b/src/libs/vtools/tools/drawTools/vabstractspline.cpp similarity index 98% rename from src/app/tools/drawTools/vabstractspline.cpp rename to src/libs/vtools/tools/drawTools/vabstractspline.cpp index 8d5840880..e3c043b58 100644 --- a/src/app/tools/drawTools/vabstractspline.cpp +++ b/src/libs/vtools/tools/drawTools/vabstractspline.cpp @@ -32,7 +32,7 @@ const QString VAbstractSpline::TagName = QStringLiteral("spline"); //--------------------------------------------------------------------------------------------------------------------- -VAbstractSpline::VAbstractSpline(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) +VAbstractSpline::VAbstractSpline(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector()), sceneType(SceneObject::Unknown), isHovered(false), detailsMode(false) {} diff --git a/src/app/tools/drawTools/vabstractspline.h b/src/libs/vtools/tools/drawTools/vabstractspline.h similarity index 96% rename from src/app/tools/drawTools/vabstractspline.h rename to src/libs/vtools/tools/drawTools/vabstractspline.h index 48f90295c..23e4d6160 100644 --- a/src/app/tools/drawTools/vabstractspline.h +++ b/src/libs/vtools/tools/drawTools/vabstractspline.h @@ -30,14 +30,15 @@ #define VABSTRACTSPLINE_H #include "vdrawtool.h" +#include "../../../vwidgets/vcontrolpointspline.h" + #include -#include "../libs/vwidgets/vcontrolpointspline.h" class VAbstractSpline:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: - VAbstractSpline(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr); + VAbstractSpline(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr); virtual ~VAbstractSpline(); // cppcheck-suppress duplInheritedMember static const QString TagName; diff --git a/src/app/tools/drawTools/vdrawtool.cpp b/src/libs/vtools/tools/drawTools/vdrawtool.cpp similarity index 94% rename from src/app/tools/drawTools/vdrawtool.cpp rename to src/libs/vtools/tools/drawTools/vdrawtool.cpp index c52726d64..a8c9ab8cf 100644 --- a/src/app/tools/drawTools/vdrawtool.cpp +++ b/src/libs/vtools/tools/drawTools/vdrawtool.cpp @@ -28,13 +28,13 @@ #include "vdrawtool.h" -#include -#include "../../dialogs/tools/dialogeditwrongformula.h" -#include "../../dialogs/app/dialogundo.h" -#include "../libs/vpatterndb/calculator.h" +#include "../../../qmuparser/qmuparsererror.h" +#include "../../dialogs/support/dialogeditwrongformula.h" +#include "../../dialogs/support/dialogundo.h" +#include "../../../vpatterndb/calculator.h" #include "../../undocommands/addtocalc.h" #include "../../undocommands/savetooloptions.h" -#include "../../libs/ifc/exception/vexceptionundo.h" +#include "../../../ifc/exception/vexceptionundo.h" qreal VDrawTool::factor = 1; @@ -45,13 +45,13 @@ qreal VDrawTool::factor = 1; * @param data container with variables. * @param id object id in container. */ -VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent) +VDrawTool::VDrawTool(VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent) :VAbstractTool(doc, data, id, parent), nameActivDraw(doc->GetNameActivPP()), dialog(nullptr), typeLine(TypeLineLine), lineColor(ColorBlack), enabled(true) { - connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw); - connect(this->doc, &VPattern::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); - connect(this->doc, &VPattern::ShowTool, this, &VDrawTool::ShowTool); + connect(this->doc, &VAbstractPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw); + connect(this->doc, &VAbstractPattern::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); + connect(this->doc, &VAbstractPattern::ShowTool, this, &VDrawTool::ShowTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -255,7 +255,7 @@ void VDrawTool::DialogLinkDestroy() */ void VDrawTool::SetFactor(qreal factor) { - VApplication::CheckFactor(this->factor, factor); + CheckFactor(this->factor, factor); } //--------------------------------------------------------------------------------------------------------------------- @@ -351,7 +351,7 @@ qreal VDrawTool::CheckFormula(const quint32 &toolId, QString &formula, VContaine void VDrawTool::AddToCalculation(const QDomElement &domElement) { AddToCalc *addToCal = new AddToCalc(domElement, doc); - connect(addToCal, &AddToCalc::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(addToCal, &AddToCalc::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); qApp->getUndoStack()->push(addToCal); } diff --git a/src/app/tools/drawTools/vdrawtool.h b/src/libs/vtools/tools/drawTools/vdrawtool.h similarity index 96% rename from src/app/tools/drawTools/vdrawtool.h rename to src/libs/vtools/tools/drawTools/vdrawtool.h index 9e968dc46..1057af0f7 100644 --- a/src/app/tools/drawTools/vdrawtool.h +++ b/src/libs/vtools/tools/drawTools/vdrawtool.h @@ -30,12 +30,13 @@ #define VDRAWTOOL_H #include "../vabstracttool.h" +#include "../../dialogs/tools/dialogtool.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../../../vwidgets/vmaingraphicsview.h" + #include #include #include -#include "../../dialogs/tools/dialogtool.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../xml/vpattern.h" /** * @brief The VDrawTool abstract class for all draw tool. @@ -45,7 +46,7 @@ class VDrawTool : public VAbstractTool Q_OBJECT public: - VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent = nullptr); + VDrawTool(VAbstractPattern *doc, VContainer *data, quint32 id, QObject *parent = nullptr); virtual ~VDrawTool(); /** @brief factor scene scale factor. */ diff --git a/src/app/tools/drawTools/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/vtoolalongline.cpp similarity index 96% rename from src/app/tools/drawTools/vtoolalongline.cpp rename to src/libs/vtools/tools/drawTools/vtoolalongline.cpp index 9b50106ea..e14c2a0b8 100644 --- a/src/app/tools/drawTools/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolalongline.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "vtoolalongline.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogalongline.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/ifc/exception/vexceptionobjecterror.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../ifc/exception/vexceptionobjecterror.h" #include "../../visualization/vistoolalongline.h" const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); @@ -48,7 +49,7 @@ const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolAlongLine::VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula, +VToolAlongLine::VToolAlongLine(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine, const QString &lineColor, const Source &typeCreation, QGraphicsItem *parent) @@ -192,7 +193,8 @@ void VToolAlongLine::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolAlongLine* VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolAlongLine* VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data) { SCASSERT(dialog != nullptr); DialogAlongLine *dialogTool = qobject_cast(dialog); @@ -233,7 +235,7 @@ VToolAlongLine* VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *s VToolAlongLine* VToolAlongLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer firstPoint = data->GeometricObject(firstPointId); diff --git a/src/app/tools/drawTools/vtoolalongline.h b/src/libs/vtools/tools/drawTools/vtoolalongline.h similarity index 89% rename from src/app/tools/drawTools/vtoolalongline.h rename to src/libs/vtools/tools/drawTools/vtoolalongline.h index 9fe5acd38..a770db865 100644 --- a/src/app/tools/drawTools/vtoolalongline.h +++ b/src/libs/vtools/tools/drawTools/vtoolalongline.h @@ -39,15 +39,17 @@ class VToolAlongLine : public VToolLinePoint Q_OBJECT public: - VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula, const quint32 &firstPointId, + VToolAlongLine(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &formula, + const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine, const QString &lineColor, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolAlongLine* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolAlongLine* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolAlongLine* Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/vtoolarc.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolarc.cpp rename to src/libs/vtools/tools/drawTools/vtoolarc.cpp index a520dd08d..0fd4073e3 100644 --- a/src/app/tools/drawTools/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolarc.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "vtoolarc.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogarc.h" -#include "../../libs/vgeometry/varc.h" -#include "../../libs/vpatterndb/vformula.h" +#include "../../../vgeometry/varc.h" +#include "../../../vpatterndb/vformula.h" #include "../../visualization/vistoolarc.h" #include @@ -47,7 +48,8 @@ const QString VToolArc::ToolType = QStringLiteral("simple"); * @param typeCreation way we create this tool. * @param parent parent object */ -VToolArc::VToolArc(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, +VToolArc::VToolArc(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, + const Source &typeCreation, QGraphicsItem *parent) :VAbstractSpline(doc, data, id, parent) { @@ -88,7 +90,7 @@ void VToolArc::setDialog() * @param doc dom document container * @param data container with variables */ -VToolArc* VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolArc* VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogArc *dialogTool = qobject_cast(dialog); @@ -122,7 +124,7 @@ VToolArc* VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatte * @param typeCreation way we create this tool. */ VToolArc* VToolArc::Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, QString &f2, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; diff --git a/src/app/tools/drawTools/vtoolarc.h b/src/libs/vtools/tools/drawTools/vtoolarc.h similarity index 92% rename from src/app/tools/drawTools/vtoolarc.h rename to src/libs/vtools/tools/drawTools/vtoolarc.h index e67072579..46339e84c 100644 --- a/src/app/tools/drawTools/vtoolarc.h +++ b/src/libs/vtools/tools/drawTools/vtoolarc.h @@ -40,12 +40,12 @@ class VToolArc :public VAbstractSpline { Q_OBJECT public: - VToolArc(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, + VToolArc(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolArc* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolArc* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolArc* Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, QString &f2, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/drawTools/vtoolarcwithlength.cpp b/src/libs/vtools/tools/drawTools/vtoolarcwithlength.cpp similarity index 96% rename from src/app/tools/drawTools/vtoolarcwithlength.cpp rename to src/libs/vtools/tools/drawTools/vtoolarcwithlength.cpp index bbcde358b..1f9b25054 100644 --- a/src/app/tools/drawTools/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolarcwithlength.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "vtoolarcwithlength.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogarcwithlength.h" -#include "../../libs/vgeometry/varc.h" -#include "../../libs/vpatterndb/vformula.h" +#include "../../../vgeometry/varc.h" +#include "../../../vpatterndb/vformula.h" #include "../../visualization/vistoolarcwithlength.h" #include @@ -39,7 +40,7 @@ const QString VToolArcWithLength::TagName = QStringLiteral("arc"); const QString VToolArcWithLength::ToolType = QStringLiteral("arcWithLength"); //--------------------------------------------------------------------------------------------------------------------- -VToolArcWithLength::VToolArcWithLength(VPattern *doc, VContainer *data, quint32 id, const QString &color, +VToolArcWithLength::VToolArcWithLength(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, QGraphicsItem *parent) :VAbstractSpline(doc, data, id, parent) { @@ -70,7 +71,7 @@ void VToolArcWithLength::setDialog() } //--------------------------------------------------------------------------------------------------------------------- -VToolArcWithLength *VToolArcWithLength::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolArcWithLength *VToolArcWithLength::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -93,7 +94,7 @@ VToolArcWithLength *VToolArcWithLength::Create(DialogTool *dialog, VMainGraphics //--------------------------------------------------------------------------------------------------------------------- VToolArcWithLength *VToolArcWithLength::Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, QString &length, const QString &color, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { qreal calcRadius = 0, calcF1 = 0, calcLength = 0; diff --git a/src/app/tools/drawTools/vtoolarcwithlength.h b/src/libs/vtools/tools/drawTools/vtoolarcwithlength.h similarity index 89% rename from src/app/tools/drawTools/vtoolarcwithlength.h rename to src/libs/vtools/tools/drawTools/vtoolarcwithlength.h index 38d3e7cbd..63054f455 100644 --- a/src/app/tools/drawTools/vtoolarcwithlength.h +++ b/src/libs/vtools/tools/drawTools/vtoolarcwithlength.h @@ -37,13 +37,16 @@ class VToolArcWithLength : public VAbstractSpline { Q_OBJECT public: - VToolArcWithLength(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, + VToolArcWithLength(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, + const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolArcWithLength* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolArcWithLength* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolArcWithLength* Create(const quint32 _id, const quint32 ¢er, QString &radius, QString &f1, - QString &length, const QString &color, VMainGraphicsScene *scene, VPattern *doc, + QString &length, const QString &color, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/drawTools/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/vtoolbisector.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolbisector.cpp rename to src/libs/vtools/tools/drawTools/vtoolbisector.cpp index def7fd069..eb7f32f6a 100644 --- a/src/app/tools/drawTools/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolbisector.cpp @@ -27,9 +27,10 @@ *************************************************************************/ #include "vtoolbisector.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogbisector.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolbisector.h" const QString VToolBisector::ToolType = QStringLiteral("bisector"); @@ -48,7 +49,7 @@ const QString VToolBisector::ToolType = QStringLiteral("bisector"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolBisector::VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolBisector::VToolBisector(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &thirdPointId, const Source &typeCreation, QGraphicsItem *parent) @@ -123,7 +124,7 @@ void VToolBisector::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolBisector* VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolBisector* VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -167,7 +168,8 @@ VToolBisector* VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *sce VToolBisector* VToolBisector::Create(const quint32 _id, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal &mx, - const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer firstPoint = data->GeometricObject(firstPointId); diff --git a/src/app/tools/drawTools/vtoolbisector.h b/src/libs/vtools/tools/drawTools/vtoolbisector.h similarity index 89% rename from src/app/tools/drawTools/vtoolbisector.h rename to src/libs/vtools/tools/drawTools/vtoolbisector.h index 040753725..9c8902983 100644 --- a/src/app/tools/drawTools/vtoolbisector.h +++ b/src/libs/vtools/tools/drawTools/vtoolbisector.h @@ -39,18 +39,21 @@ class VToolBisector : public VToolLinePoint Q_OBJECT public: - VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, + VToolBisector(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + const QString &lineColor, const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &thirdPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); static qreal BisectorAngle(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint); static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint, const qreal& length); virtual void setDialog(); - static VToolBisector* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolBisector* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolBisector* Create(const quint32 _id, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.cpp similarity index 95% rename from src/app/tools/drawTools/vtoolcurveintersectaxis.cpp rename to src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.cpp index 2520c1e1b..1b3df0490 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.cpp @@ -27,17 +27,18 @@ *************************************************************************/ #include "vtoolcurveintersectaxis.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogcurveintersectaxis.h" -#include "../../dialogs/tools/dialogeditwrongformula.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../dialogs/support/dialogeditwrongformula.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolcurveintersectaxis.h" const QString VToolCurveIntersectAxis::ToolType = QStringLiteral("curveIntersectAxis"); //--------------------------------------------------------------------------------------------------------------------- -VToolCurveIntersectAxis::VToolCurveIntersectAxis(VPattern *doc, VContainer *data, const quint32 &id, +VToolCurveIntersectAxis::VToolCurveIntersectAxis(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formulaAngle, const quint32 &basePointId, const quint32 &curveId, const Source &typeCreation, @@ -69,7 +70,8 @@ void VToolCurveIntersectAxis::setDialog() } //--------------------------------------------------------------------------------------------------------------------- -VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(DialogTool *dialog, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -97,7 +99,8 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(const quint32 _id, cons const QString &typeLine, const QString &lineColor, QString &formulaAngle, const quint32 &basePointId, const quint32 &curveId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer basePoint = data->GeometricObject(basePointId); diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.h b/src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.h similarity index 94% rename from src/app/tools/drawTools/vtoolcurveintersectaxis.h rename to src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.h index 52dfb9e9b..08930c408 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/vtoolcurveintersectaxis.h @@ -35,18 +35,18 @@ class VToolCurveIntersectAxis : public VToolLinePoint { Q_OBJECT public: - VToolCurveIntersectAxis(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + VToolCurveIntersectAxis(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formulaAngle, const quint32 &basePointId, const quint32 &curveId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual ~VToolCurveIntersectAxis(); virtual void setDialog(); - static VToolCurveIntersectAxis *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolCurveIntersectAxis *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolCurveIntersectAxis *Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formulaAngle, const quint32 &basePointId, const quint32 &curveId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &point, qreal angle, const QSharedPointer &curve); diff --git a/src/app/tools/drawTools/vtoolcut.cpp b/src/libs/vtools/tools/drawTools/vtoolcut.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolcut.cpp rename to src/libs/vtools/tools/drawTools/vtoolcut.cpp index 2fbf78129..bac317390 100644 --- a/src/app/tools/drawTools/vtoolcut.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolcut.cpp @@ -31,7 +31,7 @@ #include "../../libs/vpatterndb/vformula.h" //--------------------------------------------------------------------------------------------------------------------- -VToolCut::VToolCut(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, +VToolCut::VToolCut(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &curveCutId, const quint32 &curve1id, const quint32 &curve2id, const QString &color, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), formula(formula), firstCurve(nullptr), secondCurve(nullptr), diff --git a/src/app/tools/drawTools/vtoolcut.h b/src/libs/vtools/tools/drawTools/vtoolcut.h similarity index 95% rename from src/app/tools/drawTools/vtoolcut.h rename to src/libs/vtools/tools/drawTools/vtoolcut.h index eb71ac1d7..a5073b0c5 100644 --- a/src/app/tools/drawTools/vtoolcut.h +++ b/src/libs/vtools/tools/drawTools/vtoolcut.h @@ -30,7 +30,7 @@ #define VTOOLCUT_H #include "vtoolpoint.h" -#include "../../libs/vwidgets/vsimplecurve.h" +#include "../../../vwidgets/vsimplecurve.h" #include "vabstractspline.h" class VFormula; @@ -39,7 +39,8 @@ class VToolCut : public VToolPoint { Q_OBJECT public: - VToolCut(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &curveCutId, + VToolCut(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, + const quint32 &curveCutId, const quint32 &curve1id, const quint32 &curve2id, const QString &color, QGraphicsItem * parent = nullptr); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Cut)}; diff --git a/src/app/tools/drawTools/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/vtoolcutarc.cpp similarity index 95% rename from src/app/tools/drawTools/vtoolcutarc.cpp rename to src/libs/vtools/tools/drawTools/vtoolcutarc.cpp index 075d96b63..bf779a791 100644 --- a/src/app/tools/drawTools/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolcutarc.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "vtoolcutarc.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogcutarc.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vgeometry/varc.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vgeometry/varc.h" #include "../../visualization/vistoolcutarc.h" const QString VToolCutArc::ToolType = QStringLiteral("cutArc"); @@ -48,7 +49,7 @@ const QString VToolCutArc::ToolType = QStringLiteral("cutArc"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolCutArc::VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, +VToolCutArc::VToolCutArc(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id, const QString &color, const Source &typeCreation, QGraphicsItem * parent) :VToolCut(doc, data, id, formula, arcId, arc1id, arc2id, color, parent) @@ -83,7 +84,7 @@ void VToolCutArc::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolCutArc* VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolCutArc* VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogCutArc *dialogTool = qobject_cast(dialog); @@ -118,7 +119,8 @@ VToolCutArc* VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, */ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &arcId, const qreal &mx, const qreal &my, const QString &color, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation) { const QSharedPointer arc = data->GeometricObject(arcId); diff --git a/src/app/tools/drawTools/vtoolcutarc.h b/src/libs/vtools/tools/drawTools/vtoolcutarc.h similarity index 88% rename from src/app/tools/drawTools/vtoolcutarc.h rename to src/libs/vtools/tools/drawTools/vtoolcutarc.h index cfe4d11b6..b805d4f10 100644 --- a/src/app/tools/drawTools/vtoolcutarc.h +++ b/src/libs/vtools/tools/drawTools/vtoolcutarc.h @@ -38,14 +38,16 @@ class VToolCutArc : public VToolCut { Q_OBJECT public: - VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &arcId, + VToolCutArc(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, + const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolCutArc* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolCutArc* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolCutArc* Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &arcId, const qreal &mx, const qreal &my, const QString &color, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::CutArc)}; diff --git a/src/app/tools/drawTools/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/vtoolcutspline.cpp similarity index 96% rename from src/app/tools/drawTools/vtoolcutspline.cpp rename to src/libs/vtools/tools/drawTools/vtoolcutspline.cpp index 2ad1bae44..ce3b01beb 100644 --- a/src/app/tools/drawTools/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolcutspline.cpp @@ -27,11 +27,12 @@ *************************************************************************/ #include "vtoolcutspline.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogcutspline.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolcutspline.h" -#include "../../libs/vgeometry/vspline.h" +#include "../../../vgeometry/vspline.h" const QString VToolCutSpline::ToolType = QStringLiteral("cutSpline"); const QString VToolCutSpline::AttrSpline = QStringLiteral("spline"); @@ -47,7 +48,7 @@ const QString VToolCutSpline::AttrSpline = QStringLiteral("spline"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolCutSpline::VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, +VToolCutSpline::VToolCutSpline(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id, const QString &color, const Source &typeCreation, QGraphicsItem *parent) :VToolCut(doc, data, id, formula, splineId, spl1id, spl2id, color, parent) @@ -83,7 +84,7 @@ void VToolCutSpline::setDialog() * @param data container with variables. */ VToolCutSpline* VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data) + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogCutSpline *dialogTool = qobject_cast(dialog); @@ -119,7 +120,7 @@ VToolCutSpline* VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *s */ VToolCutSpline* VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my, const QString &color, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer spl = data->GeometricObject(splineId); diff --git a/src/app/tools/drawTools/vtoolcutspline.h b/src/libs/vtools/tools/drawTools/vtoolcutspline.h similarity index 89% rename from src/app/tools/drawTools/vtoolcutspline.h rename to src/libs/vtools/tools/drawTools/vtoolcutspline.h index 164463d47..df3c92d66 100644 --- a/src/app/tools/drawTools/vtoolcutspline.h +++ b/src/libs/vtools/tools/drawTools/vtoolcutspline.h @@ -39,14 +39,16 @@ class VToolCutSpline : public VToolCut Q_OBJECT public: - VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, + VToolCutSpline(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolCutSpline *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolCutSpline *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolCutSpline *Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my, const QString &color, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static const QString ToolType; static const QString AttrSpline; diff --git a/src/app/tools/drawTools/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/vtoolcutsplinepath.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolcutsplinepath.cpp rename to src/libs/vtools/tools/drawTools/vtoolcutsplinepath.cpp index 2e8ef38ee..724ca3571 100644 --- a/src/app/tools/drawTools/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolcutsplinepath.cpp @@ -27,11 +27,12 @@ *************************************************************************/ #include "vtoolcutsplinepath.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogcutsplinepath.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolcutsplinepath.h" -#include "../../libs/vgeometry/vsplinepath.h" +#include "../../../vgeometry/vsplinepath.h" const QString VToolCutSplinePath::ToolType = QStringLiteral("cutSplinePath"); const QString VToolCutSplinePath::AttrSplinePath = QStringLiteral("splinePath"); @@ -49,7 +50,7 @@ const QString VToolCutSplinePath::AttrSplinePath = QStringLiteral("splinePath"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolCutSplinePath::VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, +VToolCutSplinePath::VToolCutSplinePath(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &splinePathId, const quint32 &splPath1id, const quint32 &splPath2id, const QString &color, const Source &typeCreation, QGraphicsItem *parent) @@ -85,7 +86,7 @@ void VToolCutSplinePath::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -122,7 +123,7 @@ VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphics */ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splinePathId, const qreal &mx, const qreal &my, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer splPath = data->GeometricObject(splinePathId); diff --git a/src/app/tools/drawTools/vtoolcutsplinepath.h b/src/libs/vtools/tools/drawTools/vtoolcutsplinepath.h similarity index 90% rename from src/app/tools/drawTools/vtoolcutsplinepath.h rename to src/libs/vtools/tools/drawTools/vtoolcutsplinepath.h index 1e230f3cf..0fd9107bc 100644 --- a/src/app/tools/drawTools/vtoolcutsplinepath.h +++ b/src/libs/vtools/tools/drawTools/vtoolcutsplinepath.h @@ -40,14 +40,16 @@ class VToolCutSplinePath : public VToolCut Q_OBJECT public: - VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, + VToolCutSplinePath(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &formula, const quint32 &splinePathId, const quint32 &splPath1id, const quint32 &splPath2id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolCutSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolCutSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolCutSplinePath *Create(const quint32 _id, const QString &pointName, QString &formula, const quint32 &splinePathId, const qreal &mx, const qreal &my, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation); static const QString ToolType; static const QString AttrSplinePath; diff --git a/src/app/tools/drawTools/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/vtoolendline.cpp similarity index 94% rename from src/app/tools/drawTools/vtoolendline.cpp rename to src/libs/vtools/tools/drawTools/vtoolendline.cpp index c44d267a7..24c9f027e 100644 --- a/src/app/tools/drawTools/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolendline.cpp @@ -27,11 +27,12 @@ *************************************************************************/ #include "vtoolendline.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogendline.h" -#include "../../dialogs/tools/dialogeditwrongformula.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../dialogs/support/dialogeditwrongformula.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolendline.h" const QString VToolEndLine::ToolType = QStringLiteral("endLine"); @@ -49,7 +50,7 @@ const QString VToolEndLine::ToolType = QStringLiteral("endLine"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolEndLine::VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolEndLine::VToolEndLine(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formulaLength, const QString &formulaAngle, const quint32 &basePointId, const Source &typeCreation, QGraphicsItem *parent) :VToolLinePoint(doc, data, id, typeLine, lineColor, formulaLength, basePointId, 0, parent), @@ -90,7 +91,8 @@ void VToolEndLine::setDialog() * @param data container with variables. * @return the created tool */ -VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data) { SCASSERT(dialog != nullptr); DialogEndLine *dialogTool = qobject_cast(dialog); @@ -134,7 +136,8 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene VToolEndLine* VToolEndLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formulaLength, QString &formulaAngle, const quint32 &basePointId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation) { const QSharedPointer basePoint = data->GeometricObject(basePointId); diff --git a/src/app/tools/drawTools/vtoolendline.h b/src/libs/vtools/tools/drawTools/vtoolendline.h similarity index 87% rename from src/app/tools/drawTools/vtoolendline.h rename to src/libs/vtools/tools/drawTools/vtoolendline.h index b8c0d6977..95277c137 100644 --- a/src/app/tools/drawTools/vtoolendline.h +++ b/src/libs/vtools/tools/drawTools/vtoolendline.h @@ -39,16 +39,19 @@ class VToolEndLine : public VToolLinePoint Q_OBJECT public: - VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, + VToolEndLine(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + const QString &lineColor, const QString &formulaLength, const QString &formulaAngle, const quint32 &basePointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual ~VToolEndLine(); virtual void setDialog(); - static VToolEndLine *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolEndLine *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolEndLine *Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formulaLength, QString &formulaAngle, const quint32 &basePointId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolheight.cpp b/src/libs/vtools/tools/drawTools/vtoolheight.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolheight.cpp rename to src/libs/vtools/tools/drawTools/vtoolheight.cpp index 2e119838e..cc229400b 100644 --- a/src/app/tools/drawTools/vtoolheight.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolheight.cpp @@ -46,7 +46,7 @@ const QString VToolHeight::ToolType = QStringLiteral("height"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolHeight::VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolHeight::VToolHeight(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId, const Source &typeCreation, QGraphicsItem * parent) :VToolLinePoint(doc, data, id, typeLine, lineColor, QString(), basePointId, 0, parent), p1LineId(p1LineId), @@ -82,7 +82,7 @@ void VToolHeight::setDialog() * @param data container with variables. * @return the created tool */ -VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogHeight *dialogTool = qobject_cast(dialog); @@ -125,7 +125,8 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, VToolHeight* VToolHeight::Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation) { const QSharedPointer basePoint = data->GeometricObject(basePointId); const QSharedPointer p1Line = data->GeometricObject(p1LineId); diff --git a/src/app/tools/drawTools/vtoolheight.h b/src/libs/vtools/tools/drawTools/vtoolheight.h similarity index 89% rename from src/app/tools/drawTools/vtoolheight.h rename to src/libs/vtools/tools/drawTools/vtoolheight.h index f8ec5637c..244ffcd0a 100644 --- a/src/app/tools/drawTools/vtoolheight.h +++ b/src/libs/vtools/tools/drawTools/vtoolheight.h @@ -39,15 +39,17 @@ class VToolHeight: public VToolLinePoint Q_OBJECT public: - VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, + VToolHeight(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + const QString &lineColor, const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolHeight *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolHeight *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolHeight *Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation); static QPointF FindPoint(const QLineF &line, const QPointF &point); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/libs/vtools/tools/drawTools/vtoolline.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolline.cpp rename to src/libs/vtools/tools/drawTools/vtoolline.cpp index 0ef1cbfe7..462426451 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolline.cpp @@ -47,7 +47,7 @@ const QString VToolLine::TagName = QStringLiteral("line"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint, +VToolLine::VToolLine(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint, const QString &typeLine, const QString &lineColor, const Source &typeCreation, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint) @@ -91,7 +91,7 @@ void VToolLine::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogLine *dialogTool = qobject_cast(dialog); @@ -126,7 +126,8 @@ VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPat */ VToolLine * VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine, const QString &lineColor, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation) { SCASSERT(scene != nullptr); SCASSERT(doc != nullptr); diff --git a/src/app/tools/drawTools/vtoolline.h b/src/libs/vtools/tools/drawTools/vtoolline.h similarity index 92% rename from src/app/tools/drawTools/vtoolline.h rename to src/libs/vtools/tools/drawTools/vtoolline.h index 733995acf..49d7d98ac 100644 --- a/src/app/tools/drawTools/vtoolline.h +++ b/src/libs/vtools/tools/drawTools/vtoolline.h @@ -39,14 +39,15 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem { Q_OBJECT public: - VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint, + VToolLine(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint, const QString &typeLine, const QString &lineColor, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolLine *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolLine *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolLine *Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine, const QString &lineColor, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); + VAbstractPattern *doc, VContainer *data, const Document &parse, + const Source &typeCreation); static const QString TagName; virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0); virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoollineintersect.cpp b/src/libs/vtools/tools/drawTools/vtoollineintersect.cpp similarity index 98% rename from src/app/tools/drawTools/vtoollineintersect.cpp rename to src/libs/vtools/tools/drawTools/vtoollineintersect.cpp index d64615c34..6d0c640c4 100644 --- a/src/app/tools/drawTools/vtoollineintersect.cpp +++ b/src/libs/vtools/tools/drawTools/vtoollineintersect.cpp @@ -46,7 +46,7 @@ const QString VToolLineIntersect::ToolType = QStringLiteral("lineIntersect"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolLineIntersect::VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, +VToolLineIntersect::VToolLineIntersect(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1, const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p2Line2, const Source &typeCreation, QGraphicsItem *parent) @@ -82,7 +82,7 @@ void VToolLineIntersect::setDialog() * @param data container with variables. * @return the created tool */ -VToolLineIntersect* VToolLineIntersect::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolLineIntersect* VToolLineIntersect::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -124,7 +124,7 @@ VToolLineIntersect* VToolLineIntersect::Create(DialogTool *dialog, VMainGraphics VToolLineIntersect* VToolLineIntersect::Create(const quint32 _id, const quint32 &p1Line1Id, const quint32 &p2Line1Id, const quint32 &p1Line2Id, const quint32 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer p1Line1 = data->GeometricObject(p1Line1Id); diff --git a/src/app/tools/drawTools/vtoollineintersect.h b/src/libs/vtools/tools/drawTools/vtoollineintersect.h similarity index 91% rename from src/app/tools/drawTools/vtoollineintersect.h rename to src/libs/vtools/tools/drawTools/vtoollineintersect.h index a28f2e010..0994f4dbd 100644 --- a/src/app/tools/drawTools/vtoollineintersect.h +++ b/src/libs/vtools/tools/drawTools/vtoollineintersect.h @@ -38,14 +38,16 @@ class VToolLineIntersect:public VToolPoint { Q_OBJECT public: - VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1, + VToolLineIntersect(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1, const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p2Line2, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolLineIntersect *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolLineIntersect *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolLineIntersect *Create(const quint32 _id, const quint32 &p1Line1Id, const quint32 &p2Line1Id, const quint32 &p1Line2Id, const quint32 &p2Line2Id, const QString &pointName, - const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &mx, const qreal &my, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/vtoollineintersectaxis.cpp similarity index 95% rename from src/app/tools/drawTools/vtoollineintersectaxis.cpp rename to src/libs/vtools/tools/drawTools/vtoollineintersectaxis.cpp index 4dbc92919..a6a2928cd 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/vtoollineintersectaxis.cpp @@ -27,17 +27,18 @@ *************************************************************************/ #include "vtoollineintersectaxis.h" -#include "../../libs/vwidgets/vmaingraphicsscene.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vwidgets/vmaingraphicsscene.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialoglineintersectaxis.h" -#include "../../dialogs/tools/dialogeditwrongformula.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../dialogs/support/dialogeditwrongformula.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoollineintersectaxis.h" const QString VToolLineIntersectAxis::ToolType = QStringLiteral("lineIntersectAxis"); //--------------------------------------------------------------------------------------------------------------------- -VToolLineIntersectAxis::VToolLineIntersectAxis(VPattern *doc, VContainer *data, const quint32 &id, +VToolLineIntersectAxis::VToolLineIntersectAxis(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formulaAngle, const quint32 &basePointId, const quint32 &firstPointId, const quint32 &secondPointId, @@ -70,7 +71,8 @@ void VToolLineIntersectAxis::setDialog() } //--------------------------------------------------------------------------------------------------------------------- -VToolLineIntersectAxis *VToolLineIntersectAxis::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolLineIntersectAxis *VToolLineIntersectAxis::Create(DialogTool *dialog, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -100,7 +102,7 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(const quint32 _id, const QString &formulaAngle, const quint32 &basePointId, const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer basePoint = data->GeometricObject(basePointId); diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.h b/src/libs/vtools/tools/drawTools/vtoollineintersectaxis.h similarity index 92% rename from src/app/tools/drawTools/vtoollineintersectaxis.h rename to src/libs/vtools/tools/drawTools/vtoollineintersectaxis.h index d9166ddfb..470516595 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/vtoollineintersectaxis.h @@ -35,19 +35,20 @@ class VToolLineIntersectAxis : public VToolLinePoint { Q_OBJECT public: - VToolLineIntersectAxis(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + VToolLineIntersectAxis(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formulaAngle, const quint32 &basePointId, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual ~VToolLineIntersectAxis(); virtual void setDialog(); - static VToolLineIntersectAxis *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolLineIntersectAxis *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolLineIntersectAxis *Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &lineColor, QString &formulaAngle, const quint32 &basePointId, const quint32 &firstPointId, const quint32 &secondPointId, - const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &mx, const qreal &my, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QLineF &axis, const QLineF &line); diff --git a/src/app/tools/drawTools/vtoollinepoint.cpp b/src/libs/vtools/tools/drawTools/vtoollinepoint.cpp similarity index 98% rename from src/app/tools/drawTools/vtoollinepoint.cpp rename to src/libs/vtools/tools/drawTools/vtoollinepoint.cpp index 2a13dbc0b..c60e1854b 100644 --- a/src/app/tools/drawTools/vtoollinepoint.cpp +++ b/src/libs/vtools/tools/drawTools/vtoollinepoint.cpp @@ -42,7 +42,7 @@ * @param angle line angle. * @param parent parent object. */ -VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolLinePoint::VToolLinePoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formula, const quint32 &basePointId, const qreal &angle, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), formulaLength(formula), angle(angle), basePointId(basePointId), diff --git a/src/app/tools/drawTools/vtoollinepoint.h b/src/libs/vtools/tools/drawTools/vtoollinepoint.h similarity index 94% rename from src/app/tools/drawTools/vtoollinepoint.h rename to src/libs/vtools/tools/drawTools/vtoollinepoint.h index b8646de6e..5820aba05 100644 --- a/src/app/tools/drawTools/vtoollinepoint.h +++ b/src/libs/vtools/tools/drawTools/vtoollinepoint.h @@ -30,7 +30,7 @@ #define VTOOLLINEPOINT_H #include "vtoolpoint.h" -#include "../../../libs/vpatterndb/vformula.h" +#include "../../../vpatterndb/vformula.h" /** * @brief The VToolLinePoint class parent for all tools what create point with line. @@ -39,7 +39,7 @@ class VToolLinePoint : public VToolPoint { Q_OBJECT public: - VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const + VToolLinePoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formula, const quint32 &basePointId, const qreal &angle, QGraphicsItem * parent = nullptr); virtual ~VToolLinePoint(); diff --git a/src/app/tools/drawTools/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/vtoolnormal.cpp similarity index 96% rename from src/app/tools/drawTools/vtoolnormal.cpp rename to src/libs/vtools/tools/drawTools/vtoolnormal.cpp index 4c320433a..c4b0a3349 100644 --- a/src/app/tools/drawTools/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolnormal.cpp @@ -27,9 +27,10 @@ *************************************************************************/ #include "vtoolnormal.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialognormal.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolnormal.h" const QString VToolNormal::ToolType = QStringLiteral("normal"); @@ -48,7 +49,7 @@ const QString VToolNormal::ToolType = QStringLiteral("normal"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolNormal::VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolNormal::VToolNormal(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formula, const qreal &angle, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem *parent) @@ -85,7 +86,7 @@ void VToolNormal::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolNormal* VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolNormal* VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogNormal *dialogTool = qobject_cast(dialog); @@ -128,7 +129,8 @@ VToolNormal* VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VToolNormal* VToolNormal::Create(const quint32 _id, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation) { const QSharedPointer firstPoint = data->GeometricObject(firstPointId); diff --git a/src/app/tools/drawTools/vtoolnormal.h b/src/libs/vtools/tools/drawTools/vtoolnormal.h similarity index 89% rename from src/app/tools/drawTools/vtoolnormal.h rename to src/libs/vtools/tools/drawTools/vtoolnormal.h index f6ef36444..5a06293dd 100644 --- a/src/app/tools/drawTools/vtoolnormal.h +++ b/src/libs/vtools/tools/drawTools/vtoolnormal.h @@ -38,15 +38,17 @@ class VToolNormal : public VToolLinePoint { Q_OBJECT public: - VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, + VToolNormal(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + const QString &lineColor, const QString &formula, const qreal &angle, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolNormal* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolNormal* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolNormal* Create(const quint32 _id, QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length, const qreal &angle = 0); diff --git a/src/app/tools/drawTools/vtoolpoint.cpp b/src/libs/vtools/tools/drawTools/vtoolpoint.cpp similarity index 99% rename from src/app/tools/drawTools/vtoolpoint.cpp rename to src/libs/vtools/tools/drawTools/vtoolpoint.cpp index d1c0a94bb..b96c82240 100644 --- a/src/app/tools/drawTools/vtoolpoint.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpoint.cpp @@ -46,7 +46,7 @@ const QString VToolPoint::TagName = QStringLiteral("point"); * @param id object id in container. * @param parent parent object. */ -VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) +VToolPoint::VToolPoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(nullptr), lineName(nullptr) { diff --git a/src/app/tools/drawTools/vtoolpoint.h b/src/libs/vtools/tools/drawTools/vtoolpoint.h similarity index 97% rename from src/app/tools/drawTools/vtoolpoint.h rename to src/libs/vtools/tools/drawTools/vtoolpoint.h index b3983f834..7817b134b 100644 --- a/src/app/tools/drawTools/vtoolpoint.h +++ b/src/libs/vtools/tools/drawTools/vtoolpoint.h @@ -42,7 +42,7 @@ class VToolPoint: public VDrawTool, public QGraphicsEllipseItem { Q_OBJECT public: - VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr); + VToolPoint(VAbstractPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr); virtual ~VToolPoint(); virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0); QString name() const; diff --git a/src/app/tools/drawTools/vtoolpointfromarcandtangent.cpp b/src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolpointfromarcandtangent.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.cpp index 937328390..47f6b1a0b 100644 --- a/src/app/tools/drawTools/vtoolpointfromarcandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.cpp @@ -35,7 +35,7 @@ const QString VToolPointFromArcAndTangent::ToolType = QStringLiteral("pointFromArcAndTangent"); //--------------------------------------------------------------------------------------------------------------------- -VToolPointFromArcAndTangent::VToolPointFromArcAndTangent(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointFromArcAndTangent::VToolPointFromArcAndTangent(VAbstractPattern *doc, VContainer *data, const quint32 &id, quint32 arcId, quint32 tangentPointId, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem *parent) @@ -59,7 +59,7 @@ void VToolPointFromArcAndTangent::setDialog() //--------------------------------------------------------------------------------------------------------------------- VToolPointFromArcAndTangent *VToolPointFromArcAndTangent::Create(DialogTool *dialog, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data) + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogPointFromArcAndTangent *dialogTool = qobject_cast(dialog); @@ -83,7 +83,7 @@ VToolPointFromArcAndTangent *VToolPointFromArcAndTangent::Create(const quint32 _ quint32 arcId, quint32 tangentPointId, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const VArc arc = *data->GeometricObject(arcId); diff --git a/src/app/tools/drawTools/vtoolpointfromarcandtangent.h b/src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.h similarity index 93% rename from src/app/tools/drawTools/vtoolpointfromarcandtangent.h rename to src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.h index 2d4744db6..228415933 100644 --- a/src/app/tools/drawTools/vtoolpointfromarcandtangent.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointfromarcandtangent.h @@ -30,21 +30,20 @@ #define VTOOLPOINTFROMARCANDTANGENT_H #include "vtoolpoint.h" -#include "../../xml/vpattern.h" class VToolPointFromArcAndTangent : public VToolPoint { Q_OBJECT public: - VToolPointFromArcAndTangent(VPattern *doc, VContainer *data, const quint32 &id, quint32 arcId, + VToolPointFromArcAndTangent(VAbstractPattern *doc, VContainer *data, const quint32 &id, quint32 arcId, quint32 tangentPointId, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolPointFromArcAndTangent *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolPointFromArcAndTangent *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolPointFromArcAndTangent *Create(const quint32 _id, const QString &pointName, quint32 arcId, quint32 tangentPointId, CrossCirclesPoint crossPoint, const qreal &mx, - const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &p, const VArc *arc, const CrossCirclesPoint pType); static const QString ToolType; diff --git a/src/app/tools/drawTools/vtoolpointfromcircleandtangent.cpp b/src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolpointfromcircleandtangent.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.cpp index 350285d11..f14ddaffe 100644 --- a/src/app/tools/drawTools/vtoolpointfromcircleandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.cpp @@ -36,7 +36,8 @@ const QString VToolPointFromCircleAndTangent::ToolType = QStringLiteral("pointFromCircleAndTangent"); //--------------------------------------------------------------------------------------------------------------------- -VToolPointFromCircleAndTangent::VToolPointFromCircleAndTangent(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointFromCircleAndTangent::VToolPointFromCircleAndTangent(VAbstractPattern *doc, VContainer *data, + const quint32 &id, quint32 circleCenterId, const QString &circleRadius, quint32 tangentPointId, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem *parent) @@ -62,7 +63,7 @@ void VToolPointFromCircleAndTangent::setDialog() //--------------------------------------------------------------------------------------------------------------------- VToolPointFromCircleAndTangent *VToolPointFromCircleAndTangent::Create(DialogTool *dialog, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data) + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogPointFromCircleAndTangent *dialogTool = qobject_cast(dialog); @@ -88,7 +89,7 @@ VToolPointFromCircleAndTangent *VToolPointFromCircleAndTangent::Create(const qui quint32 tangentPointId, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { diff --git a/src/app/tools/drawTools/vtoolpointfromcircleandtangent.h b/src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.h similarity index 93% rename from src/app/tools/drawTools/vtoolpointfromcircleandtangent.h rename to src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.h index 7e084f1a8..ff0c64a09 100644 --- a/src/app/tools/drawTools/vtoolpointfromcircleandtangent.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointfromcircleandtangent.h @@ -30,7 +30,6 @@ #define VTOOLPOINTFROMCIRCLEANDTANGENT_H #include "vtoolpoint.h" -#include "../../xml/vpattern.h" class VFormula; @@ -38,16 +37,16 @@ class VToolPointFromCircleAndTangent : public VToolPoint { Q_OBJECT public: - VToolPointFromCircleAndTangent(VPattern *doc, VContainer *data, const quint32 &id, quint32 circleCenterId, + VToolPointFromCircleAndTangent(VAbstractPattern *doc, VContainer *data, const quint32 &id, quint32 circleCenterId, const QString &circleRadius, quint32 tangentPointId, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolPointFromCircleAndTangent *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolPointFromCircleAndTangent *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolPointFromCircleAndTangent *Create(const quint32 _id, const QString &pointName, quint32 circleCenterId, QString &circleRadius, quint32 tangentPointId, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &p, const QPointF ¢er, qreal radius, const CrossCirclesPoint crossPoint); static const QString ToolType; diff --git a/src/app/tools/drawTools/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/vtoolpointofcontact.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolpointofcontact.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointofcontact.cpp index 42ac9f46f..c36b29287 100644 --- a/src/app/tools/drawTools/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointofcontact.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "vtoolpointofcontact.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogpointofcontact.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vpatterndb/vformula.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vpatterndb/vformula.h" #include "../../visualization/vistoolpointofcontact.h" #include @@ -49,7 +50,7 @@ const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolPointOfContact::VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointOfContact::VToolPointOfContact(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &radius, const quint32 ¢er, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem *parent) @@ -143,7 +144,7 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF ¢e * @param doc dom document container. * @param data container with variables. */ -VToolPointOfContact* VToolPointOfContact::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolPointOfContact* VToolPointOfContact::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -184,7 +185,7 @@ VToolPointOfContact* VToolPointOfContact::Create(DialogTool *dialog, VMainGraphi VToolPointOfContact* VToolPointOfContact::Create(const quint32 _id, QString &radius, const quint32 ¢er, const quint32 &firstPointId, const quint32 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer centerP = data->GeometricObject(center); diff --git a/src/app/tools/drawTools/vtoolpointofcontact.h b/src/libs/vtools/tools/drawTools/vtoolpointofcontact.h similarity index 79% rename from src/app/tools/drawTools/vtoolpointofcontact.h rename to src/libs/vtools/tools/drawTools/vtoolpointofcontact.h index 7c1215197..398425653 100644 --- a/src/app/tools/drawTools/vtoolpointofcontact.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointofcontact.h @@ -40,18 +40,20 @@ class VToolPointOfContact : public VToolPoint { Q_OBJECT public: - VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id, const QString &arcRadius, + VToolPointOfContact(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &arcRadius, const quint32 ¢er, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); static QPointF FindPoint(const qreal &arcRadius, const QPointF ¢er, const QPointF &firstPoint, const QPointF &secondPoint); - static VToolPointOfContact* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, - VContainer *data); - static VToolPointOfContact* Create(const quint32 _id, QString &arcRadius, const quint32 ¢er, - const quint32 &firstPointId, const quint32 &secondPointId, const QString &pointName, - const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, - VContainer *data, const Document &parse, const Source &typeCreation); + static VToolPointOfContact* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); + static VToolPointOfContact* Create(const quint32 _id, QString &arcRadius, const quint32 ¢er, + const quint32 &firstPointId, const quint32 &secondPointId, + const QString &pointName, + const qreal &mx, const qreal &my, VMainGraphicsScene *scene, + VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::PointOfContact) }; diff --git a/src/app/tools/drawTools/vtoolpointofintersection.cpp b/src/libs/vtools/tools/drawTools/vtoolpointofintersection.cpp similarity index 96% rename from src/app/tools/drawTools/vtoolpointofintersection.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointofintersection.cpp index b015df5d5..1f0c789d9 100644 --- a/src/app/tools/drawTools/vtoolpointofintersection.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersection.cpp @@ -44,7 +44,7 @@ const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfInters * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointOfIntersection::VToolPointOfIntersection(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId) @@ -76,7 +76,8 @@ void VToolPointOfIntersection::setDialog() * @param data container with variables. * @return the created tool */ -VToolPointOfIntersection *VToolPointOfIntersection::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolPointOfIntersection *VToolPointOfIntersection::Create(DialogTool *dialog, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -114,7 +115,8 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(DialogTool *dialog, V VToolPointOfIntersection *VToolPointOfIntersection::Create(const quint32 _id, const QString &pointName, const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation) { const QSharedPointer firstPoint = data->GeometricObject(firstPointId); diff --git a/src/app/tools/drawTools/vtoolpointofintersection.h b/src/libs/vtools/tools/drawTools/vtoolpointofintersection.h similarity index 93% rename from src/app/tools/drawTools/vtoolpointofintersection.h rename to src/libs/vtools/tools/drawTools/vtoolpointofintersection.h index af7999a0f..a8a99825d 100644 --- a/src/app/tools/drawTools/vtoolpointofintersection.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersection.h @@ -38,15 +38,15 @@ class VToolPointOfIntersection : public VToolPoint { Q_OBJECT public: - VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstPointId, + VToolPointOfIntersection(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolPointOfIntersection *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolPointOfIntersection *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolPointOfIntersection *Create(const quint32 _id, const QString &pointName, const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolpointofintersectionarcs.cpp b/src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolpointofintersectionarcs.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.cpp index f52a95248..c9dbc6f7e 100644 --- a/src/app/tools/drawTools/vtoolpointofintersectionarcs.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.cpp @@ -35,7 +35,7 @@ const QString VToolPointOfIntersectionArcs::ToolType = QStringLiteral("pointOfIntersectionArcs"); //--------------------------------------------------------------------------------------------------------------------- -VToolPointOfIntersectionArcs::VToolPointOfIntersectionArcs(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointOfIntersectionArcs::VToolPointOfIntersectionArcs(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstArcId, const quint32 &secondArcId, CrossCirclesPoint pType, const Source &typeCreation, QGraphicsItem *parent) @@ -59,7 +59,7 @@ void VToolPointOfIntersectionArcs::setDialog() //--------------------------------------------------------------------------------------------------------------------- VToolPointOfIntersectionArcs *VToolPointOfIntersectionArcs::Create(DialogTool *dialog, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data) + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogPointOfIntersectionArcs *dialogTool = qobject_cast(dialog); @@ -83,7 +83,7 @@ VToolPointOfIntersectionArcs *VToolPointOfIntersectionArcs::Create(const quint32 const quint32 &firstArcId, const quint32 &secondArcId, CrossCirclesPoint pType, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { diff --git a/src/app/tools/drawTools/vtoolpointofintersectionarcs.h b/src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.h similarity index 92% rename from src/app/tools/drawTools/vtoolpointofintersectionarcs.h rename to src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.h index 67c233c0a..6f10f3c5d 100644 --- a/src/app/tools/drawTools/vtoolpointofintersectionarcs.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersectionarcs.h @@ -30,7 +30,6 @@ #define VTOOLPOINTOFINTERSECTIONARCS_H #include "vtoolpoint.h" -#include "../../xml/vpattern.h" class VArc; @@ -39,16 +38,16 @@ class VToolPointOfIntersectionArcs : public VToolPoint Q_OBJECT public: - VToolPointOfIntersectionArcs(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstArcId, + VToolPointOfIntersectionArcs(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstArcId, const quint32 &secondArcId, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolPointOfIntersectionArcs *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolPointOfIntersectionArcs *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolPointOfIntersectionArcs *Create(const quint32 _id, const QString &pointName, const quint32 &firstArcId, const quint32 &secondArcId, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const VArc *arc1, const VArc *arc2, const CrossCirclesPoint crossPoint); static const QString ToolType; diff --git a/src/app/tools/drawTools/vtoolpointofintersectioncircles.cpp b/src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolpointofintersectioncircles.cpp rename to src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.cpp index 5eb6833bf..a61aa7e31 100644 --- a/src/app/tools/drawTools/vtoolpointofintersectioncircles.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.cpp @@ -36,7 +36,8 @@ const QString VToolPointOfIntersectionCircles::ToolType = QStringLiteral("pointOfIntersectionCircles"); //--------------------------------------------------------------------------------------------------------------------- -VToolPointOfIntersectionCircles::VToolPointOfIntersectionCircles(VPattern *doc, VContainer *data, const quint32 &id, +VToolPointOfIntersectionCircles::VToolPointOfIntersectionCircles(VAbstractPattern *doc, VContainer *data, + const quint32 &id, quint32 firstCircleCenterId, quint32 secondCircleCenterId, const QString &firstCircleRadius, @@ -67,7 +68,7 @@ void VToolPointOfIntersectionCircles::setDialog() //--------------------------------------------------------------------------------------------------------------------- VToolPointOfIntersectionCircles *VToolPointOfIntersectionCircles::Create(DialogTool *dialog, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data) + VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogPointOfIntersectionCircles *dialogTool = qobject_cast(dialog); @@ -96,7 +97,7 @@ VToolPointOfIntersectionCircles *VToolPointOfIntersectionCircles::Create(const q QString &secondCircleRadius, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { diff --git a/src/app/tools/drawTools/vtoolpointofintersectioncircles.h b/src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.h similarity index 92% rename from src/app/tools/drawTools/vtoolpointofintersectioncircles.h rename to src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.h index 57dd1b274..835b7339b 100644 --- a/src/app/tools/drawTools/vtoolpointofintersectioncircles.h +++ b/src/libs/vtools/tools/drawTools/vtoolpointofintersectioncircles.h @@ -30,7 +30,6 @@ #define VTOOLPOINTOFINTERSECTIONCIRCLES_H #include "vtoolpoint.h" -#include "../../xml/vpattern.h" class VFormula; @@ -38,20 +37,21 @@ class VToolPointOfIntersectionCircles : public VToolPoint { Q_OBJECT public: - VToolPointOfIntersectionCircles(VPattern *doc, VContainer *data, const quint32 &id, const + VToolPointOfIntersectionCircles(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 firstCircleCenterId, quint32 secondCircleCenterId, const QString &firstCircleRadius, const QString &secondCircleRadius, CrossCirclesPoint crossPoint, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolPointOfIntersectionCircles *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, + static VToolPointOfIntersectionCircles *Create(DialogTool *dialog, VMainGraphicsScene *scene, + VAbstractPattern *doc, VContainer *data); static VToolPointOfIntersectionCircles *Create(const quint32 _id, const QString &pointName, quint32 firstCircleCenterId, quint32 secondCircleCenterId, QString &firstCircleRadius, QString &secondCircleRadius, CrossCirclesPoint crossPoint, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &c1Point, const QPointF &c2Point, qreal c1Radius, qreal c2Radius, const CrossCirclesPoint crossPoint); diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/vtoolshoulderpoint.cpp similarity index 97% rename from src/app/tools/drawTools/vtoolshoulderpoint.cpp rename to src/libs/vtools/tools/drawTools/vtoolshoulderpoint.cpp index baabaa3ef..e690b8512 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolshoulderpoint.cpp @@ -27,9 +27,10 @@ *************************************************************************/ #include "vtoolshoulderpoint.h" -#include "../../libs/vpatterndb/calculator.h" +#include "../../../vpatterndb/calculator.h" +#include "../../../vpatterndb/vtranslatevars.h" #include "../../dialogs/tools/dialogshoulderpoint.h" -#include "../../libs/vgeometry/vpointf.h" +#include "../../../vgeometry/vpointf.h" #include "../../visualization/vistoolshoulderpoint.h" const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder"); @@ -48,7 +49,8 @@ const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolShoulderPoint::VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, +VToolShoulderPoint::VToolShoulderPoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, + const QString &typeLine, const QString &lineColor, const QString &formula, const quint32 &p1Line, const quint32 &p2Line, const quint32 &pShoulder, const Source &typeCreation, QGraphicsItem * parent) @@ -123,7 +125,7 @@ QPointF VToolShoulderPoint::FindPoint(const QPointF &p1Line, const QPointF &p2Li * @param data container with variables. * @return the created tool */ -VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -168,7 +170,7 @@ VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphics VToolShoulderPoint* VToolShoulderPoint::Create(const quint32 _id, QString &formula, const quint32 &p1Line, const quint32 &p2Line, const quint32 &pShoulder, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal &mx, - const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer firstPoint = data->GeometricObject(p1Line); diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.h b/src/libs/vtools/tools/drawTools/vtoolshoulderpoint.h similarity index 91% rename from src/app/tools/drawTools/vtoolshoulderpoint.h rename to src/libs/vtools/tools/drawTools/vtoolshoulderpoint.h index ab337cbc7..c9aaa817a 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.h +++ b/src/libs/vtools/tools/drawTools/vtoolshoulderpoint.h @@ -39,17 +39,19 @@ class VToolShoulderPoint : public VToolLinePoint { Q_OBJECT public: - VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, + VToolShoulderPoint(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &lineColor, const QString &formula, const quint32 &p1Line, const quint32 &p2Line, const quint32 &pShoulder, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, const qreal &length); - static VToolShoulderPoint* Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolShoulderPoint* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolShoulderPoint* Create(const quint32 _id, QString &formula, const quint32 &p1Line, const quint32 &p2Line, const quint32 &pShoulder, const QString &typeLine, const QString &lineColor, const QString &pointName, const qreal &mx, const qreal &my, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolsinglepoint.cpp b/src/libs/vtools/tools/drawTools/vtoolsinglepoint.cpp similarity index 94% rename from src/app/tools/drawTools/vtoolsinglepoint.cpp rename to src/libs/vtools/tools/drawTools/vtoolsinglepoint.cpp index 0804cd307..8da862cfe 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolsinglepoint.cpp @@ -28,12 +28,11 @@ #include "vtoolsinglepoint.h" #include "../../dialogs/tools/dialogsinglepoint.h" -#include "../../libs/vwidgets/vgraphicssimpletextitem.h" +#include "../../../vwidgets/vgraphicssimpletextitem.h" #include "../../undocommands/movespoint.h" #include "../../undocommands/addpatternpiece.h" #include "../../undocommands/deletepatternpiece.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../options.h" +#include "../../../vgeometry/vpointf.h" #include @@ -48,7 +47,7 @@ const QString VToolSinglePoint::ToolType = QStringLiteral("single"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, +VToolSinglePoint::VToolSinglePoint (VAbstractPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, const QString &namePP, const QString &mPath, QGraphicsItem * parent ) :VToolPoint(doc, data, id, parent), namePP(namePP), mPath(mPath) { @@ -102,19 +101,19 @@ void VToolSinglePoint::AddToFile() SaveOptions(sPoint, obj); //Create pattern piece structure - QDomElement patternPiece = doc->createElement(VPattern::TagDraw); + QDomElement patternPiece = doc->createElement(VAbstractPattern::TagDraw); doc->SetAttribute(patternPiece, AttrName, namePP); - QDomElement calcElement = doc->createElement(VPattern::TagCalculation); + QDomElement calcElement = doc->createElement(VAbstractPattern::TagCalculation); calcElement.appendChild(sPoint); patternPiece.appendChild(calcElement); - patternPiece.appendChild(doc->createElement(VPattern::TagModeling)); - patternPiece.appendChild(doc->createElement(VPattern::TagDetails)); + patternPiece.appendChild(doc->createElement(VAbstractPattern::TagModeling)); + patternPiece.appendChild(doc->createElement(VAbstractPattern::TagDetails)); AddPatternPiece *addPP = new AddPatternPiece(patternPiece, doc, namePP, mPath); - connect(addPP, &AddPatternPiece::ClearScene, doc, &VPattern::ClearScene); - connect(addPP, &AddPatternPiece::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(addPP, &AddPatternPiece::ClearScene, doc, &VAbstractPattern::ClearScene); + connect(addPP, &AddPatternPiece::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); qApp->getUndoStack()->push(addPP); } @@ -179,7 +178,7 @@ void VToolSinglePoint::DeleteTool(bool ask) } DeletePatternPiece *deletePP = new DeletePatternPiece(doc, nameActivDraw); - connect(deletePP, &DeletePatternPiece::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(deletePP, &DeletePatternPiece::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); qApp->getUndoStack()->push(deletePP); } } diff --git a/src/app/tools/drawTools/vtoolsinglepoint.h b/src/libs/vtools/tools/drawTools/vtoolsinglepoint.h similarity index 96% rename from src/app/tools/drawTools/vtoolsinglepoint.h rename to src/libs/vtools/tools/drawTools/vtoolsinglepoint.h index 76d189182..73289eefa 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.h +++ b/src/libs/vtools/tools/drawTools/vtoolsinglepoint.h @@ -39,7 +39,7 @@ class VToolSinglePoint : public VToolPoint { Q_OBJECT public: - VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, + VToolSinglePoint (VAbstractPattern *doc, VContainer *data, quint32 id, const Source &typeCreation, const QString &namePP, const QString &mPath, QGraphicsItem * parent = nullptr ); virtual ~VToolSinglePoint(); virtual void setDialog(); diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/libs/vtools/tools/drawTools/vtoolspline.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolspline.cpp rename to src/libs/vtools/tools/drawTools/vtoolspline.cpp index 8d9b1fba4..a14bcd301 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolspline.cpp @@ -27,11 +27,10 @@ *************************************************************************/ #include "vtoolspline.h" -#include "../../libs/vgeometry/vspline.h" +#include "../../../vgeometry/vspline.h" #include "../../dialogs/tools/dialogspline.h" #include "../../undocommands/movespline.h" #include "../../visualization/vistoolspline.h" -#include "../../options.h" #if QT_VERSION < QT_VERSION_CHECK(5, 1, 0) # include "../../libs/vmisc/vmath.h" @@ -50,7 +49,8 @@ const QString VToolSpline::ToolType = QStringLiteral("simple"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, +VToolSpline::VToolSpline(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, + const Source &typeCreation, QGraphicsItem *parent) :VAbstractSpline(doc, data, id, parent), oldPosition() { @@ -126,7 +126,7 @@ void VToolSpline::setDialog() * @param data container with variables. * @return the created tool */ -VToolSpline* VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolSpline* VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogSpline *dialogTool = qobject_cast(dialog); @@ -169,7 +169,8 @@ VToolSpline* VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, */ VToolSpline* VToolSpline::Create(const quint32 _id, const quint32 &p1, const quint32 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation) { VPointF point1 = *data->GeometricObject(p1); diff --git a/src/app/tools/drawTools/vtoolspline.h b/src/libs/vtools/tools/drawTools/vtoolspline.h similarity index 92% rename from src/app/tools/drawTools/vtoolspline.h rename to src/libs/vtools/tools/drawTools/vtoolspline.h index e6684b8cb..7866a4208 100644 --- a/src/app/tools/drawTools/vtoolspline.h +++ b/src/libs/vtools/tools/drawTools/vtoolspline.h @@ -38,14 +38,15 @@ class VToolSpline:public VAbstractSpline { Q_OBJECT public: - VToolSpline (VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, + VToolSpline (VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, QGraphicsItem * parent = nullptr ); virtual ~VToolSpline(); virtual void setDialog(); - static VToolSpline *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolSpline *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolSpline *Create(const quint32 _id, const quint32 &p1, const quint32 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, - const QString &color, VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + const QString &color, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data, const Document &parse, const Source &typeCreation); static const QString ToolType; virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/vtoolsplinepath.cpp similarity index 98% rename from src/app/tools/drawTools/vtoolsplinepath.cpp rename to src/libs/vtools/tools/drawTools/vtoolsplinepath.cpp index e316f7a6e..9c54a5201 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolsplinepath.cpp @@ -48,7 +48,7 @@ const QString VToolSplinePath::ToolType = QStringLiteral("path"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, +VToolSplinePath::VToolSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, QGraphicsItem *parent) :VAbstractSpline(doc, data, id, parent), oldPosition() { @@ -67,7 +67,7 @@ VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, co { VSpline spl = splPath->GetSpline(i); VControlPointSpline *controlPoint = new VControlPointSpline(i, SplinePointPosition::FirstPoint, spl.GetP2(), - spl.GetP1().toQPointF(), *data->GetPatternUnit(), + spl.GetP1().toQPointF(), *data->GetPatternUnit(), this); connect(controlPoint, &VControlPointSpline::ControlPointChangePosition, this, &VToolSplinePath::ControlPointChangePosition); @@ -120,7 +120,8 @@ void VToolSplinePath::setDialog() * @param doc dom document container. * @param data container with variables. */ -VToolSplinePath* VToolSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolSplinePath* VToolSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data) { SCASSERT(dialog != nullptr); DialogSplinePath *dialogTool = qobject_cast(dialog); @@ -152,7 +153,7 @@ VToolSplinePath* VToolSplinePath::Create(DialogTool *dialog, VMainGraphicsScene * @param typeCreation way we create this tool. */ VToolSplinePath* VToolSplinePath::Create(const quint32 _id, VSplinePath *path, const QString &color, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { quint32 id = _id; diff --git a/src/app/tools/drawTools/vtoolsplinepath.h b/src/libs/vtools/tools/drawTools/vtoolsplinepath.h similarity index 89% rename from src/app/tools/drawTools/vtoolsplinepath.h rename to src/libs/vtools/tools/drawTools/vtoolsplinepath.h index feb1bbf82..b2fc2b9f7 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.h +++ b/src/libs/vtools/tools/drawTools/vtoolsplinepath.h @@ -38,14 +38,17 @@ class VToolSplinePath:public VAbstractSpline { Q_OBJECT public: - VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const QString &color, const Source &typeCreation, + VToolSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &color, + const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual ~VToolSplinePath(); virtual void setDialog(); - static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolSplinePath *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolSplinePath *Create(const quint32 _id, VSplinePath *path, const QString &color, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, - const Source &typeCreation); + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, + const Source &typeCreation); static const QString ToolType; static void UpdatePathPoint(VAbstractPattern *doc, QDomNode& node, const VSplinePath &path); virtual int type() const {return Type;} diff --git a/src/app/tools/drawTools/vtooltriangle.cpp b/src/libs/vtools/tools/drawTools/vtooltriangle.cpp similarity index 98% rename from src/app/tools/drawTools/vtooltriangle.cpp rename to src/libs/vtools/tools/drawTools/vtooltriangle.cpp index 8517a5402..776f9023d 100644 --- a/src/app/tools/drawTools/vtooltriangle.cpp +++ b/src/libs/vtools/tools/drawTools/vtooltriangle.cpp @@ -47,7 +47,7 @@ const QString VToolTriangle::ToolType = QStringLiteral("triangle"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, +VToolTriangle::VToolTriangle(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), @@ -82,7 +82,8 @@ void VToolTriangle::setDialog() * @param data container with variables. * @return the created tool */ -VToolTriangle* VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +VToolTriangle* VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data) { SCASSERT(dialog != nullptr); DialogTriangle *dialogTool = qobject_cast(dialog); @@ -122,7 +123,7 @@ VToolTriangle* VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *sce */ VToolTriangle* VToolTriangle::Create(const quint32 _id, const QString &pointName, const quint32 &axisP1Id, const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, - const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { const QSharedPointer axisP1 = data->GeometricObject(axisP1Id); diff --git a/src/app/tools/drawTools/vtooltriangle.h b/src/libs/vtools/tools/drawTools/vtooltriangle.h similarity index 92% rename from src/app/tools/drawTools/vtooltriangle.h rename to src/libs/vtools/tools/drawTools/vtooltriangle.h index bafe855bb..74c655618 100644 --- a/src/app/tools/drawTools/vtooltriangle.h +++ b/src/libs/vtools/tools/drawTools/vtooltriangle.h @@ -39,14 +39,16 @@ class VToolTriangle : public VToolPoint { Q_OBJECT public: - VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, const quint32 &axisP2Id, + VToolTriangle(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, + const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); virtual void setDialog(); - static VToolTriangle *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolTriangle *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolTriangle *Create(const quint32 _id, const QString &pointName, const quint32 &axisP1Id, const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, - const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc, + const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, const QPointF &secondPoint); diff --git a/src/app/tools/nodeDetails/nodedetails.h b/src/libs/vtools/tools/nodeDetails/nodedetails.h similarity index 100% rename from src/app/tools/nodeDetails/nodedetails.h rename to src/libs/vtools/tools/nodeDetails/nodedetails.h diff --git a/src/app/tools/nodeDetails/vabstractnode.cpp b/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp similarity index 96% rename from src/app/tools/nodeDetails/vabstractnode.cpp rename to src/libs/vtools/tools/nodeDetails/vabstractnode.cpp index cd078feb6..ec316c4e3 100644 --- a/src/app/tools/nodeDetails/vabstractnode.cpp +++ b/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp @@ -27,10 +27,9 @@ *************************************************************************/ #include "vabstractnode.h" -#include -#include "../../xml/vpattern.h" #include "../../undocommands/adddetnode.h" -#include "../../core/vapplication.h" + +#include const QString VAbstractNode::AttrIdObject = QStringLiteral("idObject"); const QString VAbstractNode::AttrIdTool = QStringLiteral("idTool"); @@ -45,7 +44,7 @@ const QString VAbstractNode::AttrIdTool = QStringLiteral("idTool"); * @param idTool id tool. * @param parent parent object. */ -VAbstractNode::VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, +VAbstractNode::VAbstractNode(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, const quint32 &idTool, QObject *parent) : VAbstractTool(doc, data, id, parent), idNode(idNode), idTool(idTool), currentColor(Qt::black) { diff --git a/src/app/tools/nodeDetails/vabstractnode.h b/src/libs/vtools/tools/nodeDetails/vabstractnode.h similarity index 95% rename from src/app/tools/nodeDetails/vabstractnode.h rename to src/libs/vtools/tools/nodeDetails/vabstractnode.h index 49ec441ad..3a8dd9566 100644 --- a/src/app/tools/nodeDetails/vabstractnode.h +++ b/src/libs/vtools/tools/nodeDetails/vabstractnode.h @@ -40,7 +40,7 @@ class VAbstractNode : public VAbstractTool { Q_OBJECT public: - VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, + VAbstractNode(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, const quint32 &idTool, QObject *parent = nullptr); virtual ~VAbstractNode() {} static const QString AttrIdObject; diff --git a/src/app/tools/nodeDetails/vnodearc.cpp b/src/libs/vtools/tools/nodeDetails/vnodearc.cpp similarity index 96% rename from src/app/tools/nodeDetails/vnodearc.cpp rename to src/libs/vtools/tools/nodeDetails/vnodearc.cpp index 0c760a23a..3bb868acb 100644 --- a/src/app/tools/nodeDetails/vnodearc.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodearc.cpp @@ -27,9 +27,7 @@ *************************************************************************/ #include "vnodearc.h" - -#include "../../core/vapplication.h" -#include "../../libs/vgeometry/varc.h" +#include "../../../vgeometry/varc.h" #include #include @@ -48,7 +46,7 @@ const QString VNodeArc::ToolType = QStringLiteral("modeling"); * @param qoParent QObject parent * @param parent parent object. */ -VNodeArc::VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation, +VNodeArc::VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation, const quint32 &idTool, QObject *qoParent, QGraphicsItem *parent) :VAbstractNode(doc, data, id, idArc, idTool, qoParent), QGraphicsPathItem(parent) { @@ -70,7 +68,7 @@ VNodeArc::VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, c * @param idTool tool id. * @param parent QObject parent */ -void VNodeArc::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document &parse, +void VNodeArc::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document &parse, const Source &typeCreation, const quint32 &idTool, QObject *parent) { VAbstractTool::AddRecord(id, Tool::NodeArc, doc); diff --git a/src/app/tools/nodeDetails/vnodearc.h b/src/libs/vtools/tools/nodeDetails/vnodearc.h similarity index 90% rename from src/app/tools/nodeDetails/vnodearc.h rename to src/libs/vtools/tools/nodeDetails/vnodearc.h index 5f818a356..777454ccb 100644 --- a/src/app/tools/nodeDetails/vnodearc.h +++ b/src/libs/vtools/tools/nodeDetails/vnodearc.h @@ -31,7 +31,6 @@ #include "vabstractnode.h" #include -#include "../../xml/vpattern.h" /** * @brief The VNodeArc class arc detail node. @@ -40,10 +39,10 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: - VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation, + VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr); - static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document &parse, + static void Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document &parse, const Source &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/nodeDetails/vnodepoint.cpp b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp similarity index 97% rename from src/app/tools/nodeDetails/vnodepoint.cpp rename to src/libs/vtools/tools/nodeDetails/vnodepoint.cpp index b019f370d..18b0f38cb 100644 --- a/src/app/tools/nodeDetails/vnodepoint.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodepoint.cpp @@ -27,10 +27,8 @@ *************************************************************************/ #include "vnodepoint.h" - -#include "../../core/vapplication.h" -#include "../../libs/vgeometry/vpointf.h" -#include "../../libs/vwidgets/vgraphicssimpletextitem.h" +#include "../../../vgeometry/vpointf.h" +#include "../../../vwidgets/vgraphicssimpletextitem.h" #include #include #include @@ -50,7 +48,7 @@ const QString VNodePoint::ToolType = QStringLiteral("modeling"); * @param qoParent QObject parent * @param parent parent object. */ -VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Source &typeCreation, +VNodePoint::VNodePoint(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Source &typeCreation, const quint32 &idTool, QObject *qoParent, QGraphicsItem *parent) :VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(0), namePoint(nullptr), lineName(nullptr) @@ -80,7 +78,7 @@ VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPo * @param idTool tool id. * @param parent QObject parent */ -void VNodePoint::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document &parse, +void VNodePoint::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document &parse, const Source &typeCreation, const quint32 &idTool, QObject *parent) { VAbstractTool::AddRecord(id, Tool::NodePoint, doc); diff --git a/src/app/tools/nodeDetails/vnodepoint.h b/src/libs/vtools/tools/nodeDetails/vnodepoint.h similarity index 92% rename from src/app/tools/nodeDetails/vnodepoint.h rename to src/libs/vtools/tools/nodeDetails/vnodepoint.h index 7414b7ef2..f6a3f4853 100644 --- a/src/app/tools/nodeDetails/vnodepoint.h +++ b/src/libs/vtools/tools/nodeDetails/vnodepoint.h @@ -30,7 +30,6 @@ #define VNODEPOINT_H #include "vabstractnode.h" -#include "../../xml/vpattern.h" #include class VPointF; @@ -46,10 +45,10 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem Q_OBJECT public: - VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Source &typeCreation, + VNodePoint(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Source &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr ); - static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document &parse, + static void Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idPoint, const Document &parse, const Source &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/nodeDetails/vnodespline.cpp b/src/libs/vtools/tools/nodeDetails/vnodespline.cpp similarity index 96% rename from src/app/tools/nodeDetails/vnodespline.cpp rename to src/libs/vtools/tools/nodeDetails/vnodespline.cpp index 8d2e52b59..388e08a8d 100644 --- a/src/app/tools/nodeDetails/vnodespline.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodespline.cpp @@ -27,9 +27,7 @@ *************************************************************************/ #include "vnodespline.h" - -#include "../../core/vapplication.h" -#include "../../libs/vgeometry/vspline.h" +#include "../../../vgeometry/vspline.h" #include #include @@ -48,7 +46,7 @@ const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline"); * @param qoParent QObject parent. * @param parent QGraphicsItem parent. */ -VNodeSpline::VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, +VNodeSpline::VNodeSpline(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, const quint32 &idTool, QObject *qoParent, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idSpline, idTool, qoParent), QGraphicsPathItem(parent) @@ -71,7 +69,8 @@ VNodeSpline::VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 id * @param idTool id node. * @return pointer to node. */ -VNodeSpline *VNodeSpline::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document &parse, +VNodeSpline *VNodeSpline::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, + const Document &parse, const Source &typeCreation, const quint32 &idTool, QObject *parent) { VAbstractTool::AddRecord(id, Tool::NodeSpline, doc); diff --git a/src/app/tools/nodeDetails/vnodespline.h b/src/libs/vtools/tools/nodeDetails/vnodespline.h similarity index 89% rename from src/app/tools/nodeDetails/vnodespline.h rename to src/libs/vtools/tools/nodeDetails/vnodespline.h index e4403ccdf..c65fce665 100644 --- a/src/app/tools/nodeDetails/vnodespline.h +++ b/src/libs/vtools/tools/nodeDetails/vnodespline.h @@ -31,7 +31,6 @@ #include "vabstractnode.h" #include -#include "../../xml/vpattern.h" /** * @brief The VNodeSpline class spline detail node. @@ -40,10 +39,11 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: - VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, + VNodeSpline(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr); - static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document &parse, + static VNodeSpline *Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, + const Document &parse, const Source &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/nodeDetails/vnodesplinepath.cpp b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp similarity index 96% rename from src/app/tools/nodeDetails/vnodesplinepath.cpp rename to src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp index 6614c09a0..814a3da9e 100644 --- a/src/app/tools/nodeDetails/vnodesplinepath.cpp +++ b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.cpp @@ -28,8 +28,7 @@ #include "vnodesplinepath.h" -#include "../../core/vapplication.h" -#include "../../libs/vgeometry/vsplinepath.h" +#include "../../../vgeometry/vsplinepath.h" #include #include @@ -48,7 +47,7 @@ const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath"); * @param qoParent QObject parent. * @param parent parent object. */ -VNodeSplinePath::VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, +VNodeSplinePath::VNodeSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, const quint32 &idTool, QObject *qoParent, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idSpline, idTool, qoParent), QGraphicsPathItem(parent) @@ -71,7 +70,8 @@ VNodeSplinePath::VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, qu * @param idTool tool id. * @param parent QObject parent. */ -void VNodeSplinePath::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document &parse, +void VNodeSplinePath::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, + const Document &parse, const Source &typeCreation, const quint32 &idTool, QObject *parent) { VAbstractTool::AddRecord(id, Tool::NodeSplinePath, doc); diff --git a/src/app/tools/nodeDetails/vnodesplinepath.h b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.h similarity index 90% rename from src/app/tools/nodeDetails/vnodesplinepath.h rename to src/libs/vtools/tools/nodeDetails/vnodesplinepath.h index 0871e1e46..0e0916839 100644 --- a/src/app/tools/nodeDetails/vnodesplinepath.h +++ b/src/libs/vtools/tools/nodeDetails/vnodesplinepath.h @@ -31,7 +31,6 @@ #include "vabstractnode.h" #include -#include "../../xml/vpattern.h" /** * @brief The VNodeSplinePath class spline path detail node. @@ -40,9 +39,9 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: - VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, + VNodeSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Source &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr); - static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document &parse, + static void Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline, const Document &parse, const Source &typeCreation, const quint32 &idTool = 0, QObject *parent = 0); static const QString TagName; static const QString ToolType; diff --git a/src/app/tools/tools.h b/src/libs/vtools/tools/tools.h similarity index 100% rename from src/app/tools/tools.h rename to src/libs/vtools/tools/tools.h diff --git a/src/app/tools/tools.pri b/src/libs/vtools/tools/tools.pri similarity index 100% rename from src/app/tools/tools.pri rename to src/libs/vtools/tools/tools.pri diff --git a/src/app/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp similarity index 98% rename from src/app/tools/vabstracttool.cpp rename to src/libs/vtools/tools/vabstracttool.cpp index e0699cdba..036bc2b40 100644 --- a/src/app/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -27,18 +27,18 @@ *************************************************************************/ #include "vabstracttool.h" +#include "../../vpropertyexplorer/checkablemessagebox.h" +#include "../../vgeometry/vpointf.h" +#include "../../vwidgets/vmaingraphicsview.h" +#include "../../vmisc/vsettings.h" +#include "../undocommands/deltool.h" +#include "../undocommands/savetooloptions.h" + #include #include #include #include #include -#include "../../libs/vpropertyexplorer/checkablemessagebox.h" -#include "../undocommands/deltool.h" -#include "../core/vapplication.h" -#include "../libs/vgeometry/vpointf.h" -#include "../undocommands/savetooloptions.h" -#include "../libs/vwidgets/vmaingraphicsview.h" -#include "../libs/vmisc/vsettings.h" const QString VAbstractTool::AttrType = QStringLiteral("type"); const QString VAbstractTool::AttrMx = QStringLiteral("mx"); diff --git a/src/app/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h similarity index 98% rename from src/app/tools/vabstracttool.h rename to src/libs/vtools/tools/vabstracttool.h index e2d029bab..52ce8fd1b 100644 --- a/src/app/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -30,9 +30,9 @@ #define VABSTRACTTOOL_H #include "vdatatool.h" -#include "../../libs/ifc/xml/vabstractpattern.h" -#include "../core/vapplication.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" +#include "../../ifc/xml/vabstractpattern.h" +#include "../../vmisc/vabstractapplication.h" +#include "../../vwidgets/vmaingraphicsscene.h" #include "../visualization/visualization.h" class QDomElement; diff --git a/src/app/tools/vdatatool.cpp b/src/libs/vtools/tools/vdatatool.cpp similarity index 100% rename from src/app/tools/vdatatool.cpp rename to src/libs/vtools/tools/vdatatool.cpp diff --git a/src/app/tools/vdatatool.h b/src/libs/vtools/tools/vdatatool.h similarity index 98% rename from src/app/tools/vdatatool.h rename to src/libs/vtools/tools/vdatatool.h index de97a8ee6..a85ab2d41 100644 --- a/src/app/tools/vdatatool.h +++ b/src/libs/vtools/tools/vdatatool.h @@ -29,7 +29,7 @@ #ifndef VDATATOOL_H #define VDATATOOL_H -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vpatterndb/vcontainer.h" #include "../vmisc/logging.h" Q_DECLARE_LOGGING_CATEGORY(vTool) diff --git a/src/app/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp similarity index 97% rename from src/app/tools/vtooldetail.cpp rename to src/libs/vtools/tools/vtooldetail.cpp index a698b8b29..42c44ec8b 100644 --- a/src/app/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -28,20 +28,22 @@ #include "vtooldetail.h" #include "nodeDetails/nodedetails.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vgeometry/vsplinepath.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" +#include "../../vgeometry/varc.h" +#include "../../vgeometry/vsplinepath.h" +#include "../../vwidgets/vmaingraphicsscene.h" #include "../dialogs/tools/dialogtool.h" #include "../dialogs/tools/dialogdetail.h" +#include "../undocommands/savedetailoptions.h" +#include "../undocommands/movedetail.h" +#include "../undocommands/adddet.h" +#include "../undocommands/deletedetail.h" + #include #include #include #include #include -#include "../undocommands/savedetailoptions.h" -#include "../undocommands/movedetail.h" -#include "../undocommands/adddet.h" -#include "../undocommands/deletedetail.h" + const QString VToolDetail::TagName = QStringLiteral("detail"); const QString VToolDetail::TagNode = QStringLiteral("node"); @@ -71,7 +73,7 @@ const QString VToolDetail::NodeSplinePath = QStringLiteral("NodeSplinePath"); * @param scene pointer to scene. * @param parent parent object */ -VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation, +VToolDetail::VToolDetail(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation, VMainGraphicsScene *scene, QGraphicsItem *parent) :VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialog(nullptr), sceneDetails(scene) { @@ -140,7 +142,7 @@ void VToolDetail::setDialog() * @param doc dom document container. * @param data container with variables. */ -void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data) +void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); DialogDetail *dialogTool = qobject_cast(dialog); @@ -203,7 +205,7 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern * @param parse parser file mode. * @param typeCreation way we create this tool. */ -void VToolDetail::Create(const quint32 &_id, const VDetail &newDetail, VMainGraphicsScene *scene, VPattern *doc, +void VToolDetail::Create(const quint32 &_id, const VDetail &newDetail, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { quint32 id = _id; @@ -294,7 +296,7 @@ void VToolDetail::AddToFile() } AddDet *addDet = new AddDet(domElement, doc); - connect(addDet, &AddDet::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(addDet, &AddDet::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); qApp->getUndoStack()->push(addDet); } @@ -520,7 +522,7 @@ void VToolDetail::DeleteTool(bool ask) return; } /* If UnionDetails tool delete detail no need emit FullParsing.*/ - connect(delDet, &DeleteDetail::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(delDet, &DeleteDetail::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); } qApp->getUndoStack()->push(delDet); } diff --git a/src/app/tools/vtooldetail.h b/src/libs/vtools/tools/vtooldetail.h similarity index 94% rename from src/app/tools/vtooldetail.h rename to src/libs/vtools/tools/vtooldetail.h index 4105efd4f..4dce78bee 100644 --- a/src/app/tools/vtooldetail.h +++ b/src/libs/vtools/tools/vtooldetail.h @@ -31,7 +31,6 @@ #include "vabstracttool.h" #include -#include "../xml/vpattern.h" class VMainGraphicsScene; class DialogTool; @@ -43,7 +42,7 @@ class VToolDetail: public VAbstractTool, public QGraphicsPathItem { Q_OBJECT public: - VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation, + VToolDetail(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation, VMainGraphicsScene *scene, QGraphicsItem * parent = nullptr); ~VToolDetail(); @@ -63,9 +62,9 @@ public: return data->AddGObject(node); } - static void Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static void Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static void Create(const quint32 &_id, const VDetail &newDetail, VMainGraphicsScene *scene, - VPattern *doc, VContainer *data, const Document &parse, + VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); static const QString TagName; static const QString TagNode; diff --git a/src/app/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp similarity index 98% rename from src/app/tools/vtooluniondetails.cpp rename to src/libs/vtools/tools/vtooluniondetails.cpp index 24b2e7d22..fbfdc0641 100644 --- a/src/app/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -29,9 +29,9 @@ #include "vtooluniondetails.h" #include "nodeDetails/nodedetails.h" #include "vtooldetail.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vgeometry/vsplinepath.h" +#include "../../vgeometry/vpointf.h" +#include "../../vgeometry/varc.h" +#include "../../vgeometry/vsplinepath.h" #include "../dialogs/tools/dialoguniondetails.h" #include "../undocommands/adduniondetails.h" @@ -59,7 +59,7 @@ const QString VToolUnionDetails::NodeTypeModeling = QStringLiteral("Modeling"); * @param typeCreation way we create this tool. * @param parent parent object. */ -VToolUnionDetails::VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, +VToolUnionDetails::VToolUnionDetails(VAbstractPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2, const quint32 &indexD1, const quint32 &indexD2, const Source &typeCreation, QObject *parent) :VAbstractTool(doc, data, id, parent), d1(d1), d2(d2), indexD1(indexD1), indexD2(indexD2) @@ -82,7 +82,7 @@ VToolUnionDetails::VToolUnionDetails(VPattern *doc, VContainer *data, const quin * @param pRotate point rotation. * @param angle angle rotation. */ -void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer *data, VDetail &newDetail, +void VToolUnionDetails::AddToNewDetail(QObject *tool, VAbstractPattern *doc, VContainer *data, VDetail &newDetail, const VDetail &det, const int &i, const quint32 &idTool, const qreal &dx, const qreal &dy, const quint32 &pRotate, const qreal &angle) { @@ -423,7 +423,7 @@ void VToolUnionDetails::ShowVisualization(bool show) * @param doc dom document container. * @param data container with variables. */ -VToolUnionDetails* VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, +VToolUnionDetails* VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data) { SCASSERT(dialog != nullptr); @@ -459,7 +459,7 @@ VToolUnionDetails* VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsSc */ VToolUnionDetails* VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id, const quint32 &d2id, const quint32 &indexD1, - const quint32 &indexD2, VMainGraphicsScene *scene, VPattern *doc, + const quint32 &indexD2, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation) { VToolUnionDetails *unionDetails = 0; @@ -648,7 +648,7 @@ void VToolUnionDetails::FindIndexJ(const qint32 &pointsD2, const VDetail &d2, co * @param domElement tag in xml tree. * @return detail stored in file. */ -QVector VToolUnionDetails::GetDetailFromFile(VPattern *doc, const QDomElement &domElement) +QVector VToolUnionDetails::GetDetailFromFile(VAbstractPattern *doc, const QDomElement &domElement) { QVector vector; QDomNodeList detailList = domElement.childNodes(); @@ -811,6 +811,6 @@ QDomNode VToolUnionDetails::UpdateDetail(const QDomNode &domNode, const VDetail void VToolUnionDetails::AddToModeling(const QDomElement &domElement) { AddUnionDetails *addUnion = new AddUnionDetails(domElement, doc); - connect(addUnion, &AddUnionDetails::NeedFullParsing, doc, &VPattern::NeedFullParsing); + connect(addUnion, &AddUnionDetails::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); qApp->getUndoStack()->push(addUnion); } diff --git a/src/app/tools/vtooluniondetails.h b/src/libs/vtools/tools/vtooluniondetails.h similarity index 89% rename from src/app/tools/vtooluniondetails.h rename to src/libs/vtools/tools/vtooluniondetails.h index 3062d508e..c6b1134e3 100644 --- a/src/app/tools/vtooluniondetails.h +++ b/src/libs/vtools/tools/vtooluniondetails.h @@ -30,7 +30,6 @@ #define VTOOLUNIONDETAILS_H #include "vabstracttool.h" -#include "../xml/vpattern.h" class VPointF; class VMainGraphicsScene; @@ -43,21 +42,23 @@ class VToolUnionDetails : public VAbstractTool { Q_OBJECT public: - VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2, + VToolUnionDetails(VAbstractPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2, const quint32 &indexD1, const quint32 &indexD2, const Source &typeCreation, QObject *parent = nullptr); /** * @brief setDialog set dialog when user want change tool option. */ virtual void setDialog() {} - static VToolUnionDetails *Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *doc, VContainer *data); + static VToolUnionDetails *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + VContainer *data); static VToolUnionDetails *Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id, const quint32 &d2id, const quint32 &indexD1, const quint32 &indexD2, - VMainGraphicsScene *scene, VPattern *doc, VContainer *data, const Document &parse, + VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, + const Document &parse, const Source &typeCreation); static void PointsOnEdge(const VDetail &d, const quint32 &index, VPointF &p1, VPointF &p2, VContainer *data); static void FindIndexJ(const qint32 &pointsD2, const VDetail &d2, const quint32 &indexD2, qint32 &j); - static QVector GetDetailFromFile(VPattern *doc, const QDomElement &domElement); + static QVector GetDetailFromFile(VAbstractPattern *doc, const QDomElement &domElement); static const QString TagName; static const QString ToolType; static const QString TagDetail; @@ -68,7 +69,7 @@ public: static const QString AttrNodeType; static const QString NodeTypeContour; static const QString NodeTypeModeling; - static void AddToNewDetail(QObject *tool, VPattern *doc, VContainer *data, VDetail &newDetail, + static void AddToNewDetail(QObject *tool, VAbstractPattern *doc, VContainer *data, VDetail &newDetail, const VDetail &det, const int &i, const quint32 &idTool, const qreal &dx = 0, const qreal &dy = 0, const quint32 &pRotate = 0, const qreal &angle = 0); static void UpdatePoints(const quint32 &idDetail, VContainer *data, const VDetail &det, const int &i, diff --git a/src/app/undocommands/adddet.cpp b/src/libs/vtools/undocommands/adddet.cpp similarity index 100% rename from src/app/undocommands/adddet.cpp rename to src/libs/vtools/undocommands/adddet.cpp diff --git a/src/app/undocommands/adddet.h b/src/libs/vtools/undocommands/adddet.h similarity index 100% rename from src/app/undocommands/adddet.h rename to src/libs/vtools/undocommands/adddet.h diff --git a/src/app/undocommands/adddetnode.cpp b/src/libs/vtools/undocommands/adddetnode.cpp similarity index 100% rename from src/app/undocommands/adddetnode.cpp rename to src/libs/vtools/undocommands/adddetnode.cpp diff --git a/src/app/undocommands/adddetnode.h b/src/libs/vtools/undocommands/adddetnode.h similarity index 100% rename from src/app/undocommands/adddetnode.h rename to src/libs/vtools/undocommands/adddetnode.h diff --git a/src/app/undocommands/addpatternpiece.cpp b/src/libs/vtools/undocommands/addpatternpiece.cpp similarity index 100% rename from src/app/undocommands/addpatternpiece.cpp rename to src/libs/vtools/undocommands/addpatternpiece.cpp diff --git a/src/app/undocommands/addpatternpiece.h b/src/libs/vtools/undocommands/addpatternpiece.h similarity index 100% rename from src/app/undocommands/addpatternpiece.h rename to src/libs/vtools/undocommands/addpatternpiece.h diff --git a/src/app/undocommands/addtocalc.cpp b/src/libs/vtools/undocommands/addtocalc.cpp similarity index 97% rename from src/app/undocommands/addtocalc.cpp rename to src/libs/vtools/undocommands/addtocalc.cpp index 1e7148ebf..2b1fe9bb9 100644 --- a/src/app/undocommands/addtocalc.cpp +++ b/src/libs/vtools/undocommands/addtocalc.cpp @@ -28,9 +28,8 @@ #include "addtocalc.h" #include "../tools/vabstracttool.h" -#include "../core/vapplication.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" -#include "../libs/vwidgets/vmaingraphicsview.h" +#include "../../vwidgets/vmaingraphicsscene.h" +#include "../../vwidgets/vmaingraphicsview.h" //--------------------------------------------------------------------------------------------------------------------- AddToCalc::AddToCalc(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent) diff --git a/src/app/undocommands/addtocalc.h b/src/libs/vtools/undocommands/addtocalc.h similarity index 100% rename from src/app/undocommands/addtocalc.h rename to src/libs/vtools/undocommands/addtocalc.h diff --git a/src/app/undocommands/adduniondetails.cpp b/src/libs/vtools/undocommands/adduniondetails.cpp similarity index 100% rename from src/app/undocommands/adduniondetails.cpp rename to src/libs/vtools/undocommands/adduniondetails.cpp diff --git a/src/app/undocommands/adduniondetails.h b/src/libs/vtools/undocommands/adduniondetails.h similarity index 100% rename from src/app/undocommands/adduniondetails.h rename to src/libs/vtools/undocommands/adduniondetails.h diff --git a/src/app/undocommands/deletedetail.cpp b/src/libs/vtools/undocommands/deletedetail.cpp similarity index 98% rename from src/app/undocommands/deletedetail.cpp rename to src/libs/vtools/undocommands/deletedetail.cpp index 3cfc70ff0..fb26f0518 100644 --- a/src/app/undocommands/deletedetail.cpp +++ b/src/libs/vtools/undocommands/deletedetail.cpp @@ -48,7 +48,7 @@ DeleteDetail::DeleteDetail(VAbstractPattern *doc, quint32 id, QUndoCommand *pare else { // Better save id of previous detail instead of reference to node. - siblingId = doc->GetParametrUInt(previousDetail.toElement(), VPattern::AttrId, NULL_ID_STR); + siblingId = doc->GetParametrUInt(previousDetail.toElement(), VAbstractPattern::AttrId, NULL_ID_STR); } } else diff --git a/src/app/undocommands/deletedetail.h b/src/libs/vtools/undocommands/deletedetail.h similarity index 100% rename from src/app/undocommands/deletedetail.h rename to src/libs/vtools/undocommands/deletedetail.h diff --git a/src/app/undocommands/deletepatternpiece.cpp b/src/libs/vtools/undocommands/deletepatternpiece.cpp similarity index 100% rename from src/app/undocommands/deletepatternpiece.cpp rename to src/libs/vtools/undocommands/deletepatternpiece.cpp diff --git a/src/app/undocommands/deletepatternpiece.h b/src/libs/vtools/undocommands/deletepatternpiece.h similarity index 100% rename from src/app/undocommands/deletepatternpiece.h rename to src/libs/vtools/undocommands/deletepatternpiece.h diff --git a/src/app/undocommands/deltool.cpp b/src/libs/vtools/undocommands/deltool.cpp similarity index 100% rename from src/app/undocommands/deltool.cpp rename to src/libs/vtools/undocommands/deltool.cpp diff --git a/src/app/undocommands/deltool.h b/src/libs/vtools/undocommands/deltool.h similarity index 100% rename from src/app/undocommands/deltool.h rename to src/libs/vtools/undocommands/deltool.h diff --git a/src/app/undocommands/movedetail.cpp b/src/libs/vtools/undocommands/movedetail.cpp similarity index 99% rename from src/app/undocommands/movedetail.cpp rename to src/libs/vtools/undocommands/movedetail.cpp index 6fb508f91..cf6312f22 100644 --- a/src/app/undocommands/movedetail.cpp +++ b/src/libs/vtools/undocommands/movedetail.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "movedetail.h" +#include "../tools/vabstracttool.h" +#include "../../vwidgets/vmaingraphicsview.h" + #include #include -#include "../tools/vabstracttool.h" -#include "../core/vapplication.h" //--------------------------------------------------------------------------------------------------------------------- MoveDetail::MoveDetail(VAbstractPattern *doc, const double &x, const double &y, const quint32 &id, diff --git a/src/app/undocommands/movedetail.h b/src/libs/vtools/undocommands/movedetail.h similarity index 100% rename from src/app/undocommands/movedetail.h rename to src/libs/vtools/undocommands/movedetail.h diff --git a/src/app/undocommands/movelabel.cpp b/src/libs/vtools/undocommands/movelabel.cpp similarity index 98% rename from src/app/undocommands/movelabel.cpp rename to src/libs/vtools/undocommands/movelabel.cpp index edb284a22..9c830a673 100644 --- a/src/app/undocommands/movelabel.cpp +++ b/src/libs/vtools/undocommands/movelabel.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "movelabel.h" +#include "../tools/vabstracttool.h" +#include "../../vwidgets/vmaingraphicsview.h" + #include #include -#include "../tools/vabstracttool.h" -#include "../core/vapplication.h" //--------------------------------------------------------------------------------------------------------------------- MoveLabel::MoveLabel(VAbstractPattern *doc, const double &x, const double &y, const quint32 &id, QGraphicsScene *scene, diff --git a/src/app/undocommands/movelabel.h b/src/libs/vtools/undocommands/movelabel.h similarity index 100% rename from src/app/undocommands/movelabel.h rename to src/libs/vtools/undocommands/movelabel.h diff --git a/src/app/undocommands/movespline.cpp b/src/libs/vtools/undocommands/movespline.cpp similarity index 98% rename from src/app/undocommands/movespline.cpp rename to src/libs/vtools/undocommands/movespline.cpp index a09f0ed55..598a4db16 100644 --- a/src/app/undocommands/movespline.cpp +++ b/src/libs/vtools/undocommands/movespline.cpp @@ -28,6 +28,8 @@ #include "movespline.h" #include "../tools/vabstracttool.h" +#include "../../vwidgets/vmaingraphicsview.h" + #include #include diff --git a/src/app/undocommands/movespline.h b/src/libs/vtools/undocommands/movespline.h similarity index 98% rename from src/app/undocommands/movespline.h rename to src/libs/vtools/undocommands/movespline.h index afdbd6a00..236f3c41f 100644 --- a/src/app/undocommands/movespline.h +++ b/src/libs/vtools/undocommands/movespline.h @@ -30,7 +30,7 @@ #define MOVESPLINE_H #include "vundocommand.h" -#include "../libs/vgeometry/vspline.h" +#include "../../vgeometry/vspline.h" class QGraphicsScene; diff --git a/src/app/undocommands/movesplinepath.cpp b/src/libs/vtools/undocommands/movesplinepath.cpp similarity index 100% rename from src/app/undocommands/movesplinepath.cpp rename to src/libs/vtools/undocommands/movesplinepath.cpp diff --git a/src/app/undocommands/movesplinepath.h b/src/libs/vtools/undocommands/movesplinepath.h similarity index 98% rename from src/app/undocommands/movesplinepath.h rename to src/libs/vtools/undocommands/movesplinepath.h index 60571fc3d..91e51ef4c 100644 --- a/src/app/undocommands/movesplinepath.h +++ b/src/libs/vtools/undocommands/movesplinepath.h @@ -30,7 +30,7 @@ #define MOVESPLINEPATH_H #include "vundocommand.h" -#include "../libs/vgeometry/vsplinepath.h" +#include "../../vgeometry/vsplinepath.h" class QGraphicsScene; diff --git a/src/app/undocommands/movespoint.cpp b/src/libs/vtools/undocommands/movespoint.cpp similarity index 99% rename from src/app/undocommands/movespoint.cpp rename to src/libs/vtools/undocommands/movespoint.cpp index 53fbc93c6..56910e1d6 100644 --- a/src/app/undocommands/movespoint.cpp +++ b/src/libs/vtools/undocommands/movespoint.cpp @@ -27,10 +27,11 @@ *************************************************************************/ #include "movespoint.h" +#include "../tools/vabstracttool.h" +#include "../../vwidgets/vmaingraphicsview.h" + #include #include -#include "../tools/vabstracttool.h" -#include "../core/vapplication.h" //--------------------------------------------------------------------------------------------------------------------- MoveSPoint::MoveSPoint(VAbstractPattern *doc, const double &x, const double &y, const quint32 &id, diff --git a/src/app/undocommands/movespoint.h b/src/libs/vtools/undocommands/movespoint.h similarity index 100% rename from src/app/undocommands/movespoint.h rename to src/libs/vtools/undocommands/movespoint.h diff --git a/src/app/undocommands/renamepp.cpp b/src/libs/vtools/undocommands/renamepp.cpp similarity index 99% rename from src/app/undocommands/renamepp.cpp rename to src/libs/vtools/undocommands/renamepp.cpp index 3aee58ca4..97bcdf854 100644 --- a/src/app/undocommands/renamepp.cpp +++ b/src/libs/vtools/undocommands/renamepp.cpp @@ -29,7 +29,6 @@ #include "renamepp.h" #include -#include "../options.h" //--------------------------------------------------------------------------------------------------------------------- RenamePP::RenamePP(VAbstractPattern *doc, const QString &newPPname, QComboBox *combo, QUndoCommand *parent) diff --git a/src/app/undocommands/renamepp.h b/src/libs/vtools/undocommands/renamepp.h similarity index 100% rename from src/app/undocommands/renamepp.h rename to src/libs/vtools/undocommands/renamepp.h diff --git a/src/app/undocommands/savedetailoptions.cpp b/src/libs/vtools/undocommands/savedetailoptions.cpp similarity index 99% rename from src/app/undocommands/savedetailoptions.cpp rename to src/libs/vtools/undocommands/savedetailoptions.cpp index 2a9c7cf67..9924bc041 100644 --- a/src/app/undocommands/savedetailoptions.cpp +++ b/src/libs/vtools/undocommands/savedetailoptions.cpp @@ -28,6 +28,8 @@ #include "savedetailoptions.h" #include "../tools/nodeDetails/vabstractnode.h" +#include "../../vwidgets/vmaingraphicsview.h" + #include //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/undocommands/savedetailoptions.h b/src/libs/vtools/undocommands/savedetailoptions.h similarity index 100% rename from src/app/undocommands/savedetailoptions.h rename to src/libs/vtools/undocommands/savedetailoptions.h diff --git a/src/app/undocommands/savetooloptions.cpp b/src/libs/vtools/undocommands/savetooloptions.cpp similarity index 99% rename from src/app/undocommands/savetooloptions.cpp rename to src/libs/vtools/undocommands/savetooloptions.cpp index 99299c95d..aec8211b0 100644 --- a/src/app/undocommands/savetooloptions.cpp +++ b/src/libs/vtools/undocommands/savetooloptions.cpp @@ -27,7 +27,6 @@ *************************************************************************/ #include "savetooloptions.h" -#include "../options.h" //--------------------------------------------------------------------------------------------------------------------- SaveToolOptions::SaveToolOptions(const QDomElement &oldXml, const QDomElement &newXml, VAbstractPattern *doc, diff --git a/src/app/undocommands/savetooloptions.h b/src/libs/vtools/undocommands/savetooloptions.h similarity index 100% rename from src/app/undocommands/savetooloptions.h rename to src/libs/vtools/undocommands/savetooloptions.h diff --git a/src/app/undocommands/undocommands.pri b/src/libs/vtools/undocommands/undocommands.pri similarity index 100% rename from src/app/undocommands/undocommands.pri rename to src/libs/vtools/undocommands/undocommands.pri diff --git a/src/app/undocommands/vundocommand.cpp b/src/libs/vtools/undocommands/vundocommand.cpp similarity index 100% rename from src/app/undocommands/vundocommand.cpp rename to src/libs/vtools/undocommands/vundocommand.cpp diff --git a/src/app/undocommands/vundocommand.h b/src/libs/vtools/undocommands/vundocommand.h similarity index 97% rename from src/app/undocommands/vundocommand.h rename to src/libs/vtools/undocommands/vundocommand.h index 608f91dfe..09f9b533d 100644 --- a/src/app/undocommands/vundocommand.h +++ b/src/libs/vtools/undocommands/vundocommand.h @@ -32,8 +32,8 @@ #include #include -#include "../vmisc/logging.h" -#include "../libs/ifc/xml/vabstractpattern.h" +#include "../../vmisc/logging.h" +#include "../../ifc/xml/vabstractpattern.h" Q_DECLARE_LOGGING_CATEGORY(vUndo) diff --git a/src/app/visualization/visline.cpp b/src/libs/vtools/visualization/visline.cpp similarity index 100% rename from src/app/visualization/visline.cpp rename to src/libs/vtools/visualization/visline.cpp diff --git a/src/app/visualization/visline.h b/src/libs/vtools/visualization/visline.h similarity index 100% rename from src/app/visualization/visline.h rename to src/libs/vtools/visualization/visline.h diff --git a/src/app/visualization/vispath.cpp b/src/libs/vtools/visualization/vispath.cpp similarity index 100% rename from src/app/visualization/vispath.cpp rename to src/libs/vtools/visualization/vispath.cpp diff --git a/src/app/visualization/vispath.h b/src/libs/vtools/visualization/vispath.h similarity index 100% rename from src/app/visualization/vispath.h rename to src/libs/vtools/visualization/vispath.h diff --git a/src/app/visualization/vistoolalongline.cpp b/src/libs/vtools/visualization/vistoolalongline.cpp similarity index 97% rename from src/app/visualization/vistoolalongline.cpp rename to src/libs/vtools/visualization/vistoolalongline.cpp index 4c7cddbd9..3e8ae718b 100644 --- a/src/app/visualization/vistoolalongline.cpp +++ b/src/libs/vtools/visualization/vistoolalongline.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolalongline.h" -#include "../libs/vpatterndb/vcontainer.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" //--------------------------------------------------------------------------------------------------------------------- VisToolAlongLine::VisToolAlongLine(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolalongline.h b/src/libs/vtools/visualization/vistoolalongline.h similarity index 100% rename from src/app/visualization/vistoolalongline.h rename to src/libs/vtools/visualization/vistoolalongline.h diff --git a/src/app/visualization/vistoolarc.cpp b/src/libs/vtools/visualization/vistoolarc.cpp similarity index 96% rename from src/app/visualization/vistoolarc.cpp rename to src/libs/vtools/visualization/vistoolarc.cpp index cd3c2978b..4b319af2d 100644 --- a/src/app/visualization/vistoolarc.cpp +++ b/src/libs/vtools/visualization/vistoolarc.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vistoolarc.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vgeometry/varc.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolArc::VisToolArc(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolarc.h b/src/libs/vtools/visualization/vistoolarc.h similarity index 100% rename from src/app/visualization/vistoolarc.h rename to src/libs/vtools/visualization/vistoolarc.h diff --git a/src/app/visualization/vistoolarcwithlength.cpp b/src/libs/vtools/visualization/vistoolarcwithlength.cpp similarity index 96% rename from src/app/visualization/vistoolarcwithlength.cpp rename to src/libs/vtools/visualization/vistoolarcwithlength.cpp index 861e9266c..a86b5ce5a 100644 --- a/src/app/visualization/vistoolarcwithlength.cpp +++ b/src/libs/vtools/visualization/vistoolarcwithlength.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vistoolarcwithlength.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vgeometry/varc.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolArcWithLength::VisToolArcWithLength(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolarcwithlength.h b/src/libs/vtools/visualization/vistoolarcwithlength.h similarity index 100% rename from src/app/visualization/vistoolarcwithlength.h rename to src/libs/vtools/visualization/vistoolarcwithlength.h diff --git a/src/app/visualization/vistoolbisector.cpp b/src/libs/vtools/visualization/vistoolbisector.cpp similarity index 98% rename from src/app/visualization/vistoolbisector.cpp rename to src/libs/vtools/visualization/vistoolbisector.cpp index 3d69556da..750d00481 100644 --- a/src/app/visualization/vistoolbisector.cpp +++ b/src/libs/vtools/visualization/vistoolbisector.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolbisector.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtoolbisector.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolbisector.h b/src/libs/vtools/visualization/vistoolbisector.h similarity index 100% rename from src/app/visualization/vistoolbisector.h rename to src/libs/vtools/visualization/vistoolbisector.h diff --git a/src/app/visualization/vistoolcurveintersectaxis.cpp b/src/libs/vtools/visualization/vistoolcurveintersectaxis.cpp similarity index 98% rename from src/app/visualization/vistoolcurveintersectaxis.cpp rename to src/libs/vtools/visualization/vistoolcurveintersectaxis.cpp index e2e1d441d..7c09ea526 100644 --- a/src/app/visualization/vistoolcurveintersectaxis.cpp +++ b/src/libs/vtools/visualization/vistoolcurveintersectaxis.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolcurveintersectaxis.h" -#include "../libs/vpatterndb/vcontainer.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vtoolcurveintersectaxis.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolcurveintersectaxis.h b/src/libs/vtools/visualization/vistoolcurveintersectaxis.h similarity index 100% rename from src/app/visualization/vistoolcurveintersectaxis.h rename to src/libs/vtools/visualization/vistoolcurveintersectaxis.h diff --git a/src/app/visualization/vistoolcutarc.cpp b/src/libs/vtools/visualization/vistoolcutarc.cpp similarity index 97% rename from src/app/visualization/vistoolcutarc.cpp rename to src/libs/vtools/visualization/vistoolcutarc.cpp index 0ff22f56d..59e5bc50f 100644 --- a/src/app/visualization/vistoolcutarc.cpp +++ b/src/libs/vtools/visualization/vistoolcutarc.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolcutarc.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/varc.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolCutArc::VisToolCutArc(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolcutarc.h b/src/libs/vtools/visualization/vistoolcutarc.h similarity index 100% rename from src/app/visualization/vistoolcutarc.h rename to src/libs/vtools/visualization/vistoolcutarc.h diff --git a/src/app/visualization/vistoolcutspline.cpp b/src/libs/vtools/visualization/vistoolcutspline.cpp similarity index 97% rename from src/app/visualization/vistoolcutspline.cpp rename to src/libs/vtools/visualization/vistoolcutspline.cpp index 85b03db86..36cb6709b 100644 --- a/src/app/visualization/vistoolcutspline.cpp +++ b/src/libs/vtools/visualization/vistoolcutspline.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolcutspline.h" -#include "../libs/vgeometry/vspline.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vspline.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolCutSpline::VisToolCutSpline(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolcutspline.h b/src/libs/vtools/visualization/vistoolcutspline.h similarity index 100% rename from src/app/visualization/vistoolcutspline.h rename to src/libs/vtools/visualization/vistoolcutspline.h diff --git a/src/app/visualization/vistoolcutsplinepath.cpp b/src/libs/vtools/visualization/vistoolcutsplinepath.cpp similarity index 98% rename from src/app/visualization/vistoolcutsplinepath.cpp rename to src/libs/vtools/visualization/vistoolcutsplinepath.cpp index 85f8834ca..2f37f64ac 100644 --- a/src/app/visualization/vistoolcutsplinepath.cpp +++ b/src/libs/vtools/visualization/vistoolcutsplinepath.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolcutsplinepath.h" -#include "../libs/vpatterndb/vcontainer.h" -#include "../libs/vgeometry/vsplinepath.h" +#include "../../vpatterndb/vcontainer.h" +#include "../../vgeometry/vsplinepath.h" //--------------------------------------------------------------------------------------------------------------------- VisToolCutSplinePath::VisToolCutSplinePath(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolcutsplinepath.h b/src/libs/vtools/visualization/vistoolcutsplinepath.h similarity index 100% rename from src/app/visualization/vistoolcutsplinepath.h rename to src/libs/vtools/visualization/vistoolcutsplinepath.h diff --git a/src/app/visualization/vistoolendline.cpp b/src/libs/vtools/visualization/vistoolendline.cpp similarity index 97% rename from src/app/visualization/vistoolendline.cpp rename to src/libs/vtools/visualization/vistoolendline.cpp index 0e57cdd56..a6afe5e21 100644 --- a/src/app/visualization/vistoolendline.cpp +++ b/src/libs/vtools/visualization/vistoolendline.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolendline.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/vabstracttool.h" #include diff --git a/src/app/visualization/vistoolendline.h b/src/libs/vtools/visualization/vistoolendline.h similarity index 100% rename from src/app/visualization/vistoolendline.h rename to src/libs/vtools/visualization/vistoolendline.h diff --git a/src/app/visualization/vistoolheight.cpp b/src/libs/vtools/visualization/vistoolheight.cpp similarity index 99% rename from src/app/visualization/vistoolheight.cpp rename to src/libs/vtools/visualization/vistoolheight.cpp index bac8acc4d..958afc25e 100644 --- a/src/app/visualization/vistoolheight.cpp +++ b/src/libs/vtools/visualization/vistoolheight.cpp @@ -27,7 +27,7 @@ *************************************************************************/ #include "vistoolheight.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vtoolheight.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolheight.h b/src/libs/vtools/visualization/vistoolheight.h similarity index 100% rename from src/app/visualization/vistoolheight.h rename to src/libs/vtools/visualization/vistoolheight.h diff --git a/src/app/visualization/vistoolline.cpp b/src/libs/vtools/visualization/vistoolline.cpp similarity index 97% rename from src/app/visualization/vistoolline.cpp rename to src/libs/vtools/visualization/vistoolline.cpp index 2d5ffa637..a0975fd47 100644 --- a/src/app/visualization/vistoolline.cpp +++ b/src/libs/vtools/visualization/vistoolline.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolline.h" -#include "../libs/vpatterndb/vcontainer.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vdrawtool.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolline.h b/src/libs/vtools/visualization/vistoolline.h similarity index 100% rename from src/app/visualization/vistoolline.h rename to src/libs/vtools/visualization/vistoolline.h diff --git a/src/app/visualization/vistoollineintersect.cpp b/src/libs/vtools/visualization/vistoollineintersect.cpp similarity index 98% rename from src/app/visualization/vistoollineintersect.cpp rename to src/libs/vtools/visualization/vistoollineintersect.cpp index 79ed075dd..2cc7ded59 100644 --- a/src/app/visualization/vistoollineintersect.cpp +++ b/src/libs/vtools/visualization/vistoollineintersect.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoollineintersect.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolLineIntersect::VisToolLineIntersect(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoollineintersect.h b/src/libs/vtools/visualization/vistoollineintersect.h similarity index 100% rename from src/app/visualization/vistoollineintersect.h rename to src/libs/vtools/visualization/vistoollineintersect.h diff --git a/src/app/visualization/vistoollineintersectaxis.cpp b/src/libs/vtools/visualization/vistoollineintersectaxis.cpp similarity index 98% rename from src/app/visualization/vistoollineintersectaxis.cpp rename to src/libs/vtools/visualization/vistoollineintersectaxis.cpp index 17c6f1db8..fce1eb10c 100644 --- a/src/app/visualization/vistoollineintersectaxis.cpp +++ b/src/libs/vtools/visualization/vistoollineintersectaxis.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoollineintersectaxis.h" -#include "../libs/vpatterndb/vcontainer.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vtoollineintersectaxis.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoollineintersectaxis.h b/src/libs/vtools/visualization/vistoollineintersectaxis.h similarity index 100% rename from src/app/visualization/vistoollineintersectaxis.h rename to src/libs/vtools/visualization/vistoollineintersectaxis.h diff --git a/src/app/visualization/vistoolnormal.cpp b/src/libs/vtools/visualization/vistoolnormal.cpp similarity index 99% rename from src/app/visualization/vistoolnormal.cpp rename to src/libs/vtools/visualization/vistoolnormal.cpp index 17026fd0d..42d46ee59 100644 --- a/src/app/visualization/vistoolnormal.cpp +++ b/src/libs/vtools/visualization/vistoolnormal.cpp @@ -27,7 +27,7 @@ *************************************************************************/ #include "vistoolnormal.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vtoolnormal.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolnormal.h b/src/libs/vtools/visualization/vistoolnormal.h similarity index 100% rename from src/app/visualization/vistoolnormal.h rename to src/libs/vtools/visualization/vistoolnormal.h diff --git a/src/app/visualization/vistoolpointfromarcandtangent.cpp b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.cpp similarity index 97% rename from src/app/visualization/vistoolpointfromarcandtangent.cpp rename to src/libs/vtools/visualization/vistoolpointfromarcandtangent.cpp index 08945dd6d..fac64f6a4 100644 --- a/src/app/visualization/vistoolpointfromarcandtangent.cpp +++ b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.cpp @@ -27,10 +27,10 @@ *************************************************************************/ #include "vistoolpointfromarcandtangent.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtoolpointfromarcandtangent.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vgeometry/varc.h" +#include "../../vgeometry/vpointf.h" +#include "../../vgeometry/varc.h" //--------------------------------------------------------------------------------------------------------------------- VisToolPointFromArcAndTangent::VisToolPointFromArcAndTangent(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolpointfromarcandtangent.h b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h similarity index 98% rename from src/app/visualization/vistoolpointfromarcandtangent.h rename to src/libs/vtools/visualization/vistoolpointfromarcandtangent.h index 9d01ca781..69e6307dc 100644 --- a/src/app/visualization/vistoolpointfromarcandtangent.h +++ b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h @@ -30,7 +30,7 @@ #define VISTOOLPOINTFROMARCANDTANGENT_H #include "visline.h" -#include "../xml/vpattern.h" +#include "../ifc/xml/vabstractpattern.h" class VisToolPointFromArcAndTangent : public VisLine { diff --git a/src/app/visualization/vistoolpointfromcircleandtangent.cpp b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.cpp similarity index 98% rename from src/app/visualization/vistoolpointfromcircleandtangent.cpp rename to src/libs/vtools/visualization/vistoolpointfromcircleandtangent.cpp index cc06d0a57..fae856822 100644 --- a/src/app/visualization/vistoolpointfromcircleandtangent.cpp +++ b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vistoolpointfromcircleandtangent.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtoolpointfromcircleandtangent.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" //--------------------------------------------------------------------------------------------------------------------- VisToolPointFromCircleAndTangent::VisToolPointFromCircleAndTangent(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolpointfromcircleandtangent.h b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h similarity index 98% rename from src/app/visualization/vistoolpointfromcircleandtangent.h rename to src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h index 995bbf329..3d7ab68b4 100644 --- a/src/app/visualization/vistoolpointfromcircleandtangent.h +++ b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h @@ -30,7 +30,7 @@ #define VISTOOLPOINTFROMCIRCLEANDTANGENT_H #include "visline.h" -#include "../xml/vpattern.h" +#include "../ifc/xml/vabstractpattern.h" class VisToolPointFromCircleAndTangent : public VisLine { diff --git a/src/app/visualization/vistoolpointofcontact.cpp b/src/libs/vtools/visualization/vistoolpointofcontact.cpp similarity index 99% rename from src/app/visualization/vistoolpointofcontact.cpp rename to src/libs/vtools/visualization/vistoolpointofcontact.cpp index 1a2116960..3e4a4a975 100644 --- a/src/app/visualization/vistoolpointofcontact.cpp +++ b/src/libs/vtools/visualization/vistoolpointofcontact.cpp @@ -27,7 +27,7 @@ *************************************************************************/ #include "vistoolpointofcontact.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" #include "../tools/drawTools/vtoolpointofcontact.h" //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/visualization/vistoolpointofcontact.h b/src/libs/vtools/visualization/vistoolpointofcontact.h similarity index 100% rename from src/app/visualization/vistoolpointofcontact.h rename to src/libs/vtools/visualization/vistoolpointofcontact.h diff --git a/src/app/visualization/vistoolpointofintersection.cpp b/src/libs/vtools/visualization/vistoolpointofintersection.cpp similarity index 97% rename from src/app/visualization/vistoolpointofintersection.cpp rename to src/libs/vtools/visualization/vistoolpointofintersection.cpp index a8f174a72..399ae674b 100644 --- a/src/app/visualization/vistoolpointofintersection.cpp +++ b/src/libs/vtools/visualization/vistoolpointofintersection.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistoolpointofintersection.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" //--------------------------------------------------------------------------------------------------------------------- VisToolPointOfIntersection::VisToolPointOfIntersection(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolpointofintersection.h b/src/libs/vtools/visualization/vistoolpointofintersection.h similarity index 100% rename from src/app/visualization/vistoolpointofintersection.h rename to src/libs/vtools/visualization/vistoolpointofintersection.h diff --git a/src/app/visualization/vistoolpointofintersectionarcs.cpp b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.cpp similarity index 96% rename from src/app/visualization/vistoolpointofintersectionarcs.cpp rename to src/libs/vtools/visualization/vistoolpointofintersectionarcs.cpp index 7a11d46e4..f1fe2d3c5 100644 --- a/src/app/visualization/vistoolpointofintersectionarcs.cpp +++ b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.cpp @@ -27,13 +27,14 @@ *************************************************************************/ #include "vistoolpointofintersectionarcs.h" -#include "../libs/vgeometry/varc.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/varc.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtoolpointofintersectionarcs.h" //--------------------------------------------------------------------------------------------------------------------- VisToolPointOfIntersectionArcs::VisToolPointOfIntersectionArcs(const VContainer *data, QGraphicsItem *parent) - : VisLine(data, parent), arc1Id(NULL_ID), arc2Id(NULL_ID), crossPoint(CrossCirclesPoint::FirstPoint), point(nullptr), + : VisLine(data, parent), arc1Id(NULL_ID), arc2Id(NULL_ID), crossPoint(CrossCirclesPoint::FirstPoint), + point(nullptr), arc1Path(nullptr), arc2Path(nullptr) { arc1Path = InitItem(Qt::darkGreen, this); diff --git a/src/app/visualization/vistoolpointofintersectionarcs.h b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h similarity index 96% rename from src/app/visualization/vistoolpointofintersectionarcs.h rename to src/libs/vtools/visualization/vistoolpointofintersectionarcs.h index a9ead8ffe..8258a9159 100644 --- a/src/app/visualization/vistoolpointofintersectionarcs.h +++ b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h @@ -30,7 +30,7 @@ #define VISTOOLPOINTOFINTERSECTIONARCS_H #include "visline.h" -#include "../xml/vpattern.h" +#include "../ifc/xml/vabstractpattern.h" class VisToolPointOfIntersectionArcs : public VisLine { @@ -52,7 +52,7 @@ private: Q_DISABLE_COPY(VisToolPointOfIntersectionArcs) quint32 arc1Id; quint32 arc2Id; - CrossCirclesPoint crossPoint; + CrossCirclesPoint crossPoint; QGraphicsEllipseItem *point; QGraphicsPathItem *arc1Path; QGraphicsPathItem *arc2Path; diff --git a/src/app/visualization/vistoolpointofintersectioncircles.cpp b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.cpp similarity index 98% rename from src/app/visualization/vistoolpointofintersectioncircles.cpp rename to src/libs/vtools/visualization/vistoolpointofintersectioncircles.cpp index 55dc336a1..24fb9cf02 100644 --- a/src/app/visualization/vistoolpointofintersectioncircles.cpp +++ b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vistoolpointofintersectioncircles.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtoolpointofintersectioncircles.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" //--------------------------------------------------------------------------------------------------------------------- VisToolPointOfIntersectionCircles::VisToolPointOfIntersectionCircles(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolpointofintersectioncircles.h b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h similarity index 98% rename from src/app/visualization/vistoolpointofintersectioncircles.h rename to src/libs/vtools/visualization/vistoolpointofintersectioncircles.h index b6266d59c..77248a780 100644 --- a/src/app/visualization/vistoolpointofintersectioncircles.h +++ b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h @@ -30,7 +30,7 @@ #define VISTOOLPOINTOFINTERSECTIONCIRCLES_H #include "visline.h" -#include "../xml/vpattern.h" +#include "../ifc/xml/vabstractpattern.h" class VisToolPointOfIntersectionCircles : public VisLine { diff --git a/src/app/visualization/vistoolshoulderpoint.cpp b/src/libs/vtools/visualization/vistoolshoulderpoint.cpp similarity index 99% rename from src/app/visualization/vistoolshoulderpoint.cpp rename to src/libs/vtools/visualization/vistoolshoulderpoint.cpp index 19b87bff2..da2dd7493 100644 --- a/src/app/visualization/vistoolshoulderpoint.cpp +++ b/src/libs/vtools/visualization/vistoolshoulderpoint.cpp @@ -28,7 +28,7 @@ #include "vistoolshoulderpoint.h" #include "../tools/drawTools/vtoolshoulderpoint.h" -#include "../libs/vgeometry/vpointf.h" +#include "../../vgeometry/vpointf.h" //--------------------------------------------------------------------------------------------------------------------- VisToolShoulderPoint::VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent) diff --git a/src/app/visualization/vistoolshoulderpoint.h b/src/libs/vtools/visualization/vistoolshoulderpoint.h similarity index 100% rename from src/app/visualization/vistoolshoulderpoint.h rename to src/libs/vtools/visualization/vistoolshoulderpoint.h diff --git a/src/app/visualization/vistoolspline.cpp b/src/libs/vtools/visualization/vistoolspline.cpp similarity index 97% rename from src/app/visualization/vistoolspline.cpp rename to src/libs/vtools/visualization/vistoolspline.cpp index b9130d58b..f91ba51cb 100644 --- a/src/app/visualization/vistoolspline.cpp +++ b/src/libs/vtools/visualization/vistoolspline.cpp @@ -27,9 +27,9 @@ *************************************************************************/ #include "vistoolspline.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vgeometry/vspline.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vgeometry/vspline.h" +#include "../../vpatterndb/vcontainer.h" const int EMPTY_ANGLE = -1; diff --git a/src/app/visualization/vistoolspline.h b/src/libs/vtools/visualization/vistoolspline.h similarity index 100% rename from src/app/visualization/vistoolspline.h rename to src/libs/vtools/visualization/vistoolspline.h diff --git a/src/app/visualization/vistoolsplinepath.cpp b/src/libs/vtools/visualization/vistoolsplinepath.cpp similarity index 100% rename from src/app/visualization/vistoolsplinepath.cpp rename to src/libs/vtools/visualization/vistoolsplinepath.cpp diff --git a/src/app/visualization/vistoolsplinepath.h b/src/libs/vtools/visualization/vistoolsplinepath.h similarity index 98% rename from src/app/visualization/vistoolsplinepath.h rename to src/libs/vtools/visualization/vistoolsplinepath.h index e30fdfa41..bc3f7079d 100644 --- a/src/app/visualization/vistoolsplinepath.h +++ b/src/libs/vtools/visualization/vistoolsplinepath.h @@ -30,7 +30,7 @@ #define VISTOOLSPLINEPATH_H #include "vispath.h" -#include "../libs/vgeometry/vsplinepath.h" +#include "../../vgeometry/vsplinepath.h" enum class Mode : char {Creation, Show}; diff --git a/src/app/visualization/vistooltriangle.cpp b/src/libs/vtools/visualization/vistooltriangle.cpp similarity index 98% rename from src/app/visualization/vistooltriangle.cpp rename to src/libs/vtools/visualization/vistooltriangle.cpp index 5177aabe9..76bbedefc 100644 --- a/src/app/visualization/vistooltriangle.cpp +++ b/src/libs/vtools/visualization/vistooltriangle.cpp @@ -27,8 +27,8 @@ *************************************************************************/ #include "vistooltriangle.h" -#include "../libs/vgeometry/vpointf.h" -#include "../libs/vpatterndb/vcontainer.h" +#include "../../vgeometry/vpointf.h" +#include "../../vpatterndb/vcontainer.h" #include "../tools/drawTools/vtooltriangle.h" #include diff --git a/src/app/visualization/vistooltriangle.h b/src/libs/vtools/visualization/vistooltriangle.h similarity index 100% rename from src/app/visualization/vistooltriangle.h rename to src/libs/vtools/visualization/vistooltriangle.h diff --git a/src/app/visualization/visualization.cpp b/src/libs/vtools/visualization/visualization.cpp similarity index 98% rename from src/app/visualization/visualization.cpp rename to src/libs/vtools/visualization/visualization.cpp index c7e8b9fa4..8fb348453 100644 --- a/src/app/visualization/visualization.cpp +++ b/src/libs/vtools/visualization/visualization.cpp @@ -28,7 +28,8 @@ #include "visualization.h" #include "../tools/drawTools/vdrawtool.h" -#include "../libs/vpatterndb/calculator.h" +#include "../../vpatterndb/calculator.h" +#include "../../vpatterndb/vtranslatevars.h" #include @@ -88,7 +89,7 @@ void Visualization::setMainColor(const QColor &value) //--------------------------------------------------------------------------------------------------------------------- void Visualization::SetFactor(qreal factor) { - VApplication::CheckFactor(this->factor, factor); + CheckFactor(this->factor, factor); RefreshGeometry(); } diff --git a/src/app/visualization/visualization.h b/src/libs/vtools/visualization/visualization.h similarity index 97% rename from src/app/visualization/visualization.h rename to src/libs/vtools/visualization/visualization.h index 4f03b4262..f540b3f78 100644 --- a/src/app/visualization/visualization.h +++ b/src/libs/vtools/visualization/visualization.h @@ -32,8 +32,8 @@ #include #include -#include "../core/vapplication.h" -#include "../libs/vwidgets/vmaingraphicsscene.h" +#include "../../vmisc/vabstractapplication.h" +#include "../../vwidgets/vmaingraphicsscene.h" #include "../vmisc/logging.h" #include "../../libs/vpatterndb/vcontainer.h" diff --git a/src/app/visualization/visualization.pri b/src/libs/vtools/visualization/visualization.pri similarity index 100% rename from src/app/visualization/visualization.pri rename to src/libs/vtools/visualization/visualization.pri diff --git a/src/libs/vtools/vtools.pri b/src/libs/vtools/vtools.pri new file mode 100644 index 000000000..5f57c5a14 --- /dev/null +++ b/src/libs/vtools/vtools.pri @@ -0,0 +1,13 @@ +include(dialogs/dialogs.pri) +include(tools/tools.pri) +include(visualization/visualization.pri) +include(undocommands/undocommands.pri) + +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +HEADERS += \ + $$PWD/stable.h + +SOURCES += \ + $$PWD/stable.cpp diff --git a/src/libs/vtools/vtools.pro b/src/libs/vtools/vtools.pro new file mode 100644 index 000000000..daad44c23 --- /dev/null +++ b/src/libs/vtools/vtools.pro @@ -0,0 +1,106 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2015-06-16T18:05:56 +# +#------------------------------------------------- + +# File with common stuff for whole project +include(../../../Valentina.pri) + +QT += widgets xml + +# Name of the library +TARGET = vtools + +# We want create library +TEMPLATE = lib + +CONFIG += \ + staticlib \# Making static library + c++11 # We use C++11 standard + +# Use out-of-source builds (shadow builds) +CONFIG -= debug_and_release debug_and_release_target + +# Since Qt 5.4.0 the source code location is recorded only in debug builds. +# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT. +DEFINES += QT_MESSAGELOGCONTEXT + +include(vtools.pri) + +# This is static library so no need in "make install" + +# directory for executable file +DESTDIR = bin + +# files created moc +MOC_DIR = moc + +# objecs files +OBJECTS_DIR = obj + +# Directory for files created rcc +#RCC_DIR = rcc + +# Directory for files created uic +UI_DIR = uic + +# Set using ccache. Function enable_ccache() defined in Valentina.pri. +$$enable_ccache() + +# Set precompiled headers. Function set_PCH() defined in Valentina.pri. +$$set_PCH() + +CONFIG(debug, debug|release){ + # Debug mode + unix { + #Turn on compilers warnings. + *-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ +# -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. + + noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer + # do nothing + } else { + #gcc’s 4.8.0 Address Sanitizer + #http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ + QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer + QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer + QMAKE_LFLAGS += -fsanitize=address + } + } + clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See Valentina.pri for more details. + } + } else { + *-g++{ + QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details. + } + } + +}else{ + # Release mode + DEFINES += V_NO_ASSERT + !unix:*-g++{ + QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll + } + + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols + # do nothing + } else { + !macx:!win32-msvc*{ + # Turn on debug symbols in release mode on Unix systems. + # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. + QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_LFLAGS_RELEASE = + } + } +} diff --git a/src/libs/vwidgets/stable.h b/src/libs/vwidgets/stable.h index e19a85cee..67341a4a2 100644 --- a/src/libs/vwidgets/stable.h +++ b/src/libs/vwidgets/stable.h @@ -31,7 +31,7 @@ /* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ #ifndef __clang__ -#pragma message("Compiling precompiled headers for VPatternDB library.\n") +#pragma message("Compiling precompiled headers for VWidgets library.\n") #endif /* Add C includes here */