From 121f003e7c5a8d018b842ef5cba3d0bcdb861e89 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 19 Jan 2017 12:23:42 +0200 Subject: [PATCH] Refactoring. Move grainline and lable to library VWidgets. --HG-- branch : feature --- src/libs/vtools/tools/tools.pri | 10 ++-------- src/libs/vtools/tools/vtoolseamallowance.cpp | 1 + src/libs/vtools/tools/vtoolseamallowance.h | 6 +++--- src/libs/{vtools/tools => vwidgets}/vgrainlineitem.cpp | 0 src/libs/{vtools/tools => vwidgets}/vgrainlineitem.h | 0 src/libs/{vtools/tools => vwidgets}/vpieceitem.cpp | 0 src/libs/{vtools/tools => vwidgets}/vpieceitem.h | 0 .../{vtools/tools => vwidgets}/vtextgraphicsitem.cpp | 0 .../{vtools/tools => vwidgets}/vtextgraphicsitem.h | 0 src/libs/vwidgets/vwidgets.pri | 10 ++++++++-- 10 files changed, 14 insertions(+), 13 deletions(-) rename src/libs/{vtools/tools => vwidgets}/vgrainlineitem.cpp (100%) rename src/libs/{vtools/tools => vwidgets}/vgrainlineitem.h (100%) rename src/libs/{vtools/tools => vwidgets}/vpieceitem.cpp (100%) rename src/libs/{vtools/tools => vwidgets}/vpieceitem.h (100%) rename src/libs/{vtools/tools => vwidgets}/vtextgraphicsitem.cpp (100%) rename src/libs/{vtools/tools => vwidgets}/vtextgraphicsitem.h (100%) diff --git a/src/libs/vtools/tools/tools.pri b/src/libs/vtools/tools/tools.pri index ee9c190a6..99d8e4bcb 100644 --- a/src/libs/vtools/tools/tools.pri +++ b/src/libs/vtools/tools/tools.pri @@ -51,8 +51,6 @@ HEADERS += \ $$PWD/drawTools/toolcurve/vtoolcubicbezier.h \ $$PWD/drawTools/toolcurve/vtoolcubicbezierpath.h \ $$PWD/drawTools/operation/vtoolrotation.h \ - $$PWD/vtextgraphicsitem.h \ - $$PWD/vgrainlineitem.h \ $$PWD/drawTools/operation/flipping/vtoolflippingbyline.h \ $$PWD/drawTools/operation/vabstractoperation.h \ $$PWD/drawTools/operation/flipping/vtoolflippingbyaxis.h \ @@ -61,8 +59,7 @@ HEADERS += \ $$PWD/drawTools/toolcurve/vtoolellipticalarc.h \ $$PWD/nodeDetails/vnodeellipticalarc.h \ $$PWD/vtoolseamallowance.h \ - $$PWD/nodeDetails/vtoolpiecepath.h \ - $$PWD/vpieceitem.h + $$PWD/nodeDetails/vtoolpiecepath.h SOURCES += \ $$PWD/vtooldetail.cpp \ @@ -111,8 +108,6 @@ SOURCES += \ $$PWD/drawTools/toolcurve/vtoolcubicbezier.cpp \ $$PWD/drawTools/toolcurve/vtoolcubicbezierpath.cpp \ $$PWD/drawTools/operation/vtoolrotation.cpp \ - $$PWD/vtextgraphicsitem.cpp \ - $$PWD/vgrainlineitem.cpp \ $$PWD/drawTools/operation/flipping/vtoolflippingbyline.cpp \ $$PWD/drawTools/operation/vabstractoperation.cpp \ $$PWD/drawTools/operation/flipping/vtoolflippingbyaxis.cpp \ @@ -121,5 +116,4 @@ SOURCES += \ $$PWD/drawTools/toolcurve/vtoolellipticalarc.cpp \ $$PWD/nodeDetails/vnodeellipticalarc.cpp \ $$PWD/vtoolseamallowance.cpp \ - $$PWD/nodeDetails/vtoolpiecepath.cpp \ - $$PWD/vpieceitem.cpp + $$PWD/nodeDetails/vtoolpiecepath.cpp diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index 3800846ac..9fcc89f9d 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -53,6 +53,7 @@ #include "../undocommands/savepieceoptions.h" #include "../undocommands/togglepieceinlayout.h" #include "../vwidgets/vmaingraphicsview.h" +#include "../vwidgets/vnobrushscalepathitem.h" #include #include diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h index 1c8b1a2e3..f3f0f8111 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.h +++ b/src/libs/vtools/tools/vtoolseamallowance.h @@ -34,14 +34,14 @@ #include #include -#include "../vwidgets/vnobrushscalepathitem.h" #include "vabstracttool.h" -#include "vtextgraphicsitem.h" -#include "vgrainlineitem.h" +#include "../vwidgets/vtextgraphicsitem.h" +#include "../vwidgets/vgrainlineitem.h" class VMainGraphicsScene; class DialogTool; class VPiece; +class VNoBrushScalePathItem; class VToolSeamAllowance : public VAbstractTool, public QGraphicsPathItem { diff --git a/src/libs/vtools/tools/vgrainlineitem.cpp b/src/libs/vwidgets/vgrainlineitem.cpp similarity index 100% rename from src/libs/vtools/tools/vgrainlineitem.cpp rename to src/libs/vwidgets/vgrainlineitem.cpp diff --git a/src/libs/vtools/tools/vgrainlineitem.h b/src/libs/vwidgets/vgrainlineitem.h similarity index 100% rename from src/libs/vtools/tools/vgrainlineitem.h rename to src/libs/vwidgets/vgrainlineitem.h diff --git a/src/libs/vtools/tools/vpieceitem.cpp b/src/libs/vwidgets/vpieceitem.cpp similarity index 100% rename from src/libs/vtools/tools/vpieceitem.cpp rename to src/libs/vwidgets/vpieceitem.cpp diff --git a/src/libs/vtools/tools/vpieceitem.h b/src/libs/vwidgets/vpieceitem.h similarity index 100% rename from src/libs/vtools/tools/vpieceitem.h rename to src/libs/vwidgets/vpieceitem.h diff --git a/src/libs/vtools/tools/vtextgraphicsitem.cpp b/src/libs/vwidgets/vtextgraphicsitem.cpp similarity index 100% rename from src/libs/vtools/tools/vtextgraphicsitem.cpp rename to src/libs/vwidgets/vtextgraphicsitem.cpp diff --git a/src/libs/vtools/tools/vtextgraphicsitem.h b/src/libs/vwidgets/vtextgraphicsitem.h similarity index 100% rename from src/libs/vtools/tools/vtextgraphicsitem.h rename to src/libs/vwidgets/vtextgraphicsitem.h diff --git a/src/libs/vwidgets/vwidgets.pri b/src/libs/vwidgets/vwidgets.pri index 042607eb2..1f3219b8f 100644 --- a/src/libs/vwidgets/vwidgets.pri +++ b/src/libs/vwidgets/vwidgets.pri @@ -11,7 +11,10 @@ SOURCES += \ $$PWD/vabstractsimple.cpp \ $$PWD/vnobrushscalepathitem.cpp \ $$PWD/vsimplecurve.cpp \ - $$PWD/vabstractmainwindow.cpp + $$PWD/vabstractmainwindow.cpp \ + $$PWD/vtextgraphicsitem.cpp \ + $$PWD/vgrainlineitem.cpp \ + $$PWD/vpieceitem.cpp win32-msvc*:SOURCES += $$PWD/stable.cpp @@ -26,4 +29,7 @@ HEADERS += \ $$PWD/vabstractsimple.h \ $$PWD/vnobrushscalepathitem.h \ $$PWD/vsimplecurve.h \ - $$PWD/vabstractmainwindow.h + $$PWD/vabstractmainwindow.h \ + $$PWD/vtextgraphicsitem.h \ + $$PWD/vgrainlineitem.h \ + $$PWD/vpieceitem.h