From 8d1146c1af88d8b5147f289ac3658e591e32a136 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 19 Nov 2013 22:56:49 +0200 Subject: [PATCH] Documentation for dialogs. --HG-- branch : feature --- container/calculator.h | 2 +- container/container.pri | 6 +- container/vcontainer.cpp | 116 +++--- container/vcontainer.h | 44 +-- container/vincrementtablerow.h | 69 ++++ container/vpointf.h | 106 +++++ ...arttablecell.cpp => vstandarttablerow.cpp} | 6 +- ...tandarttablecell.h => vstandarttablerow.h} | 53 ++- dialogs/dialogalongline.h | 80 ++++ dialogs/dialogarc.h | 122 ++++++ dialogs/dialogbisector.h | 96 ++++- dialogs/dialogdetail.h | 66 ++++ dialogs/dialogendline.h | 76 ++++ dialogs/dialogheight.h | 81 ++++ dialogs/dialoghistory.h | 60 +++ dialogs/dialogincrements.cpp | 6 +- dialogs/dialogincrements.h | 86 ++++ dialogs/dialogline.h | 45 +++ dialogs/dialoglineintersect.h | 104 +++++ dialogs/dialognormal.h | 91 +++++ dialogs/dialogpointofcontact.h | 81 ++++ dialogs/dialogpointofintersection.h | 58 +++ dialogs/dialogshoulderpoint.h | 92 +++++ dialogs/dialogsinglepoint.h | 37 ++ dialogs/dialogspline.h | 108 ++++- dialogs/dialogsplinepath.h | 77 ++++ dialogs/dialogtool.cpp | 2 +- dialogs/dialogtool.h | 246 +++++++++++- dialogs/dialogtriangle.h | 82 ++++ exception/vexception.h | 33 ++ exception/vexceptionbadid.h | 35 ++ exception/vexceptionconversionerror.h | 23 ++ exception/vexceptionemptyparameter.h | 49 +++ exception/vexceptionobjecterror.h | 52 +++ exception/vexceptionuniqueid.h | 41 ++ exception/vexceptionwrongparameterid.h | 41 ++ geometry/varc.h | 115 +++++- geometry/vdetail.h | 124 ++++++ geometry/vnodedetail.h | 93 +++++ geometry/vspline.h | 89 +++++ geometry/vsplinepath.h | 126 +++++- geometry/vsplinepoint.h | 20 + mainwindow.h | 373 ++++++++++++++++++ options.h | 12 + tablewindow.h | 20 +- tools/drawTools/vdrawtool.h | 76 ++++ tools/drawTools/vtoolalongline.h | 71 ++++ tools/drawTools/vtoolarc.h | 89 +++++ tools/drawTools/vtoolbisector.h | 84 ++++ tools/drawTools/vtoolendline.h | 61 +++ tools/drawTools/vtoolheight.h | 73 ++++ tools/drawTools/vtoolline.h | 88 +++++ tools/drawTools/vtoollineintersect.h | 80 ++++ tools/drawTools/vtoollinepoint.h | 43 ++ tools/drawTools/vtoolnormal.h | 81 ++++ tools/drawTools/vtoolpoint.h | 68 ++++ tools/drawTools/vtoolpointofcontact.h | 88 +++++ tools/drawTools/vtoolpointofintersection.h | 66 ++++ tools/drawTools/vtoolshoulderpoint.h | 84 ++++ tools/drawTools/vtoolsinglepoint.h | 54 +++ tools/drawTools/vtoolspline.h | 112 ++++++ tools/drawTools/vtoolsplinepath.h | 122 ++++++ tools/drawTools/vtooltriangle.h | 84 ++++ tools/modelingTools/vmodelingalongline.h | 67 ++++ tools/modelingTools/vmodelingarc.h | 75 ++++ tools/modelingTools/vmodelingbisector.h | 72 ++++ tools/modelingTools/vmodelingendline.h | 61 +++ tools/modelingTools/vmodelingheight.h | 67 ++++ tools/modelingTools/vmodelingline.h | 74 ++++ tools/modelingTools/vmodelinglineintersect.h | 76 ++++ tools/modelingTools/vmodelinglinepoint.h | 35 ++ tools/modelingTools/vmodelingnormal.h | 69 ++++ tools/modelingTools/vmodelingpoint.h | 54 +++ tools/modelingTools/vmodelingpointofcontact.h | 76 ++++ .../vmodelingpointofintersection.h | 66 ++++ tools/modelingTools/vmodelingshoulderpoint.h | 72 ++++ tools/modelingTools/vmodelingspline.h | 98 +++++ tools/modelingTools/vmodelingsplinepath.h | 108 +++++ tools/modelingTools/vmodelingtool.h | 41 ++ tools/modelingTools/vmodelingtriangle.h | 76 ++++ tools/nodeDetails/vabstractnode.h | 37 ++ tools/nodeDetails/vnodearc.h | 50 +++ tools/nodeDetails/vnodepoint.h | 72 ++++ tools/nodeDetails/vnodespline.h | 51 +++ tools/nodeDetails/vnodesplinepath.h | 50 +++ tools/vabstracttool.h | 208 ++++++++++ tools/vdatatool.h | 37 ++ tools/vtooldetail.h | 115 ++++++ widgets/doubledelegate.h | 31 ++ widgets/vapplication.h | 14 + widgets/vcontrolpointspline.h | 77 ++++ widgets/vgraphicssimpletextitem.h | 37 ++ widgets/vitem.h | 11 + widgets/vmaingraphicsscene.h | 74 ++++ widgets/vmaingraphicsview.h | 29 ++ widgets/vtablegraphicsview.h | 6 + xml/vdomdocument.h | 292 ++++++++++++++ xml/vtoolrecord.h | 45 +++ 98 files changed, 7068 insertions(+), 123 deletions(-) rename container/{vstandarttablecell.cpp => vstandarttablerow.cpp} (88%) rename container/{vstandarttablecell.h => vstandarttablerow.h} (52%) diff --git a/container/calculator.h b/container/calculator.h index 36074771f..34513faf0 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -78,7 +78,7 @@ private: */ qint32 index; /** - * @brief data container of all variables. + * @brief data container with data container of all variables. */ const VContainer *data; /** diff --git a/container/container.pri b/container/container.pri index a6461484b..9cf0c82f3 100644 --- a/container/container.pri +++ b/container/container.pri @@ -3,11 +3,11 @@ SOURCES += \ container/vincrementtablerow.cpp \ container/vcontainer.cpp \ container/calculator.cpp \ - container/vstandarttablecell.cpp + container/vstandarttablerow.cpp HEADERS += \ - container/vstandarttablecell.h \ container/vpointf.h \ container/vincrementtablerow.h \ container/vcontainer.h \ - container/calculator.h + container/calculator.h \ + container/vstandarttablerow.h diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 67b458951..0aa373568 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -34,7 +34,7 @@ qint64 VContainer::_id = 0; VContainer::VContainer() :base(QHash()), points(QHash()), pointsModeling(QHash()), - standartTable(QHash()), incrementTable(QHash()), + standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), splinesModeling(QHash()), lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), @@ -56,7 +56,7 @@ VContainer &VContainer::operator =(const VContainer &data) VContainer::VContainer(const VContainer &data) :base(QHash()), points(QHash()), pointsModeling(QHash()), - standartTable(QHash()), incrementTable(QHash()), + standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), splinesModeling(QHash()), lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), @@ -110,7 +110,7 @@ val VContainer::GetObject(const QHash &obj, key id) } } -VStandartTableCell VContainer::GetStandartTableCell(const QString &name) const +VStandartTableRow VContainer::GetStandartTableCell(const QString &name) const { Q_ASSERT(name.isEmpty()==false); return GetObject(standartTable, name); @@ -584,7 +584,7 @@ void VContainer::AddLineAngle(const QString &name, const qreal &value) qreal VContainer::GetValueStandartTableCell(const QString& name) const { - VStandartTableCell cell = GetStandartTableCell(name); + VStandartTableRow cell = GetStandartTableCell(name); qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; qreal k_growth = ( static_cast (growth()/10.0) - 176.0 ) / 6.0; qreal value = cell.GetBase() + k_size*cell.GetKsize() + k_growth*cell.GetKgrowth(); @@ -812,60 +812,60 @@ void VContainer::AddLengthLine(const QString &name, const qreal &value) void VContainer::CreateManTableIGroup () { - AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); - AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); - AddStandartTableCell("Vtos", VStandartTableCell(1450, 2, 51)); - AddStandartTableCell("Vtosh", VStandartTableCell(1506, 2, 54)); - AddStandartTableCell("Vpt", VStandartTableCell(1438, 3, 52)); - AddStandartTableCell("Vst", VStandartTableCell(1257, -1, 49)); - AddStandartTableCell("Vlt", VStandartTableCell(1102, 0, 43)); - AddStandartTableCell("Vk", VStandartTableCell(503, 0, 22)); - AddStandartTableCell("Vsht", VStandartTableCell(1522, 2, 54)); - AddStandartTableCell("Vzy", VStandartTableCell(1328, 0, 49)); - AddStandartTableCell("Vlop", VStandartTableCell(1320, 0, 49)); - AddStandartTableCell("Vps", VStandartTableCell(811, -1, 36)); - AddStandartTableCell("Ssh", VStandartTableCell(202, 4, 1)); - AddStandartTableCell("SgI", VStandartTableCell(517, 18, 2)); - AddStandartTableCell("SgII", VStandartTableCell(522, 19, 1)); - AddStandartTableCell("SgIII", VStandartTableCell(500, 20, 0)); - AddStandartTableCell("St", VStandartTableCell(390, 20, 0)); - AddStandartTableCell("Sb", VStandartTableCell(492, 15, 5)); - AddStandartTableCell("SbI", VStandartTableCell(482, 12, 6)); - AddStandartTableCell("Obed", VStandartTableCell(566, 18, 6)); - AddStandartTableCell("Ok", VStandartTableCell(386, 8, 8)); - AddStandartTableCell("Oi", VStandartTableCell(380, 8, 6)); - AddStandartTableCell("Osch", VStandartTableCell(234, 4, 4)); - AddStandartTableCell("Dsb", VStandartTableCell(1120, 0, 44)); - AddStandartTableCell("Dsp", VStandartTableCell(1110, 0, 43)); - AddStandartTableCell("Dn", VStandartTableCell(826, -3, 37)); - AddStandartTableCell("Dps", VStandartTableCell(316, 4, 7)); - AddStandartTableCell("Dpob", VStandartTableCell(783, 14, 15)); - AddStandartTableCell("Ds", VStandartTableCell(260, 1, 6)); - AddStandartTableCell("Op", VStandartTableCell(316, 12, 0)); - AddStandartTableCell("Ozap", VStandartTableCell(180, 4, 0)); - AddStandartTableCell("Pkis", VStandartTableCell(250, 4, 0)); - AddStandartTableCell("SHp", VStandartTableCell(160, 1, 4)); - AddStandartTableCell("Dlych", VStandartTableCell(500, 2, 15)); - AddStandartTableCell("Dzap", VStandartTableCell(768, 2, 24)); - AddStandartTableCell("DIIIp", VStandartTableCell(970, 2, 29)); - AddStandartTableCell("Vprp", VStandartTableCell(214, 3, 3)); - AddStandartTableCell("Vg", VStandartTableCell(262, 8, 3)); - AddStandartTableCell("Dtp", VStandartTableCell(460, 7, 9)); - AddStandartTableCell("Dp", VStandartTableCell(355, 5, 5)); - AddStandartTableCell("Vprz", VStandartTableCell(208, 3, 5)); - AddStandartTableCell("Dts", VStandartTableCell(438, 2, 10)); - AddStandartTableCell("DtsI", VStandartTableCell(469, 2, 10)); - AddStandartTableCell("Dvcht", VStandartTableCell(929, 9, 19)); - AddStandartTableCell("SHg", VStandartTableCell(370, 14, 4)); - AddStandartTableCell("Cg", VStandartTableCell(224, 6, 0)); - AddStandartTableCell("SHs", VStandartTableCell(416, 10, 2)); - AddStandartTableCell("dpzr", VStandartTableCell(121, 6, 0)); - AddStandartTableCell("Ogol", VStandartTableCell(576, 4, 4)); - AddStandartTableCell("Ssh1", VStandartTableCell(205, 5, 0)); - AddStandartTableCell("St", VStandartTableCell(410, 20, 0)); - AddStandartTableCell("Drzap", VStandartTableCell(594, 3, 19)); - AddStandartTableCell("DbII", VStandartTableCell(1020, 0, 44)); - AddStandartTableCell("Sb", VStandartTableCell(504, 15, 4)); + AddStandartTableCell("Pkor", VStandartTableRow(84, 0, 3)); + AddStandartTableCell("Pkor", VStandartTableRow(84, 0, 3)); + AddStandartTableCell("Vtos", VStandartTableRow(1450, 2, 51)); + AddStandartTableCell("Vtosh", VStandartTableRow(1506, 2, 54)); + AddStandartTableCell("Vpt", VStandartTableRow(1438, 3, 52)); + AddStandartTableCell("Vst", VStandartTableRow(1257, -1, 49)); + AddStandartTableCell("Vlt", VStandartTableRow(1102, 0, 43)); + AddStandartTableCell("Vk", VStandartTableRow(503, 0, 22)); + AddStandartTableCell("Vsht", VStandartTableRow(1522, 2, 54)); + AddStandartTableCell("Vzy", VStandartTableRow(1328, 0, 49)); + AddStandartTableCell("Vlop", VStandartTableRow(1320, 0, 49)); + AddStandartTableCell("Vps", VStandartTableRow(811, -1, 36)); + AddStandartTableCell("Ssh", VStandartTableRow(202, 4, 1)); + AddStandartTableCell("SgI", VStandartTableRow(517, 18, 2)); + AddStandartTableCell("SgII", VStandartTableRow(522, 19, 1)); + AddStandartTableCell("SgIII", VStandartTableRow(500, 20, 0)); + AddStandartTableCell("St", VStandartTableRow(390, 20, 0)); + AddStandartTableCell("Sb", VStandartTableRow(492, 15, 5)); + AddStandartTableCell("SbI", VStandartTableRow(482, 12, 6)); + AddStandartTableCell("Obed", VStandartTableRow(566, 18, 6)); + AddStandartTableCell("Ok", VStandartTableRow(386, 8, 8)); + AddStandartTableCell("Oi", VStandartTableRow(380, 8, 6)); + AddStandartTableCell("Osch", VStandartTableRow(234, 4, 4)); + AddStandartTableCell("Dsb", VStandartTableRow(1120, 0, 44)); + AddStandartTableCell("Dsp", VStandartTableRow(1110, 0, 43)); + AddStandartTableCell("Dn", VStandartTableRow(826, -3, 37)); + AddStandartTableCell("Dps", VStandartTableRow(316, 4, 7)); + AddStandartTableCell("Dpob", VStandartTableRow(783, 14, 15)); + AddStandartTableCell("Ds", VStandartTableRow(260, 1, 6)); + AddStandartTableCell("Op", VStandartTableRow(316, 12, 0)); + AddStandartTableCell("Ozap", VStandartTableRow(180, 4, 0)); + AddStandartTableCell("Pkis", VStandartTableRow(250, 4, 0)); + AddStandartTableCell("SHp", VStandartTableRow(160, 1, 4)); + AddStandartTableCell("Dlych", VStandartTableRow(500, 2, 15)); + AddStandartTableCell("Dzap", VStandartTableRow(768, 2, 24)); + AddStandartTableCell("DIIIp", VStandartTableRow(970, 2, 29)); + AddStandartTableCell("Vprp", VStandartTableRow(214, 3, 3)); + AddStandartTableCell("Vg", VStandartTableRow(262, 8, 3)); + AddStandartTableCell("Dtp", VStandartTableRow(460, 7, 9)); + AddStandartTableCell("Dp", VStandartTableRow(355, 5, 5)); + AddStandartTableCell("Vprz", VStandartTableRow(208, 3, 5)); + AddStandartTableCell("Dts", VStandartTableRow(438, 2, 10)); + AddStandartTableCell("DtsI", VStandartTableRow(469, 2, 10)); + AddStandartTableCell("Dvcht", VStandartTableRow(929, 9, 19)); + AddStandartTableCell("SHg", VStandartTableRow(370, 14, 4)); + AddStandartTableCell("Cg", VStandartTableRow(224, 6, 0)); + AddStandartTableCell("SHs", VStandartTableRow(416, 10, 2)); + AddStandartTableCell("dpzr", VStandartTableRow(121, 6, 0)); + AddStandartTableCell("Ogol", VStandartTableRow(576, 4, 4)); + AddStandartTableCell("Ssh1", VStandartTableRow(205, 5, 0)); + AddStandartTableCell("St", VStandartTableRow(410, 20, 0)); + AddStandartTableCell("Drzap", VStandartTableRow(594, 3, 19)); + AddStandartTableCell("DbII", VStandartTableRow(1020, 0, 44)); + AddStandartTableCell("Sb", VStandartTableRow(504, 15, 4)); } QVector VContainer::GetReversePoint(const QVector &points) const diff --git a/container/vcontainer.h b/container/vcontainer.h index e96901596..91044d5cf 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -29,7 +29,7 @@ #ifndef VCONTAINER_H #define VCONTAINER_H -#include "vstandarttablecell.h" +#include "vstandarttablerow.h" #include "vincrementtablerow.h" #include "../geometry/varc.h" #include "../geometry/vsplinepath.h" @@ -80,7 +80,7 @@ public: * @param name name of standart table row * @return row of standart table */ - VStandartTableCell GetStandartTableCell(const QString& name) const; + VStandartTableRow GetStandartTableCell(const QString& name) const; /** * @brief GetIncrementTableRow return increment table row by name * @param name name of increment table row @@ -181,7 +181,7 @@ public: * @param name name of row of standart table * @param cell row of standart table */ - inline void AddStandartTableCell(const QString& name, const VStandartTableCell& cell) + inline void AddStandartTableCell(const QString& name, const VStandartTableRow& cell) {standartTable[name] = cell;} /** * @brief AddIncrementTableRow add new row of increment table @@ -340,7 +340,7 @@ public: * @param name name of row * @param cell row of standart table */ - inline void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell) + inline void UpdateStandartTableCell(const QString& name, const VStandartTableRow& cell) {standartTable[name] = cell;} /** * @brief UpdateIncrementTableRow update increment table row by name @@ -433,82 +433,82 @@ public: */ inline void RemoveIncrementTableRow(const QString& name) {incrementTable.remove(name);} /** - * @brief DataPoints return container of points + * @brief data container with dataPoints return container of points * @return pointer on container of points */ inline const QHash *DataPoints() const {return &points;} /** - * @brief DataPointsModeling return container of points modeling + * @brief data container with dataPointsModeling return container of points modeling * @return pointer on container of points modeling */ inline const QHash *DataPointsModeling() const {return &pointsModeling;} /** - * @brief DataSplines return container of splines + * @brief data container with dataSplines return container of splines * @return pointer on container of splines */ inline const QHash *DataSplines() const {return &splines;} /** - * @brief DataSplinesModeling return container of splines modeling + * @brief data container with dataSplinesModeling return container of splines modeling * @return pointer on container of splines modeling */ inline const QHash *DataSplinesModeling() const {return &splinesModeling;} /** - * @brief DataArcs return container of arcs + * @brief data container with dataArcs return container of arcs * @return pointer on container of arcs */ inline const QHash *DataArcs() const {return &arcs;} /** - * @brief DataArcsModeling return container of arcs modeling + * @brief data container with dataArcsModeling return container of arcs modeling * @return pointer on container of arcs modeling */ inline const QHash *DataArcsModeling() const {return &arcsModeling;} /** - * @brief DataBase return container of data + * @brief data container with dataBase return container of data * @return pointer on container of base data */ inline const QHash *DataBase() const {return &base;} /** - * @brief DataStandartTable return container of standart table + * @brief data container with dataStandartTable return container of standart table * @return pointer on container of standart table */ - inline const QHash *DataStandartTable() const {return &standartTable;} + inline const QHash *DataStandartTable() const {return &standartTable;} /** - * @brief DataIncrementTable return container of increment table + * @brief data container with dataIncrementTable return container of increment table * @return pointer on container of increment table */ inline const QHash *DataIncrementTable() const {return &incrementTable;} /** - * @brief DataLengthLines return container of lines lengths + * @brief data container with dataLengthLines return container of lines lengths * @return pointer on container of lines lengths */ inline const QHash *DataLengthLines() const {return &lengthLines;} /** - * @brief DataLengthSplines return container of splines lengths + * @brief data container with dataLengthSplines return container of splines lengths * @return pointer on container of splines lengths */ inline const QHash *DataLengthSplines() const {return &lengthSplines;} /** - * @brief DataLengthArcs return container of arcs length + * @brief data container with dataLengthArcs return container of arcs length * @return pointer on container of arcs length */ inline const QHash *DataLengthArcs() const {return &lengthArcs;} /** - * @brief DataLineAngles return container of angles of line + * @brief data container with dataLineAngles return container of angles of line * @return pointer on container of angles of line */ inline const QHash *DataLineAngles() const {return &lineAngles;} /** - * @brief DataSplinePaths return container of spline paths + * @brief data container with dataSplinePaths return container of spline paths * @return pointer on container of spline paths */ inline const QHash *DataSplinePaths() const {return &splinePaths;} /** - * @brief DataSplinePathsModeling return container of spline paths modeling + * @brief data container with dataSplinePathsModeling return container of spline paths modeling * @return pointer on container of spline paths modeling */ inline const QHash *DataSplinePathsModeling() const {return &splinePathsModeling;} /** - * @brief DataDetails return container of details + * @brief data container with dataDetails return container of details * @return pointer on container of details */ inline const QHash *DataDetails() const {return &details;} @@ -593,7 +593,7 @@ private: /** * @brief standartTable container of standart table rows */ - QHash standartTable; + QHash standartTable; /** * @brief incrementTable */ diff --git a/container/vincrementtablerow.h b/container/vincrementtablerow.h index 5aa643e7d..9b805ed2c 100644 --- a/container/vincrementtablerow.h +++ b/container/vincrementtablerow.h @@ -29,27 +29,96 @@ #ifndef VINCREMENTTABLEROW_H #define VINCREMENTTABLEROW_H +/** + * @brief The VIncrementTableRow class keep data row of increment table + */ class VIncrementTableRow { public: + /** + * @brief VIncrementTableRow create enpty row + */ VIncrementTableRow(); + /** + * @brief VIncrementTableRow create row + * @param id id + * @param base value in base size and growth + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief getId return id of row + * @return id + */ inline qint64 getId() const {return id;} + /** + * @brief setId set id of row + * @param value id + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getBase return value in base size and growth + * @return value + */ inline qreal getBase() const {return base;} + /** + * @brief setBase set value in base size and growth + * @param value base value + */ inline void setBase(const qreal &value) {base = value;} + /** + * @brief getKsize return increment in sizes + * @return increment + */ inline qreal getKsize() const {return ksize;} + /** + * @brief setKsize set increment in sizes + * @param value value of increment + */ inline void setKsize(const qreal &value) {ksize = value;} + /** + * @brief getKgrowth return increment in growths + * @return increment + */ inline qreal getKgrowth() const {return kgrowth;} + /** + * @brief setKgrowth set increment in growths + * @param value value of increment + */ inline void setKgrowth(const qreal &value) {kgrowth = value;} + /** + * @brief getDescription return description + * @return description + */ inline QString getDescription() const {return description;} + /** + * @brief setDescription set description for row + * @param value description + */ inline void setDescription(const QString &value) {description = value;} private: + /** + * @brief id identificator + */ qint64 id; + /** + * @brief base value in base size and growth + */ qreal base; + /** + * @brief ksize increment in sizes + */ qreal ksize; + /** + * @brief kgrowth increment in growths + */ qreal kgrowth; + /** + * @brief description description of increment + */ QString description; }; diff --git a/container/vpointf.h b/container/vpointf.h index b2396ce54..ae9188a43 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -29,41 +29,147 @@ #ifndef VPOINTF_H #define VPOINTF_H +/** + * @brief The VPointF class keep data of point. + */ class VPointF { public: + /** + * @brief VPointF creat empty point + */ inline VPointF () :_name(QString()), _mx(0), _my(0), _x(0), _y(0), mode(Draw::Calculation), idObject(0){} + /** + * @brief VPointF copy constructor + * @param point + */ inline VPointF (const VPointF &point ) :_name(point.name()), _mx(point.mx()), _my(point.my()), _x(point.x()), _y(point.y()), mode(point.getMode()), idObject(point.getIdObject()){} + /** + * @brief VPointF create new point + * @param x x coordinate + * @param y y coordinate + * @param name name of point + * @param mx offset name respect to x + * @param my offset name respect to y + * @param mode mode of draw + * @param idObject point modeling keep here id of parent point + */ inline VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0) :_name(name), _mx(mx), _my(my), _x(x), _y(y), mode(mode), idObject(idObject){} + /** + * @brief operator = assignment operator + * @param point point + * @return point + */ VPointF &operator=(const VPointF &point); ~VPointF(){} + /** + * @brief name return name of point + * @return name + */ inline QString name() const { return _name;} + /** + * @brief mx return offset name respect to x + * @return offset + */ inline qreal mx() const {return _mx;} + /** + * @brief my return offset name respect to y + * @return offset + */ inline qreal my() const {return _my;} + /** + * @brief setName set name of point + * @param name name + */ inline void setName(const QString &name) {_name = name;} + /** + * @brief setMx set offset name respect to x + * @param mx offset + */ inline void setMx(qreal mx) {_mx = mx;} + /** + * @brief setMy set offset name respect to y + * @param my offset + */ inline void setMy(qreal my) {_my = my;} + /** + * @brief toQPointF convert to QPointF + * @return QPointF point + */ inline QPointF toQPointF()const {return QPointF(_x, _y);} + /** + * @brief x return x coordinate + * @return value + */ inline qreal x() const {return _x;} + /** + * @brief setX set x coordinate + * @param value x coordinate + */ inline void setX(const qreal &value){_x = value;} + /** + * @brief y return y coordinate + * @return value + */ inline qreal y() const {return _y;} + /** + * @brief setY set y coordinate + * @param value y coordinate + */ inline void setY(const qreal &value){_y = value;} + /** + * @brief getMode return mode of point + * @return mode + */ inline Draw::Draws getMode() const{return mode;} + /** + * @brief setMode set mode for point + * @param value mode + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getIdObject return id of parrent. + * @return id + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject set id of parent + * @param value id + */ inline void setIdObject(const qint64 &value) {idObject = value;} private: + /** + * @brief _name name of point + */ QString _name; + /** + * @brief _mx offset name respect to x + */ qreal _mx; + /** + * @brief _my offset name respect to y + */ qreal _my; + /** + * @brief _x x coordinate + */ qreal _x; + /** + * @brief _y y coordinate + */ qreal _y; + /** + * @brief mode mode of point + */ Draw::Draws mode; + /** + * @brief idObject id of parent. Only for point modeling. All another return 0. + */ qint64 idObject; }; diff --git a/container/vstandarttablecell.cpp b/container/vstandarttablerow.cpp similarity index 88% rename from container/vstandarttablecell.cpp rename to container/vstandarttablerow.cpp index 4a824bba9..668036804 100644 --- a/container/vstandarttablecell.cpp +++ b/container/vstandarttablerow.cpp @@ -26,10 +26,10 @@ ** *************************************************************************/ -#include "vstandarttablecell.h" +#include "vstandarttablerow.h" -VStandartTableCell::VStandartTableCell() +VStandartTableRow::VStandartTableRow() :base(0), ksize(0), kgrowth(0), description(QString()){} -VStandartTableCell::VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description) +VStandartTableRow::VStandartTableRow(qint32 base, qreal ksize, qreal kgrowth, QString description) :base(base), ksize(ksize), kgrowth(kgrowth), description(description){} diff --git a/container/vstandarttablecell.h b/container/vstandarttablerow.h similarity index 52% rename from container/vstandarttablecell.h rename to container/vstandarttablerow.h index b0fe41bb0..0a2dd2231 100644 --- a/container/vstandarttablecell.h +++ b/container/vstandarttablerow.h @@ -26,23 +26,64 @@ ** *************************************************************************/ -#ifndef VSTANDARTTABLECELL_H -#define VSTANDARTTABLECELL_H +#ifndef VSTANDARTTABLEROW_H +#define VSTANDARTTABLEROW_H -class VStandartTableCell +/** + * @brief The VStandartTableRow class keep data row of standart table + */ +class VStandartTableRow { public: - VStandartTableCell(); - VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief VStandartTableRow create empty row + */ + VStandartTableRow(); + /** + * @brief VStandartTableRow create row + * @param base value in base size and growth + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ + VStandartTableRow(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief GetBase return value in base size and growth + * @return value + */ inline qint32 GetBase() const {return base;} + /** + * @brief GetKsize return increment in sizes + * @return increment + */ inline qreal GetKsize() const {return ksize;} + /** + * @brief GetKgrowth return increment in growths + * @return increment + */ inline qreal GetKgrowth() const {return kgrowth;} + /** + * @brief GetDescription return description + * @return description + */ inline QString GetDescription() const {return description;} private: + /** + * @brief base value in base size and growth + */ qint32 base; + /** + * @brief ksize increment in sizes + */ qreal ksize; + /** + * @brief kgrowth increment in growths + */ qreal kgrowth; + /** + * @brief description description measurement + */ QString description; }; -#endif // VSTANDARTTABLECELL_H +#endif // VSTANDARTTABLEROW_H diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index 819498b1d..67aa5f0a2 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -36,34 +36,114 @@ namespace Ui class DialogAlongLine; } +/** + * @brief The DialogAlongLine class dialog for ToolAlongLine. Help create point and edit option. + */ class DialogAlongLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogAlongLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogAlongLine(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getFirstPointId return id first point of line + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id first point of line + * @param value id + * @param id id of current point + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id second point of line + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id second point of line + * @param value id + * @param id id of current point + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogAlongLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogAlongLine *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index 014955cce..27bf820bb 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -36,49 +36,171 @@ namespace Ui class DialogArc; } +/** + * @brief The DialogArc class dialog for ToolArc. Help create arc and edit option. + */ class DialogArc : public DialogTool { Q_OBJECT public: + /** + * @brief DialogArc create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogArc(); + /** + * @brief GetCenter return id of center point + * @return id id + */ inline qint64 GetCenter() const {return center;} + /** + * @brief SetCenter set id of center point + * @param value id + */ void SetCenter(const qint64 &value); + /** + * @brief GetRadius return formula of radius + * @return formula + */ inline QString GetRadius() const {return radius;} + /** + * @brief SetRadius set formula of radius + * @param value formula + */ void SetRadius(const QString &value); + /** + * @brief GetF1 return formula first angle of arc + * @return formula + */ inline QString GetF1() const {return f1;} + /** + * @brief SetF1 set formula first angle of arc + * @param value formula + */ void SetF1(const QString &value); + /** + * @brief GetF2 return formula second angle of arc + * @return formula + */ inline QString GetF2() const {return f2;} + /** + * @brief SetF2 set formula second angle of arc + * @param value formula + */ void SetF2(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief ValChenged show description angles of lines + * @param row number of row + */ virtual void ValChenged(int row); + /** + * @brief PutRadius put variable into formula of radius + */ void PutRadius(); + /** + * @brief PutF1 put variable into formula of first angle + */ void PutF1(); + /** + * @brief PutF2 put variable into formula of second angle + */ void PutF2(); + /** + * @brief LineAngles show variable angles of lines + */ void LineAngles(); + /** + * @brief RadiusChanged after change formula of radius calculate value and show result + */ void RadiusChanged(); + /** + * @brief F1Changed after change formula of first angle calculate value and show result + */ void F1Changed(); + /** + * @brief F2Changed after change formula of second angle calculate value and show result + */ void F2Changed(); protected: + /** + * @brief CheckState if all is right enable button ok + */ virtual void CheckState(); private: Q_DISABLE_COPY(DialogArc) + /** + * @brief ui keeps information about user interface + */ Ui::DialogArc *ui; + /** + * @brief flagRadius true if value of radius is correct + */ bool flagRadius; + /** + * @brief flagF1 true if value of first angle is correct + */ bool flagF1; + /** + * @brief flagF2 true if value of second angle is correct + */ bool flagF2; + /** + * @brief timerRadius timer of check formula of radius + */ QTimer *timerRadius; + /** + * @brief timerF1 timer of check formula of first angle + */ QTimer *timerF1; + /** + * @brief timerF2 timer of check formula of second angle + */ QTimer *timerF2; + /** + * @brief center id of center point + */ qint64 center; + /** + * @brief radius formula of radius + */ QString radius; + /** + * @brief f1 formula of first angle + */ QString f1; + /** + * @brief f2 formula of second angle + */ QString f2; + /** + * @brief EvalRadius calculate value of radius + */ void EvalRadius(); + /** + * @brief EvalF1 calculate value of first angle + */ void EvalF1(); + /** + * @brief EvalF2 calculate value of second angle + */ void EvalF2(); + /** + * @brief ShowLineAngles show varibles angles of lines + */ void ShowLineAngles(); }; diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index 99a665ce9..dbdb03280 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -36,37 +36,129 @@ namespace Ui class DialogBisector; } +/** + * @brief The DialogBisector class dialog for ToolBisector. Help create point and edit option. + */ class DialogBisector : public DialogTool { Q_OBJECT public: - explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + /** + * @brief DialogBisector create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ + DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, + QWidget *parent = 0); ~DialogBisector(); + /** + * @brief getPointName return name of point + * @return name + */ QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); + /** + * @brief getThirdPointId return id of third point + * @return id + */ inline qint64 getThirdPointId() const {return thirdPointId;} + /** + * @brief setThirdPointId set id of third point + * @param value id + * @param id don't show this id in list + */ void setThirdPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogBisector) + /** + * @brief ui keeps information about user interface + */ Ui::DialogBisector *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief firstPointId id of first point + */ qint64 firstPointId; + /** + * @brief secondPointId id of second point + */ qint64 secondPointId; + /** + * @brief thirdPointId id of third point + */ qint64 thirdPointId; }; diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index e4024f9f2..3253422cd 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -32,26 +32,92 @@ #include "ui_dialogdetail.h" #include "dialogtool.h" +/** + * @brief The DialogDetail class dialog for ToolDetai. Help create detail and edit option. + */ class DialogDetail : public DialogTool { Q_OBJECT public: + /** + * @brief DialogDetail create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0); + /** + * @brief getDetails return detail + * @return detail + */ inline VDetail getDetails() const {return details;} + /** + * @brief setDetails set detail + * @param value detail + */ void setDetails(const VDetail &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of objects (points, arcs, splines, spline paths) + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief BiasXChanged changed value of offset for object respect to x + * @param d value in mm + */ void BiasXChanged(qreal d); + /** + * @brief BiasYChanged changed value of offset for object respect to y + * @param d value in mm + */ void BiasYChanged(qreal d); + /** + * @brief ClickedSeams save supplement of seams for detail + * @param checked 1 - need supplement, 0 - don't need supplement + */ void ClickedSeams(bool checked); + /** + * @brief ClickedClosed save closed equdistant or not + * @param checked 1 - closed, 0 - don't closed + */ void ClickedClosed(bool checked); + /** + * @brief ObjectChanged changed new object (point, arc, spline or spline path) form list + * @param row number of row + */ void ObjectChanged(int row); private: + /** + * @brief ui keeps information about user interface + */ Ui::DialogDetail ui; + /** + * @brief details detail + */ VDetail details; + /** + * @brief supplement keep option supplement of seams + */ bool supplement; + /** + * @brief closed keep option about equdistant (closed or not) + */ bool closed; + /** + * @brief NewItem add new object (point, arc, spline or spline path) to list + * @param id id of object + * @param typeTool type of tool + * @param mode mode + * @param typeNode type of node in detail + * @param mx offset respect to x + * @param my offset respect to y + */ void NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode, const NodeDetail::NodeDetails &typeNode, qreal mx = 0, qreal my = 0); }; diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index 0dfd06401..394ad7876 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -36,32 +36,108 @@ namespace Ui class DialogEndLine; } +/** + * @brief The DialogEndLine class dialog for ToolEndLine. Help create point and edit option. + */ class DialogEndLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogEndLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogEndLine(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getAngle return angle of line + * @return angle in degree + */ inline qreal getAngle() const {return angle;} + /** + * @brief setAngle set angle of line + * @param value angle in degree + */ void setAngle(const qreal &value); + /** + * @brief getBasePointId return id base point of line + * @return id + */ inline qint64 getBasePointId() const {return basePointId;} + /** + * @brief setBasePointId set id base point of line + * @param value id + * @param id don't show this id in list + */ void setBasePointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogEndLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogEndLine *ui; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief angle angle of line + */ qreal angle; + /** + * @brief basePointId id base point of line + */ qint64 basePointId; }; diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index 186af6873..dfa360a9b 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -36,34 +36,115 @@ namespace Ui class DialogHeight; } +/** + * @brief The DialogHeight class dialog for ToolHeight. Help create point and edit option. + */ class DialogHeight : public DialogTool { Q_OBJECT public: + /** + * @brief DialogHeight create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogHeight(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getBasePointId return id base point of height + * @return id + */ inline qint64 getBasePointId() const {return basePointId;} + /** + * @brief setBasePointId set id base point of height + * @param value id + * @param id don't show this id in list + */ void setBasePointId(const qint64 &value, const qint64 &id); + /** + * @brief getP1LineId return id first point of line + * @return id id + */ inline qint64 getP1LineId() const {return p1LineId;} + /** + * @brief setP1LineId set id first point of line + * @param value id + * @param id don't show this id in list + */ void setP1LineId(const qint64 &value, const qint64 &id); + /** + * @brief getP2LineId return id second point of line + * @return id + */ inline qint64 getP2LineId() const{return p2LineId;} + /** + * @brief setP2LineId set id second point of line + * @param value id + * @param id don't show this id in list + */ void setP2LineId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogHeight) + /** + * @brief ui keeps information about user interface + */ Ui::DialogHeight *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief basePointId id base point of height + */ qint64 basePointId; + /** + * @brief p1LineId id first point of line + */ qint64 p1LineId; + /** + * @brief p2LineId id second point of line + */ qint64 p2LineId; }; diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index 692f265c3..120fff0ee 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -37,30 +37,90 @@ namespace Ui class DialogHistory; } +/** + * @brief The DialogHistory class show dialog history. + */ class DialogHistory : public DialogTool { Q_OBJECT public: + /** + * @brief DialogHistory create dialog + * @param data container with data + * @param doc dom document container + * @param parent parent widget + */ DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0); virtual ~DialogHistory(); public slots: + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief cellClicked changed history record + * @param row number row in table + * @param column number column in table + */ void cellClicked(int row, int column); + /** + * @brief ChangedCursor changed cursor of input. Cursor show after what record we will insert new object + * @param id id of object + */ void ChangedCursor(qint64 id); + /** + * @brief UpdateHistory update history table + */ void UpdateHistory(); signals: + /** + * @brief ShowHistoryTool signal change color of selected in records tool + * @param id id of tool + * @param color new color of tool + * @param enable true enable selection, false disable selection + */ void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable); protected: + /** + * @brief closeEvent handle when windows is closing + * @param event event + */ virtual void closeEvent ( QCloseEvent * event ); private: Q_DISABLE_COPY(DialogHistory) + /** + * @brief ui keeps information about user interface + */ Ui::DialogHistory *ui; + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief cursorRow save number of row where is cursor + */ qint32 cursorRow; + /** + * @brief cursorToolRecordRow save number of row selected record + */ qint32 cursorToolRecordRow; + /** + * @brief FillTable fill table + */ void FillTable(); + /** + * @brief Record return description for record + * @param tool record data + * @return description + */ QString Record(const VToolRecord &tool); + /** + * @brief InitialTable set initial option of table + */ void InitialTable(); + /** + * @brief ShowPoint show selected point + */ void ShowPoint(); }; diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index a50fd47dc..f22ac2614 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -67,14 +67,14 @@ DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget void DialogIncrements::FillStandartTable() { - const QHash *standartTable = data->DataStandartTable(); + const QHash *standartTable = data->DataStandartTable(); qint32 currentRow = -1; - QHashIterator i(*standartTable); + QHashIterator i(*standartTable); ui->tableWidgetStandart->setRowCount ( standartTable->size() ); while (i.hasNext()) { i.next(); - VStandartTableCell cell = i.value(); + VStandartTableRow cell = i.value(); currentRow++; QTableWidgetItem *item = new QTableWidgetItem(QString(i.key())); diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index 58fa46611..d5c1e895e 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -37,38 +37,124 @@ namespace Ui class DialogIncrements; } +/** + * @brief The DialogIncrements class show dialog increments. Tables of all variables in program will be here. + */ class DialogIncrements : public DialogTool { Q_OBJECT public: + /** + * @brief DialogIncrements create dialog + * @param data container with data + * @param doc dom document container + * @param parent parent widget + */ DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent = 0); ~DialogIncrements(); public slots: + /** + * @brief clickedToolButtonAdd create new row in table + */ void clickedToolButtonAdd(); + /** + * @brief clickedToolButtonRemove remove one row from table + */ void clickedToolButtonRemove(); + /** + * @brief cellChanged cell in table was changed + * @param row number of row + * @param column number of column + */ void cellChanged ( qint32 row, qint32 column ); + /** + * @brief FullUpdateFromFile update information in tables form file + */ void FullUpdateFromFile(); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); signals: + /** + * @brief FullUpdateTree signal update data for dom document + */ void FullUpdateTree(); + /** + * @brief haveLiteChange signal show sign of change + */ void haveLiteChange(); private: Q_DISABLE_COPY(DialogIncrements) + /** + * @brief ui keeps information about user interface + */ Ui::DialogIncrements *ui; + /** + * @brief data container with data + */ VContainer *data; // need because we must change data + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief row save number of row current selected cell + */ qint32 row; + /** + * @brief column save number of column current selected cell + */ qint32 column; + /** + * @brief InitialStandartTable initial option standart table + */ void InitialStandartTable(); + /** + * @brief InitialIncrementTable initial option increment table + */ void InitialIncrementTable(); + /** + * @brief InitialLinesTable initial option lines table + */ void InitialLinesTable(); + /** + * @brief InitialSplinesTable initial option splines table + */ void InitialSplinesTable(); + /** + * @brief InitialArcsTable initial option arcs table + */ void InitialArcsTable(); + /** + * @brief FillStandartTable fill data for standart table + */ void FillStandartTable(); + /** + * @brief FillIncrementTable fill data for increment table + */ void FillIncrementTable(); + /** + * @brief FillLengthLines fill data for table of lines lengths + */ void FillLengthLines(); + /** + * @brief FillLengthSplines fill data for table of splines lengths + */ void FillLengthSplines(); + /** + * @brief FillLengthArcs fill data for table of arcs lengths + */ void FillLengthArcs(); + /** + * @brief AddIncrementToFile save created increment to file + * @param id id of increment + * @param name name + * @param base base value + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ void AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, qreal kgrowth, QString description); }; diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index d0e3c9d1c..74194b6fd 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -36,24 +36,69 @@ namespace Ui class DialogLine; } +/** + * @brief The DialogLine class dialog for ToolLine. Help create line and edit option. + */ class DialogLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogLine(); + /** + * @brief getFirstPoint return id first point + * @return id + */ inline qint64 getFirstPoint() const {return firstPoint;} + /** + * @brief setFirstPoint set id first point + * @param value id + */ void setFirstPoint(const qint64 &value); + /** + * @brief getSecondPoint return id second point + * @return id + */ inline qint64 getSecondPoint() const {return secondPoint;} + /** + * @brief setSecondPoint set id second point + * @param value id + */ void setSecondPoint(const qint64 &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogLine *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief firstPoint id first point + */ qint64 firstPoint; + /** + * @brief secondPoint id second point + */ qint64 secondPoint; }; diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index ff3183c3c..8fbbb410b 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -36,41 +36,145 @@ namespace Ui class DialogLineIntersect; } +/** + * @brief The DialogLineIntersect class dialog for ToolLineIntersect. Help create point and edit option. + */ class DialogLineIntersect : public DialogTool { Q_OBJECT public: + /** + * @brief DialogLineIntersect create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogLineIntersect(); + /** + * @brief getP1Line1 return id first point of first line + * @return id + */ inline qint64 getP1Line1() const {return p1Line1;} + /** + * @brief setP1Line1 set id first point of first line + * @param value id + */ void setP1Line1(const qint64 &value); + /** + * @brief getP2Line1 return id second point of first line + * @return id + */ inline qint64 getP2Line1() const {return p2Line1;} + /** + * @brief setP2Line1 set id second point of first line + * @param value id + */ void setP2Line1(const qint64 &value); + /** + * @brief getP1Line2 return id first point of second line + * @return id + */ inline qint64 getP1Line2() const {return p1Line2;} + /** + * @brief setP1Line2 set id first point of second line + * @param value id + */ void setP1Line2(const qint64 &value); + /** + * @brief getP2Line2 return id second point of second line + * @return id + */ inline qint64 getP2Line2() const {return p2Line2;} + /** + * @brief setP2Line2 set id second point of second line + * @param value id + */ void setP2Line2(const qint64 &value); + /** + * @brief getPointName return name of point + * @return + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value + */ void setPointName(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief P1Line1Changed changed first point of first line + * @param index index in list + */ void P1Line1Changed( int index); + /** + * @brief P2Line1Changed changed second point of first line + * @param index index in list + */ void P2Line1Changed( int index); + /** + * @brief P1Line2Changed changed first point of second line + * @param index index in list + */ void P1Line2Changed( int index); + /** + * @brief P2Line2Changed changed second point of second line + * @param index index in list + */ void P2Line2Changed( int index); private: Q_DISABLE_COPY(DialogLineIntersect) + /** + * @brief ui keeps information about user interface + */ Ui::DialogLineIntersect *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief p1Line1 id first point of first line + */ qint64 p1Line1; + /** + * @brief p2Line1 id second point of first line + */ qint64 p2Line1; + /** + * @brief p1Line2 id first point of second line + */ qint64 p1Line2; + /** + * @brief p2Line2 id second point of second line + */ qint64 p2Line2; + /** + * @brief flagPoint keep state of point + */ bool flagPoint; + /** + * @brief CheckState check state of dialog. Enable or disable button ok. + */ virtual void CheckState(); + /** + * @brief CheckIntersecion check intersection of points + * @return true - line have intersection, false = don't have + */ bool CheckIntersecion(); }; diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index b2a7329f5..4d8e97d56 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -36,36 +36,127 @@ namespace Ui class DialogNormal; } +/** + * @brief The DialogNormal class dialog for ToolNormal. Help create point and edit option. + */ class DialogNormal : public DialogTool { Q_OBJECT public: + /** + * @brief DialogNormal create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogNormal(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const{return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getAngle return aditional angle of normal + * @return angle in degree + */ inline qreal getAngle() const {return angle;} + /** + * @brief setAngle set aditional angle of normal + * @param value angle in degree + */ void setAngle(const qreal &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogNormal) + /** + * @brief ui keeps information about user interface + */ Ui::DialogNormal *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief angle aditional angle of normal + */ qreal angle; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 416e5adcf..c8076c74a 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -32,33 +32,114 @@ #include "ui_dialogpointofcontact.h" #include "dialogtool.h" +/** + * @brief The DialogPointOfContact class dialog for ToolPointOfContact. Help create point and edit option. + */ class DialogPointOfContact : public DialogTool { Q_OBJECT public: + /** + * @brief DialogPointOfContact create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getRadius return formula radius of arc + * @return formula + */ inline QString getRadius() const {return radius;} + /** + * @brief setRadius set formula radius of arc + * @param value formula + */ void setRadius(const QString &value); + /** + * @brief GetCenter return id of center point + * @return id + */ inline qint64 getCenter() const {return center;} + /** + * @brief SetCenter set id of center point + * @param value id + * @param id don't show this id in list. + */ void setCenter(const qint64 &value, const qint64 &id); + /** + * @brief getFirstPoint return id first point + * @return id + */ inline qint64 getFirstPoint() const {return firstPoint;} + /** + * @brief setFirstPoint set id first point + * @param value id + * @param id don't show this id in list. + */ void setFirstPoint(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPoint return id second point + * @return id + */ inline qint64 getSecondPoint() const {return secondPoint;} + /** + * @brief setSecondPoint set id second point + * @param value id + * @param id don't show this id in list. + */ void setSecondPoint(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfContact) + /** + * @brief ui keeps information about user interface + */ Ui::DialogPointOfContact ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief radius radius of arc + */ QString radius; + /** + * @brief center id center point of arc + */ qint64 center; + /** + * @brief firstPoint id first point of line + */ qint64 firstPoint; + /** + * @brief secondPoint id second point of line + */ qint64 secondPoint; }; diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 9ea655f58..3c4041153 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -36,28 +36,86 @@ namespace Ui class DialogPointOfIntersection; } +/** + * @brief The DialogPointOfIntersection class dialog for ToolPointOfIntersection. Help create point and edit option. + */ class DialogPointOfIntersection : public DialogTool { Q_OBJECT public: + /** + * @brief DialogPointOfIntersection create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogPointOfIntersection(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list. + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list. + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfIntersection) + /** + * @brief ui keeps information about user interface + */ Ui::DialogPointOfIntersection *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index b9c4df8c2..ce01f3235 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -36,37 +36,129 @@ namespace Ui class DialogShoulderPoint; } +/** + * @brief The DialogShoulderPoint class dialog for ToolShoulderPoint. Help create point and edit option. + */ class DialogShoulderPoint : public DialogTool { Q_OBJECT public: + /** + * @brief DialogShoulderPoint create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogShoulderPoint(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getP1Line return id first point of line + * @return id + */ inline qint64 getP1Line() const {return p1Line;} + /** + * @brief setP1Line set id first point of line + * @param value id + * @param id don't show this id in list + */ void setP1Line(const qint64 &value, const qint64 &id); + /** + * @brief getP2Line return id second point of line + * @return id + */ inline qint64 getP2Line() const {return p2Line;} + /** + * @brief setP2Line set id second point of line + * @param value id + * @param id don't show this id in list + */ void setP2Line(const qint64 &value, const qint64 &id); + /** + * @brief getPShoulder return id shoulder point + * @return id + */ inline qint64 getPShoulder() const {return pShoulder;} + /** + * @brief setPShoulder set id shoulder point + * @param value id + * @param id don't show this id in list + */ void setPShoulder(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogShoulderPoint) + /** + * @brief ui keeps information about user interface + */ Ui::DialogShoulderPoint *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief p1Line id first point of line + */ qint64 p1Line; + /** + * @brief p2Line id second point of line + */ qint64 p2Line; + /** + * @brief pShoulder id shoulder point + */ qint64 pShoulder; }; diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index 02c456bd4..ac667adc5 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -36,22 +36,59 @@ namespace Ui class DialogSinglePoint; } +/** + * @brief The DialogSinglePoint class dialog for ToolSinglePoint. Help create point and edit option. + */ class DialogSinglePoint : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSinglePoint create dialog + * @param data container with data + * @param parent parent widget + */ DialogSinglePoint(const VContainer *data, QWidget *parent = 0); + /** + * @brief setData set name and point + * @param name name of point + * @param point data for point + */ void setData(const QString &name, const QPointF &point); + /** + * @brief getName return name + * @return name + */ inline QString getName()const {return name;} + /** + * @brief getPoint return point + * @return point + */ inline QPointF getPoint()const {return point;} ~DialogSinglePoint(); public slots: + /** + * @brief mousePress get mouse position + * @param scenePos position of cursor + */ void mousePress(const QPointF &scenePos); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSinglePoint) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSinglePoint *ui; + /** + * @brief name name of point + */ QString name; + /** + * @brief point data of point + */ QPointF point; }; diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index 6ae6b45fc..1df76c69e 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -36,39 +36,139 @@ namespace Ui class DialogSpline; } +/** + * @brief The DialogSpline class dialog for ToolSpline. Help create spline and edit option. + */ class DialogSpline : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSpline create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogSpline(); + /** + * @brief getP1 return id first point of spline + * @return id + */ inline qint64 getP1() const {return p1;} + /** + * @brief setP1 set id first point of spline + * @param value id + */ void setP1(const qint64 &value); + /** + * @brief getP4 return id fourth point of spline + * @return id + */ inline qint64 getP4() const {return p4;} + /** + * @brief setP4 set id fourth point of spline + * @param value id + */ void setP4(const qint64 &value); + /** + * @brief getAngle1 return first angle of spline + * @return angle in degree + */ inline qreal getAngle1() const {return angle1;} + /** + * @brief setAngle1 set first angle of spline + * @param value angle in degree + */ void setAngle1(const qreal &value); + /** + * @brief getAngle2 return second angle of spline + * @return angle in degree + */ inline qreal getAngle2() const {return angle2;} + /** + * @brief setAngle2 set second angle of spline + * @param value angle in degree + */ void setAngle2(const qreal &value); + /** + * @brief getKAsm1 return first coefficient asymmetry + * @return value. Can be >= 0. + */ inline qreal getKAsm1() const {return kAsm1;} + /** + * @brief setKAsm1 set first coefficient asymmetry + * @param value value. Can be >= 0. + */ void setKAsm1(const qreal &value); + /** + * @brief getKAsm2 return second coefficient asymmetry + * @return value. Can be >= 0. + */ inline qreal getKAsm2() const {return kAsm2;} + /** + * @brief setKAsm2 set second coefficient asymmetry + * @param value value. Can be >= 0. + */ void setKAsm2(const qreal &value); + /** + * @brief getKCurve return coefficient curve + * @return value. Can be >= 0. + */ inline qreal getKCurve() const {return kCurve;} + /** + * @brief setKCurve set coefficient curve + * @param value value. Can be >= 0. + */ void setKCurve(const qreal &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSpline) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSpline *ui; + /** + * @brief number number of handled objects + */ qint32 number; - qint64 p1; // перша точка - qint64 p4; // четверта точка - qreal angle1; // кут нахилу дотичної в першій точці - qreal angle2; // кут нахилу дотичної в другій точці + /** + * @brief p1 id first point of spline + */ + qint64 p1; + /** + * @brief p4 id fourth point of spline + */ + qint64 p4; + /** + * @brief angle1 first angle of spline in degree + */ + qreal angle1; + /** + * @brief angle2 second angle of spline in degree + */ + qreal angle2; + /** + * @brief kAsm1 first coefficient asymmetry + */ qreal kAsm1; + /** + * @brief kAsm2 second coefficient asymmetry + */ qreal kAsm2; + /** + * @brief kCurve coefficient curve + */ qreal kCurve; }; diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index 1ea4d587b..9cf20e16c 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -37,31 +37,108 @@ namespace Ui class DialogSplinePath; } +/** + * @brief The DialogSplinePath class dialog for ToolSplinePath. Help create spline path and edit option. + */ class DialogSplinePath : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSplinePath create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogSplinePath(); + /** + * @brief GetPath return spline path + * @return path + */ inline VSplinePath GetPath() const {return path;} + /** + * @brief SetPath set spline path + * @param value path + */ void SetPath(const VSplinePath &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type don't show this id in list + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief PointChenged selected another point in list + * @param row number of row + */ void PointChenged(int row); + /** + * @brief currentPointChanged changed point in combo box + * @param index index in list + */ void currentPointChanged( int index ); + /** + * @brief Angle1Changed changed first angle + * @param index index in list + */ void Angle1Changed( int index ); + /** + * @brief Angle2Changed changed second angle + * @param index index in list + */ void Angle2Changed( int index ); + /** + * @brief KAsm1Changed changed first coefficient asymmetry + * @param d value + */ void KAsm1Changed(qreal d); + /** + * @brief KAsm2Changed changed second coefficient asymmetry + * @param d value + */ void KAsm2Changed(qreal d); private: Q_DISABLE_COPY(DialogSplinePath) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSplinePath *ui; + /** + * @brief path spline path + */ VSplinePath path; + /** + * @brief NewItem add point to list + * @param id id + * @param kAsm1 first coefficient asymmetry + * @param angle angle in degree + * @param kAsm2 second coefficient asymmetry + */ void NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2); + /** + * @brief dataPoint show data of point in fields + * @param id id + * @param kAsm1 first coefficient asymmetry + * @param angle1 first angle of spline + * @param kAsm2 second coefficient asymmetry + * @param angle2 second angle of spline + */ void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2); + /** + * @brief EnableFields enable or disable fields + */ void EnableFields(); + /** + * @brief SetAngle set angle of point + * @param angle angle in degree + */ void SetAngle(qint32 angle); }; diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index e4b6a3b72..6484785c1 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -443,7 +443,7 @@ void DialogTool::ValChenged(int row) } if (radioButtonStandartTable->isChecked()) { - VStandartTableCell stable = data->GetStandartTableCell(item->text()); + VStandartTableRow stable = data->GetStandartTableCell(item->text()); QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueStandartTableCell(item->text())) .arg(stable.GetDescription()); labelDescription->setText(desc); diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 34b9ce76e..074570314 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -32,80 +32,324 @@ #include #include "../container/vcontainer.h" +/** + * @brief The DialogTool class parent for all dialog of tools. + */ class DialogTool : public QDialog { Q_OBJECT public: + /** + * @brief DialogTool create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); virtual ~DialogTool() {} + /** + * @brief getIdDetail return id detail + * @return id + */ inline qint64 getIdDetail() const {return idDetail;} + /** + * @brief setIdDetail set id detail + * @param value id + */ inline void setIdDetail(const qint64 &value) {idDetail = value;} signals: + /** + * @brief DialogClosed signal dialog closed + * @param result keep result + */ void DialogClosed(int result); + /** + * @brief ToolTip emit tooltipe for tool + * @param toolTip text tooltipe + */ void ToolTip(const QString &toolTip); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief NamePointChanged check name of point + */ void NamePointChanged(); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief DialogRejected emit signal dialog rejected + */ virtual void DialogRejected(); + /** + * @brief formula check formula + */ void FormulaChanged(); + /** + * @brief ArrowUp set angle value 90 degree + */ void ArrowUp(); + /** + * @brief ArrowDown set angle value 270 degree + */ void ArrowDown(); + /** + * @brief ArrowLeft set angle value 180 degree + */ void ArrowLeft(); + /** + * @brief ArrowRight set angle value 0 degree + */ void ArrowRight(); + /** + * @brief ArrowLeftUp set angle value 135 degree + */ void ArrowLeftUp(); + /** + * @brief ArrowLeftDown set angle value 225 degree + */ void ArrowLeftDown(); + /** + * @brief ArrowRightUp set angle value 45 degree + */ void ArrowRightUp(); + /** + * @brief ArrowRightDown set angle value 315 degree + */ void ArrowRightDown(); + /** + * @brief EvalFormula evaluate formula + */ void EvalFormula(); + /** + * @brief SizeGrowth show in list base variables + */ void SizeGrowth(); + /** + * @brief StandartTable show in list standart table variables + */ void StandartTable(); + /** + * @brief LengthLines show in list lengths of lines variables + */ void LengthLines(); + /** + * @brief LengthArcs show in list lengths of arcs variables + */ void LengthArcs(); + /** + * @brief LengthCurves show in list lengths of curves variables + */ void LengthCurves(); + /** + * @brief Increments show in list increment variables + */ void Increments(); + /** + * @brief PutHere put variable into edit + */ void PutHere(); + /** + * @brief PutVal put variable into edit + * @param item chosen item of list widget + */ void PutVal(QListWidgetItem * item); + /** + * @brief ValChenged show description when current variable changed + * @param row number of row + */ virtual void ValChenged(int row); + /** + * @brief UpdateList update lists of variables + */ void UpdateList(); protected: Q_DISABLE_COPY(DialogTool) + /** + * @brief data container with data + */ const VContainer *data; + /** + * @brief isInitialized true if window is initialized + */ bool isInitialized; + /** + * @brief flagName true if name is correct + */ bool flagName; + /** + * @brief flagFormula true if formula correct + */ bool flagFormula; + /** + * @brief timerFormula timer for check formula + */ QTimer *timerFormula; + /** + * @brief bOk button ok + */ QPushButton *bOk; + /** + * @brief spinBoxAngle spinbox for angle + */ QDoubleSpinBox *spinBoxAngle; + /** + * @brief lineEditFormula linEdit for formula + */ QLineEdit *lineEditFormula; + /** + * @brief listWidget listWidget with variables + */ QListWidget *listWidget; + /** + * @brief labelResultCalculation label with result of calculation + */ QLabel *labelResultCalculation; + /** + * @brief labelDescription description of variable + */ QLabel *labelDescription; + /** + * @brief labelEditNamePoint label used when need show wrong name of point + */ QLabel *labelEditNamePoint; + /** + * @brief labelEditFormula label used when need show wrong formula + */ QLabel *labelEditFormula; + /** + * @brief radioButtonSizeGrowth radio button for base variables + */ QRadioButton *radioButtonSizeGrowth; + /** + * @brief radioButtonStandartTable radio button for standart table variables + */ QRadioButton *radioButtonStandartTable; + /** + * @brief radioButtonIncrements radio button for increments variables + */ QRadioButton *radioButtonIncrements; + /** + * @brief radioButtonLengthLine radio button for lengths od lines variables + */ QRadioButton *radioButtonLengthLine; + /** + * @brief radioButtonLengthArc radio button for lengths of arcs variables + */ QRadioButton *radioButtonLengthArc; + /** + * @brief radioButtonLengthCurve radio button for lengths of curves variables + */ QRadioButton *radioButtonLengthCurve; + /** + * @brief idDetail id detail + */ qint64 idDetail; + /** + * @brief mode mode + */ Draw::Draws mode; + /** + * @brief CheckObject check if object belongs to detail + * @param id id of object (point, arc, spline, spline path) + * @return true - belons, false - don't + */ bool CheckObject(const qint64 &id); + /** + * @brief closeEvent handle when dialog cloded + * @param event event + */ virtual void closeEvent ( QCloseEvent * event ); + /** + * @brief showEvent handle when window show + * @param event event + */ virtual void showEvent( QShowEvent *event ); + /** + * @brief FillComboBoxPoints fill comboBox list of points + * @param box comboBox + * @param id don't show this id in list + */ void FillComboBoxPoints(QComboBox *box, const qint64 &id = 0)const; + /** + * @brief FillComboBoxTypeLine fill comboBox list of type lines + * @param box comboBox + */ void FillComboBoxTypeLine(QComboBox *box) const; + /** + * @brief CheckState enable, when all is correct, or disable, when something wrong, button ok + */ virtual void CheckState(); + /** + * @brief getTypeLine return type of line + * @param box combobox + * @return type + */ QString GetTypeLine(const QComboBox *box)const; - template void ShowVariable(const QHash *var); + template + /** + * @brief ShowVariable show variables in list + * @param var container with variables + */ + void ShowVariable(const QHash *var); + /** + * @brief SetupTypeLine setupe type of line + * @param box combobox + * @param value string from pattern file + */ void SetupTypeLine(QComboBox *box, const QString &value); + /** + * @brief ChangeCurrentText select item in combobox by name + * @param box combobox + * @param value name of item + */ void ChangeCurrentText(QComboBox *box, const QString &value); + /** + * @brief ChangeCurrentData select item in combobox by id + * @param box combobox + * @param value id of item + */ void ChangeCurrentData(QComboBox *box, const qint64 &value) const; + /** + * @brief PutValHere put variable into line edit from list + * @param lineEdit lineEdit + * @param listWidget listWidget + */ void PutValHere(QLineEdit *lineEdit, QListWidget *listWidget); + /** + * @brief ValFormulaChanged handle change formula + * @param flag flag state of formula + * @param edit LineEdit + * @param timer timer of formula + */ void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer); + /** + * @brief Eval evaluate formula and show result + * @param edit lineEdit of formula + * @param flag flag state of formula + * @param timer timer of formula + * @param label label for signal error + */ void Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label); + /** + * @brief setCurrentPointId set current point id in combobox + * @param box combobox + * @param pointId save current point id + * @param value point id + * @param id don't show this id in list + */ void setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const; + /** + * @brief getCurrentPointId return current point id in combobox + * @param box combobox + * @return id or -1 if combobox is empty + */ qint64 getCurrentPointId(QComboBox *box) const; }; diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index a3aa2393d..68f9cbbcb 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -36,33 +36,115 @@ namespace Ui class DialogTriangle; } +/** + * @brief The DialogTriangle class dialog for ToolTriangle. Help create point and edit option. + */ class DialogTriangle : public DialogTool { Q_OBJECT public: + /** + * @brief DialogTriangle create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogTriangle(); + /** + * @brief getAxisP1Id return id first point of axis + * @return id + */ inline qint64 getAxisP1Id() const {return axisP1Id;} + /** + * @brief setAxisP1Id set id first point of axis + * @param value id + * @param id don't show this point in list + */ void setAxisP1Id(const qint64 &value, const qint64 &id); + /** + * @brief getAxisP2Id return id second point of axis + * @return id + */ inline qint64 getAxisP2Id() const {return axisP2Id;} + /** + * @brief setAxisP2Id set id second point of axis + * @param value id + * @param id don't show this point in list + */ void setAxisP2Id(const qint64 &value, const qint64 &id); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this point in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this point in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogTriangle) + /** + * @brief ui keeps information about user interface + */ Ui::DialogTriangle *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief axisP1Id id first point of axis + */ qint64 axisP1Id; + /** + * @brief axisP2Id id second point of axis + */ qint64 axisP2Id; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/exception/vexception.h b/exception/vexception.h index 426a2c4fb..1e8e355b6 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -32,18 +32,51 @@ #include +/** + * @brief The VException class + */ class VException : public QException { public: + /** + * @brief VException + * @param what + */ VException(const QString &what); + /** + * @brief VException + * @param e + */ VException(const VException &e):what(e.What()){} virtual ~VException() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief raise + */ inline void raise() const { throw *this; } + /** + * @brief clone + * @return + */ inline VException *clone() const { return new VException(*this); } + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const { return QString(); } + /** + * @brief What + * @return + */ inline QString What() const {return what;} protected: + /** + * @brief what + */ QString what; }; diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index d15c695e9..356ca02f3 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -31,21 +31,56 @@ #include "vexception.h" +/** + * @brief The VExceptionBadId class + */ class VExceptionBadId : public VException { public: + /** + * @brief VExceptionBadId + * @param what + * @param id + */ VExceptionBadId(const QString &what, const qint64 &id) :VException(what), id(id), key(QString()){} + /** + * @brief VExceptionBadId + * @param what + * @param key + */ VExceptionBadId(const QString &what, const QString &key) :VException(what), id(0), key(key){} + /** + * @brief VExceptionBadId + * @param e + */ VExceptionBadId(const VExceptionBadId &e) :VException(e), id(e.BadId()), key(e.BadKey()){} virtual ~VExceptionBadId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief BadId + * @return + */ inline qint64 BadId() const {return id; } + /** + * @brief BadKey + * @return + */ inline QString BadKey() const {return key; } protected: + /** + * @brief id + */ qint64 id; + /** + * @brief key + */ QString key; }; diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index a864fc98e..53678f4c1 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -31,16 +31,39 @@ #include "vexception.h" +/** + * @brief The VExceptionConversionError class + */ class VExceptionConversionError : public VException { public: + /** + * @brief VExceptionConversionError + * @param what + * @param str + */ VExceptionConversionError(const QString &what, const QString &str); + /** + * @brief VExceptionConversionError + * @param e + */ VExceptionConversionError(const VExceptionConversionError &e) :VException(e), str(e.String()){} virtual ~VExceptionConversionError() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief String + * @return + */ inline QString String() const {return str;} protected: + /** + * @brief str + */ QString str; }; diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index e877f3220..bcdb5b296 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -31,24 +31,73 @@ #include "vexception.h" +/** + * @brief The VExceptionEmptyParameter class + */ class VExceptionEmptyParameter : public VException { public: + /** + * @brief VExceptionEmptyParameter + * @param what + * @param name + * @param domElement + */ VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement); + /** + * @brief VExceptionEmptyParameter + * @param e + */ VExceptionEmptyParameter(const VExceptionEmptyParameter &e) :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionEmptyParameter() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief Name + * @return + */ inline QString Name() const {return name;} + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief name + */ QString name; + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index c0b3fbaf7..620f4d189 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -31,25 +31,77 @@ #include "vexception.h" +/** + * @brief The VExceptionObjectError class + */ class VExceptionObjectError : public VException { public: + /** + * @brief VExceptionObjectError + * @param what + * @param domElement + */ VExceptionObjectError(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionObjectError + * @param e + */ VExceptionObjectError(const VExceptionObjectError &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()), moreInfo(e.MoreInformation()){} virtual ~VExceptionObjectError() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} + /** + * @brief AddMoreInformation + * @param info + */ void AddMoreInformation(const QString &info); + /** + * @brief MoreInformation + * @return + */ inline QString MoreInformation() const {return moreInfo;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; + /** + * @brief moreInfo + */ QString moreInfo; }; diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index 2ca8b1be2..397935954 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -31,21 +31,62 @@ #include "vexception.h" +/** + * @brief The VExceptionUniqueId class + */ class VExceptionUniqueId : public VException { public: + /** + * @brief VExceptionUniqueId + * @param what + * @param domElement + */ VExceptionUniqueId(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionUniqueId + * @param e + */ VExceptionUniqueId(const VExceptionUniqueId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionUniqueId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index ab5d2f2ee..726785a56 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -31,21 +31,62 @@ #include "vexception.h" +/** + * @brief The VExceptionWrongParameterId class + */ class VExceptionWrongParameterId : public VException { public: + /** + * @brief VExceptionWrongParameterId + * @param what + * @param domElement + */ VExceptionWrongParameterId(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionWrongParameterId + * @param e + */ VExceptionWrongParameterId(const VExceptionWrongParameterId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionWrongParameterId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/geometry/varc.h b/geometry/varc.h index 5939e7bf4..caab908cf 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -42,33 +42,50 @@ class VArc { Q_DECLARE_TR_FUNCTIONS(VArc) public: - /** - * @brief VArc конструктор по замовчуванню. - */ + /** + * @brief VArc конструктор по замовчуванню. + */ VArc (); - /** - * @brief VArc конструктор. - * @param center точка центру. - * @param radius радіус. - * @param f1 початковий кут в градусах. - * @param f2 кінцевий кут в градусах. - */ + /** + * @brief VArc конструктор. + * @param center точка центру. + * @param radius радіус. + * @param f1 початковий кут в градусах. + * @param f2 кінцевий кут в градусах. + */ VArc (const QHash *points, qint64 center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0); + /** + * @brief VArc + * @param arc + */ VArc(const VArc &arc); + /** + * @brief operator = + * @param arc + * @return + */ VArc& operator= (const VArc &arc); /** * @brief GetF1 повертає початковий кут дуги. * @return повертає кут в градусах. */ inline QString GetFormulaF1 () const {return formulaF1;} + /** + * @brief GetF1 + * @return + */ inline qreal GetF1 () const {return f1;} /** * @brief GetF2 повертає кінцевий кут дуги. * @return повертає кут в градусах. */ inline QString GetFormulaF2 () const {return formulaF2;} + /** + * @brief GetF2 + * @return + */ inline qreal GetF2 () const {return f2;} /** * @brief GetLength повертає довжину дуги. @@ -80,13 +97,25 @@ public: * @return повертає радіус дуги. */ inline QString GetFormulaRadius () const {return formulaRadius;} + /** + * @brief GetRadius + * @return + */ inline qreal GetRadius () const {return radius;} /** * @brief GetCenter повертає точку центра дуги. * @return повертає точку центра дуги. */ inline qint64 GetCenter () const {return center;} + /** + * @brief GetCenterPoint + * @return + */ QPointF GetCenterPoint() const; + /** + * @brief GetCenterVPoint + * @return + */ VPointF GetCenterVPoint() const; /** * @brief GetP1 повертає першу точку з якої починається дуга. @@ -98,45 +127,111 @@ public: * @return точку кінця дуги. */ QPointF GetP2 () const; + /** + * @brief GetDataPoints + * @return + */ const QHash GetDataPoints() const; /** * @brief GetPath будує шлях по даній дузі. * @return повертає шлях. */ QPainterPath GetPath() const; + /** + * @brief AngleArc + * @return + */ qreal AngleArc() const; + /** + * @brief NumberSplOfArc + * @return + */ qint32 NumberSplOfArc () const; + /** + * @brief GetPoints + * @return + */ QVector GetPoints () const; + /** + * @brief SplOfArc + * @param number + * @return + */ QVector SplOfArc( qint32 number ) const; + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} private: /** * @brief f1 початковий кут в градусах */ qreal f1; // початковий кут нахилу дуги (градуси) + /** + * @brief formulaF1 + */ QString formulaF1; /** * @brief f2 кінцевий кут в градусах */ qreal f2; // кінцевий кут нахилу дуги (градуси) + /** + * @brief formulaF2 + */ QString formulaF2; /** * @brief radius радіус дуги. */ qreal radius; + /** + * @brief formulaRadius + */ QString formulaRadius; /** * @brief center центральна точка дуги. */ qint64 center; + /** + * @brief points + */ QHash points; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; }; diff --git a/geometry/vdetail.h b/geometry/vdetail.h index 2b366c547..f80289efa 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -33,48 +33,172 @@ namespace Detail { + /** + * @brief The Contour enum + */ enum Contour { OpenContour, CloseContour }; Q_DECLARE_FLAGS(Contours, Contour) + /** + * @brief The Equidistant enum + */ enum Equidistant { OpenEquidistant, CloseEquidistant }; Q_DECLARE_FLAGS(Equidistants, Equidistant) } Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Contours) Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Equidistants) +/** + * @brief The VDetail class + */ class VDetail { public: + /** + * @brief VDetail + */ VDetail(); + /** + * @brief VDetail + * @param name + * @param nodes + */ VDetail(const QString &name, const QVector &nodes); + /** + * @brief VDetail + * @param detail + */ VDetail(const VDetail &detail); + /** + * @brief operator = + * @param detail + * @return + */ VDetail &operator=(const VDetail &detail); + /** + * @brief append + * @param node + */ inline void append(const VNodeDetail &node) {nodes.append(node);} + /** + * @brief Clear + */ void Clear(); + /** + * @brief CountNode + * @return + */ inline qint32 CountNode() const {return nodes.size();} + /** + * @brief Containes + * @param id + * @return + */ bool Containes(const qint64 &id)const; + /** + * @brief operator [] + * @param indx + * @return + */ VNodeDetail & operator[](ptrdiff_t indx); + /** + * @brief getName + * @return + */ inline QString getName() const {return name;} + /** + * @brief setName + * @param value + */ inline void setName(const QString &value) {name = value;} + /** + * @brief getMx + * @return + */ inline qreal getMx() const {return mx;} + /** + * @brief setMx + * @param value + */ inline void setMx(const qreal &value) {mx = value;} + /** + * @brief getMy + * @return + */ inline qreal getMy() const {return my;} + /** + * @brief setMy + * @param value + */ inline void setMy(const qreal &value) {my = value;} + /** + * @brief getSupplement + * @return + */ inline bool getSupplement() const {return supplement;} + /** + * @brief setSupplement + * @param value + */ inline void setSupplement(bool value) {supplement = value;} + /** + * @brief getClosed + * @return + */ inline bool getClosed() const {return closed;} + /** + * @brief setClosed + * @param value + */ inline void setClosed(bool value) {closed = value;} + /** + * @brief getWidth + * @return + */ inline qreal getWidth() const {return width;} + /** + * @brief setWidth + * @param value + */ inline void setWidth(const qreal &value) {width = value;} + /** + * @brief getNodes + * @return + */ inline QVector getNodes() const {return nodes;} + /** + * @brief setNodes + * @param value + */ inline void setNodes(const QVector &value) {nodes = value;} private: + /** + * @brief nodes + */ QVector nodes; + /** + * @brief name + */ QString name; + /** + * @brief mx + */ qreal mx; + /** + * @brief my + */ qreal my; + /** + * @brief supplement + */ bool supplement; + /** + * @brief closed + */ bool closed; + /** + * @brief width + */ qreal width; }; diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 799a355aa..14e3dbc31 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -34,37 +34,130 @@ namespace NodeDetail { + /** + * @brief The NodeDetail enum + */ enum NodeDetail { Contour, Modeling }; Q_DECLARE_FLAGS(NodeDetails, NodeDetail) } Q_DECLARE_OPERATORS_FOR_FLAGS(NodeDetail::NodeDetails) +/** + * @brief The VNodeDetail class + */ class VNodeDetail { public: + /** + * @brief VNodeDetail + */ VNodeDetail(); + /** + * @brief VNodeDetail + * @param id + * @param typeTool + * @param mode + * @param typeNode + * @param mx + * @param my + */ VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, qreal mx = 0, qreal my = 0); + /** + * @brief VNodeDetail + * @param node + */ VNodeDetail(const VNodeDetail &node); + /** + * @brief operator = + * @param node + * @return + */ VNodeDetail &operator=(const VNodeDetail &node); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief setId + * @param value + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getTypeTool + * @return + */ inline Tool::Tools getTypeTool() const {return typeTool;} + /** + * @brief setTypeTool + * @param value + */ inline void setTypeTool(const Tool::Tools &value) {typeTool = value;} + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getTypeNode + * @return + */ inline NodeDetail::NodeDetails getTypeNode() const {return typeNode;} + /** + * @brief setTypeNode + * @param value + */ inline void setTypeNode(const NodeDetail::NodeDetails &value) {typeNode = value;} + /** + * @brief getMx + * @return + */ inline qreal getMx() const {return mx;} + /** + * @brief setMx + * @param value + */ inline void setMx(const qreal &value) {mx = value;} + /** + * @brief getMy + * @return + */ inline qreal getMy() const {return my;} + /** + * @brief setMy + * @param value + */ inline void setMy(const qreal &value) {my = value;} private: + /** + * @brief id + */ qint64 id; + /** + * @brief typeTool + */ Tool::Tools typeTool; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief typeNode + */ NodeDetail::NodeDetails typeNode; + /** + * @brief mx + */ qreal mx; + /** + * @brief my + */ qreal my; }; diff --git a/geometry/vspline.h b/geometry/vspline.h index 644ff709d..9d0db6340 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -107,6 +107,10 @@ public: * @return перша точка сплайну. */ qint64 GetP1 () const {return p1;} + /** + * @brief GetPointP1 + * @return + */ VPointF GetPointP1() const; /** * @brief GetP2 повертує першу контрольну точку сплайну. @@ -123,6 +127,10 @@ public: * @return остання точка сплайну. */ inline qint64 GetP4 () const {return p4;} + /** + * @brief GetPointP4 + * @return + */ VPointF GetPointP4 () const; /** * @brief GetAngle1 повертає кут першої напрямної. @@ -139,10 +147,30 @@ public: * @return довжина сплайну. */ qreal GetLength () const; + /** + * @brief GetName + * @return + */ QString GetName () const; + /** + * @brief GetKasm1 + * @return + */ inline qreal GetKasm1() const {return kAsm1;} + /** + * @brief GetKasm2 + * @return + */ inline qreal GetKasm2() const {return kAsm2;} + /** + * @brief GetKcurve + * @return + */ inline qreal GetKcurve() const {return kCurve;} + /** + * @brief GetDataPoints + * @return + */ inline const QHash GetDataPoints() const {return points;} /** * @brief CrossingSplLine перевіряє перетин сплайну з лінією. @@ -186,14 +214,54 @@ public: * @param Pmirror точка відносно якої відбувається вертикальне дзеркалення сплайну. */ // void Mirror(const QPointF Pmirror); + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief SplinePoints + * @param p1 + * @param p4 + * @param angle1 + * @param angle2 + * @param kAsm1 + * @param kAsm2 + * @param kCurve + * @return + */ static QVector SplinePoints(const QPointF &p1, const QPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve); + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief operator = + * @param spl + * @return + */ VSpline &operator=(const VSpline &spl); + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} protected: /** @@ -230,12 +298,33 @@ private: * @brief angle2 кут в градусах другої напрямної. */ qreal angle2; // кут нахилу дотичної в другій точці + /** + * @brief kAsm1 + */ qreal kAsm1; + /** + * @brief kAsm2 + */ qreal kAsm2; + /** + * @brief kCurve + */ qreal kCurve; + /** + * @brief points + */ QHash points; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; /** * @brief LengthBezier повертає дожину сплайну за його чотирьма точками. diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 212bda56c..446c0d7e4 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -36,6 +36,9 @@ namespace SplinePoint { + /** + * @brief The Position enum + */ enum Position { FirstPoint, LastPoint }; Q_DECLARE_FLAGS(Positions, Position) } @@ -48,56 +51,165 @@ class VSplinePath { Q_DECLARE_TR_FUNCTIONS(VSplinePath) public: - /** - * @brief VSplinePath конструктор по замовчуванню. - */ + /** + * @brief VSplinePath конструктор по замовчуванню. + */ VSplinePath(); - /** - * @brief VSplinePath конструктор по замовчуванню. - */ + /** + * @brief VSplinePath конструктор по замовчуванню. + */ VSplinePath(const QHash *points, qreal kCurve = 1, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0); + /** + * @brief VSplinePath + * @param splPath + */ VSplinePath(const VSplinePath& splPath); /** * @brief append додає точку сплайну до шляху. * @param point точка. */ void append(const VSplinePoint &point); + /** + * @brief Count + * @return + */ qint32 Count() const; + /** + * @brief CountPoint + * @return + */ inline qint32 CountPoint() const {return path.size();} + /** + * @brief GetSpline + * @param index + * @return + */ VSpline GetSpline(qint32 index) const; + /** + * @brief GetPath + * @return + */ QPainterPath GetPath() const; + /** + * @brief GetPathPoints + * @return + */ QVector GetPathPoints() const; + /** + * @brief GetSplinePath + * @return + */ inline QVector GetSplinePath() const {return path;} + /** + * @brief GetLength + * @return + */ qreal GetLength() const; + /** + * @brief GetDataPoints + * @return + */ inline QHash GetDataPoints() const {return points;} + /** + * @brief UpdatePoint + * @param indexSpline + * @param pos + * @param point + */ void UpdatePoint(qint32 indexSpline, const SplinePoint::Position &pos, const VSplinePoint &point); + /** + * @brief GetSplinePoint + * @param indexSpline + * @param pos + * @return + */ VSplinePoint GetSplinePoint(qint32 indexSpline, SplinePoint::Position pos) const; /** * @brief Clear очищає шлях сплайнів. */ inline void Clear() {path.clear();} + /** + * @brief getKCurve + * @return + */ inline qreal getKCurve() const {return kCurve;} + /** + * @brief setKCurve + * @param value + */ inline void setKCurve(const qreal &value) {kCurve = value;} + /** + * @brief GetPoint + * @return + */ inline const QVector *GetPoint() const {return &path;} + /** + * @brief operator = + * @param path + * @return + */ VSplinePath &operator=(const VSplinePath &path); + /** + * @brief operator [] + * @param indx + * @return + */ VSplinePoint &operator[](ptrdiff_t indx); + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} - + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} protected: /** * @brief path вектор з точок сплайна. */ QVector path; + /** + * @brief kCurve + */ qreal kCurve; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief points + */ QHash points; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; }; diff --git a/geometry/vsplinepoint.h b/geometry/vsplinepoint.h index d6f6ef6d5..9d3bd4667 100644 --- a/geometry/vsplinepoint.h +++ b/geometry/vsplinepoint.h @@ -48,6 +48,10 @@ public: * @param factor коефіцієнт довжини дотичної. */ VSplinePoint(qint64 pSpline, qreal kAsm1, qreal angle, qreal kAsm2); + /** + * @brief VSplinePoint + * @param point + */ VSplinePoint(const VSplinePoint &point); ~VSplinePoint() {} /** @@ -55,12 +59,20 @@ public: * @return точка. */ inline qint64 P() const {return pSpline;} + /** + * @brief SetP + * @param value + */ inline void SetP(const qint64 &value) {pSpline = value;} /** * @brief Angle1 повертає кут дотичної сплайна. * @return кут в градусах. */ inline qreal Angle1() const {return angle+180;} + /** + * @brief SetAngle + * @param value + */ inline void SetAngle(const qreal &value) {angle = value;} /** * @brief Angle2 повертає кут дотичної сплайна. @@ -72,12 +84,20 @@ public: * @return коефіцієнт. */ inline qreal KAsm1() const {return kAsm1;} + /** + * @brief SetKAsm1 + * @param value + */ inline void SetKAsm1(const qreal &value) {kAsm1 = value;} /** * @brief KAsm2 повертає коефіцієнт довжини дотичної. * @return коефіцієнт. */ inline qreal KAsm2() const {return kAsm2;} + /** + * @brief SetKAsm2 + * @param value + */ inline void SetKAsm2(const qreal &value) {kAsm2 = value;} protected: /** diff --git a/mainwindow.h b/mainwindow.h index 2c0f2c47e..bdd4fb190 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -44,65 +44,272 @@ namespace Ui class MainWindow; } +/** + * @brief The MainWindow class + */ class MainWindow : public QMainWindow { Q_OBJECT public: + /** + * @brief MainWindow + * @param parent + */ explicit MainWindow(QWidget *parent = 0); ~MainWindow(); + /** + * @brief OpenPattern + * @param fileName + */ void OpenPattern(const QString &fileName); public slots: + /** + * @brief mouseMove + * @param scenePos + */ void mouseMove(const QPointF &scenePos); + /** + * @brief ActionAroowTool + */ void ActionAroowTool(); + /** + * @brief ActionDraw + * @param checked + */ void ActionDraw(bool checked); + /** + * @brief ActionDetails + * @param checked + */ void ActionDetails(bool checked); + /** + * @brief ActionNewDraw + */ void ActionNewDraw(); + /** + * @brief ActionSaveAs + */ void ActionSaveAs(); + /** + * @brief ActionSave + */ void ActionSave(); + /** + * @brief ActionOpen + */ void ActionOpen(); + /** + * @brief ActionNew + */ void ActionNew(); + /** + * @brief ActionTable + * @param checked + */ void ActionTable(bool checked); + /** + * @brief ActionHistory + * @param checked + */ void ActionHistory(bool checked); + /** + * @brief ActionLayout + * @param checked + */ void ActionLayout(bool checked); + /** + * @brief currentDrawChanged + * @param index + */ void currentDrawChanged( int index ); + /** + * @brief OptionDraw + */ void OptionDraw(); + /** + * @brief haveChange + */ void haveChange(); + /** + * @brief ChangedSize + * @param text + */ void ChangedSize(const QString &text); + /** + * @brief ChangedGrowth + * @param text + */ void ChangedGrowth(const QString & text); + /** + * @brief ClosedActionTable + */ void ClosedActionTable(); + /** + * @brief ClosedActionHistory + */ void ClosedActionHistory(); + /** + * @brief ToolEndLine + * @param checked + */ void ToolEndLine(bool checked); + /** + * @brief ToolLine + * @param checked + */ void ToolLine(bool checked); + /** + * @brief ToolAlongLine + * @param checked + */ void ToolAlongLine(bool checked); + /** + * @brief ToolShoulderPoint + * @param checked + */ void ToolShoulderPoint(bool checked); + /** + * @brief ToolNormal + * @param checked + */ void ToolNormal(bool checked); + /** + * @brief ToolBisector + * @param checked + */ void ToolBisector(bool checked); + /** + * @brief ToolLineIntersect + * @param checked + */ void ToolLineIntersect(bool checked); + /** + * @brief ToolSpline + * @param checked + */ void ToolSpline(bool checked); + /** + * @brief ToolArc + * @param checked + */ void ToolArc(bool checked); + /** + * @brief ToolSplinePath + * @param checked + */ void ToolSplinePath(bool checked); + /** + * @brief ToolPointOfContact + * @param checked + */ void ToolPointOfContact(bool checked); + /** + * @brief ToolDetail + * @param checked + */ void ToolDetail(bool checked); + /** + * @brief ToolHeight + * @param checked + */ void ToolHeight(bool checked); + /** + * @brief ToolTriangle + * @param checked + */ void ToolTriangle(bool checked); + /** + * @brief ToolPointOfIntersection + * @param checked + */ void ToolPointOfIntersection(bool checked); + /** + * @brief ClosedDialogEndLine + * @param result + */ void ClosedDialogEndLine(int result); + /** + * @brief ClosedDialogLine + * @param result + */ void ClosedDialogLine(int result); + /** + * @brief ClosedDialogAlongLine + * @param result + */ void ClosedDialogAlongLine(int result); + /** + * @brief ClosedDialogShoulderPoint + * @param result + */ void ClosedDialogShoulderPoint(int result); + /** + * @brief ClosedDialogNormal + * @param result + */ void ClosedDialogNormal(int result); + /** + * @brief ClosedDialogBisector + * @param result + */ void ClosedDialogBisector(int result); + /** + * @brief ClosedDialogLineIntersect + * @param result + */ void ClosedDialogLineIntersect(int result); + /** + * @brief ClosedDialogSpline + * @param result + */ void ClosedDialogSpline(int result); + /** + * @brief ClosedDialogArc + * @param result + */ void ClosedDialogArc(int result); + /** + * @brief ClosedDialogSplinePath + * @param result + */ void ClosedDialogSplinePath(int result); + /** + * @brief ClosedDialogPointOfContact + * @param result + */ void ClosedDialogPointOfContact(int result); + /** + * @brief ClosedDialogDetail + * @param result + */ void ClosedDialogDetail(int result); + /** + * @brief ClosedDialogHeight + * @param result + */ void ClosedDialogHeight(int result); + /** + * @brief ClosedDialogTriangle + * @param result + */ void ClosedDialogTriangle(int result); + /** + * @brief ClosedDialogPointOfIntersection + * @param result + */ void ClosedDialogPointOfIntersection(int result); + /** + * @brief About + */ void About(); + /** + * @brief AboutQt + */ void AboutQt(); + /** + * @brief ShowToolTip + * @param toolTip + */ void ShowToolTip(const QString &toolTip); /** * @brief tableClosed Слот, що виконується при отриманні сигналу закриття вікна укладання @@ -116,60 +323,226 @@ signals: */ void ModelChosen(QVector listDetails); protected: + /** + * @brief keyPressEvent + * @param event + */ virtual void keyPressEvent ( QKeyEvent * event ); + /** + * @brief showEvent + * @param event + */ virtual void showEvent( QShowEvent *event ); + /** + * @brief closeEvent + * @param event + */ virtual void closeEvent( QCloseEvent * event ); + /** + * @brief Clear + */ void Clear(); private: Q_DISABLE_COPY(MainWindow) + /** + * @brief ui keeps information about user interface + */ Ui::MainWindow *ui; + /** + * @brief tool + */ Tool::Tools tool; + /** + * @brief currentScene + */ VMainGraphicsScene *currentScene; + /** + * @brief sceneDraw + */ VMainGraphicsScene *sceneDraw; + /** + * @brief sceneDetails + */ VMainGraphicsScene *sceneDetails; + /** + * @brief mouseCoordinate + */ QLabel *mouseCoordinate; + /** + * @brief helpLabel + */ QLabel *helpLabel; + /** + * @brief view + */ VMainGraphicsView *view; + /** + * @brief isInitialized + */ bool isInitialized; + /** + * @brief dialogTable + */ DialogIncrements *dialogTable; + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; + /** + * @brief dialogDetail + */ QSharedPointer dialogDetail; + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; + /** + * @brief dialogHistory + */ DialogHistory *dialogHistory; + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief data container with data + */ VContainer *data; + /** + * @brief comboBoxDraws + */ QComboBox *comboBoxDraws; + /** + * @brief fileName + */ QString fileName; + /** + * @brief changeInFile + */ bool changeInFile; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief ToolBarOption + */ void ToolBarOption(); + /** + * @brief ToolBarDraws + */ void ToolBarDraws(); + /** + * @brief CanselTool + */ void CanselTool(); + /** + * @brief ArrowTool + */ void ArrowTool(); + /** + * @brief SetEnableWidgets + * @param enable + */ void SetEnableWidgets(bool enable); + /** + * @brief SetEnableTool + * @param enable + */ void SetEnableTool(bool enable); + /** + * + */ template + /** + * @brief SetToolButton + * @param checked + * @param t + * @param cursor + * @param toolTip + * @param dialog + * @param closeDialogSlot + */ void SetToolButton(bool checked, Tool::Tools t, const QString &cursor, const QString &toolTip, QSharedPointer &dialog, Func closeDialogSlot); + /** + * @brief MinimumScrollBar + */ void MinimumScrollBar(); template + /** + * @brief AddToolToDetail + * @param tool + * @param id + * @param typeTool + * @param idDetail + */ void AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool, const qint64 &idDetail); template + /** + * @brief ClosedDialog + * @param dialog + * @param result + */ void ClosedDialog(QSharedPointer &dialog, int result); + /** + * @brief SafeSaveing + * @param fileName + * @return + */ bool SafeSaveing(const QString &fileName)const; + /** + * @brief AutoSavePattern + */ void AutoSavePattern(); }; diff --git a/options.h b/options.h index beccd32d3..6f86d23d2 100644 --- a/options.h +++ b/options.h @@ -40,6 +40,9 @@ namespace Scene { + /** + * @brief The Scene enum + */ enum Scene { Point, Line, Spline, Arc, SplinePath, Detail }; Q_DECLARE_FLAGS(Scenes, Scene) } @@ -47,6 +50,9 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( Scene::Scenes ) namespace Tool { + /** + * @brief The Tool enum + */ enum Tool { ArrowTool, @@ -73,6 +79,9 @@ namespace Tool }; Q_DECLARE_FLAGS(Tools, Tool) + /** + * @brief The Source enum + */ enum Source { FromGui, FromFile }; Q_DECLARE_FLAGS(Sources, Source) } @@ -81,6 +90,9 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Sources ) namespace Draw { + /** + * @brief The Draw enum + */ enum Draw { Calculation, Modeling }; Q_DECLARE_FLAGS(Draws, Draw) } diff --git a/tablewindow.h b/tablewindow.h index 8d3ca8801..d82380015 100644 --- a/tablewindow.h +++ b/tablewindow.h @@ -54,7 +54,7 @@ public: QLabel* colission; /** * @brief TableWindow Конструктор класу вікна створення розкладки. - * @param parent Батько об'єкту. За замовчуванням = 0. + * @param parent parent widget Батько об'єкту. За замовчуванням = 0. */ explicit TableWindow(QWidget *parent = 0); /** @@ -131,11 +131,15 @@ protected: * @param event Подія що отримується. */ void showEvent ( QShowEvent * event ); + /** + * @brief keyPressEvent + * @param event + */ void keyPressEvent ( QKeyEvent * event ); private: Q_DISABLE_COPY(TableWindow) /** - * @brief ui Змінна для доступу до об'єктів вікна. + * @brief ui keeps information about user interface Змінна для доступу до об'єктів вікна. */ Ui::TableWindow* ui; /** @@ -190,8 +194,20 @@ private: * @brief sceneRect Мінімальний розмір листа паперу що буде показуватися на сцені. */ QRectF sceneRect; + /** + * @brief SvgFile + * @param name + */ void SvgFile(const QString &name)const; + /** + * @brief PngFile + * @param name + */ void PngFile(const QString &name)const; + /** + * @brief PsFile + * @param name + */ void PsFile(const QString &name)const; }; diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index 86632645c..fc0f1bea9 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -31,28 +31,97 @@ #include "../vabstracttool.h" +/** + * @brief The VDrawTool class + */ class VDrawTool : public VAbstractTool { Q_OBJECT public: + /** + * @brief VDrawTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VDrawTool() {} + /** + * @brief setDialog + */ virtual void setDialog() {} + /** + * @brief AddRecord + * @param id + * @param toolType + * @param doc dom document container + */ static void AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc); + /** + * @brief ignoreContextMenu + * @param enable + */ void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} public slots: + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ChangedNameDraw + * @param oldName + * @param newName + */ void ChangedNameDraw(const QString &oldName, const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result)=0; + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief ignoreContextMenuEvent + */ bool ignoreContextMenuEvent; + /** + * @brief ignoreFullUpdate + */ bool ignoreFullUpdate; + /** + * @brief nameActivDraw + */ QString nameActivDraw; + /** + * @brief factor + */ static qreal factor; + /** + * @brief AddToCalculation + * @param domElement + */ void AddToCalculation(const QDomElement &domElement); template + /** + * @brief ContextMenu + * @param dialog + * @param tool + * @param event + * @param showRemove + */ void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, bool showRemove = true) { @@ -118,6 +187,13 @@ protected: } } template + /** + * @brief ShowItem + * @param item + * @param id + * @param color + * @param enable + */ void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable) { Q_ASSERT(item != 0); diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 797383e95..99dd29f6c 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -32,31 +32,102 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogalongline.h" +/** + * @brief The VToolAlongLine class + */ class VToolAlongLine : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolAlongLine + * @param doc dom document container + * @param data + * @param id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param typeCreation + * @param parent + */ VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; }; diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index 17a757f88..57b940c10 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -34,35 +34,124 @@ #include "../../dialogs/dialogarc.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VToolArc class + */ class VToolArc :public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolArc + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param center + * @param radius + * @param f1 + * @param f2 + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index f449a462e..824e102aa 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -32,35 +32,119 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogbisector.h" +/** + * @brief The VToolBisector class + */ class VToolBisector : public VToolLinePoint { public: + /** + * @brief VToolBisector + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeCreation + * @param parent + */ VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief FindPoint + * @param firstPoint + * @param secondPoint + * @param thirdPoint + * @param length + * @return + */ static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint, const qreal& length); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief thirdPointId + */ qint64 thirdPointId; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; }; diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index a9ce3fa14..35c802911 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -32,28 +32,89 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogendline.h" +/** + * @brief The VToolEndLine class + */ class VToolEndLine : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolEndLine + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param typeCreation + * @param parent + */ VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; }; diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 1d070a225..3aa016801 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -32,31 +32,104 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogheight.h" +/** + * @brief The VToolHeight class + */ class VToolHeight: public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolHeight + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param typeCreation + * @param parent + */ VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param line + * @param point + * @return + */ static QPointF FindPoint(const QLineF &line, const QPointF &point); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief p1LineId + */ qint64 p1LineId; + /** + * @brief p2LineId + */ qint64 p2LineId; }; diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index bcc7ac170..80df5efcf 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -33,35 +33,123 @@ #include #include "../../dialogs/dialogline.h" +/** + * @brief The VToolLine class + */ class VToolLine: public VDrawTool, public QGraphicsLineItem { Q_OBJECT public: + /** + * @brief VToolLine + * @param doc dom document container + * @param data + * @param id + * @param firstPoint + * @param secondPoint + * @param typeCreation + * @param parent + */ VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param firstPoint + * @param secondPoint + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPoint + */ qint64 firstPoint; + /** + * @brief secondPoint + */ qint64 secondPoint; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index aeb34b54d..1812d638f 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -32,34 +32,114 @@ #include "vtoolpoint.h" #include "../../dialogs/dialoglineintersect.h" +/** + * @brief The VToolLineIntersect class + */ class VToolLineIntersect:public VToolPoint { Q_OBJECT public: + /** + * @brief VToolLineIntersect + * @param doc dom document container + * @param data + * @param id + * @param p1Line1 + * @param p2Line1 + * @param p1Line2 + * @param p2Line2 + * @param typeCreation + * @param parent + */ VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1Line1Id + * @param p2Line1Id + * @param p1Line2Id + * @param p2Line2Id + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p1Line1 + */ qint64 p1Line1; + /** + * @brief p2Line1 + */ qint64 p2Line1; + /** + * @brief p1Line2 + */ qint64 p1Line2; + /** + * @brief p2Line2 + */ qint64 p2Line2; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; }; diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index dc10aeb17..0cfcfb093 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -31,23 +31,66 @@ #include "vtoolpoint.h" +/** + * @brief The VToolLinePoint class + */ class VToolLinePoint : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolLinePoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param basePointId + * @param angle + * @param parent + */ VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); public slots: + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief typeLine + */ QString typeLine; + /** + * @brief formula + */ QString formula; + /** + * @brief angle + */ qreal angle; + /** + * @brief basePointId + */ qint64 basePointId; + /** + * @brief mainLine + */ QGraphicsLineItem *mainLine; + /** + * @brief RefreshGeometry + */ virtual void RefreshGeometry(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens() {doc->DecrementReferens(basePointId);} private: Q_DISABLE_COPY(VToolLinePoint) diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 0f2b1fd07..830eeff5a 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -32,35 +32,116 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialognormal.h" +/** + * @brief The VToolNormal class + */ class VToolNormal : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolNormal + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param pointName + * @param angle + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param firstPoint + * @param secondPoint + * @param length + * @param angle + * @return + */ static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length, const qreal &angle = 0); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; }; diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index c7e26939e..e902fce32 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -32,28 +32,96 @@ #include "vdrawtool.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VToolPoint class + */ class VToolPoint: public VDrawTool, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VToolPoint + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); virtual ~VToolPoint(){} + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result) = 0; + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VToolPoint) diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index 54025adde..d53113fa2 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -32,36 +32,124 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogpointofcontact.h" +/** + * @brief The VToolPointOfContact class + */ class VToolPointOfContact : public VToolPoint { public: + /** + * @brief VToolPointOfContact + * @param doc dom document container + * @param data + * @param id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief FindPoint + * @param radius + * @param center + * @param firstPoint + * @param secondPoint + * @return + */ static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint, const QPointF &secondPoint); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief radius + */ QString radius; + /** + * @brief center + */ qint64 center; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; }; diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index f311b5cbe..2aa964adc 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -32,32 +32,98 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogpointofintersection.h" +/** + * @brief The VToolPointOfIntersection class + */ class VToolPointOfIntersection : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolPointOfIntersection + * @param doc dom document container + * @param data + * @param id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VToolPointOfIntersection) + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; }; diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index efede5abd..a6f9faf1a 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -32,34 +32,118 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogshoulderpoint.h" +/** + * @brief The VToolShoulderPoint class + */ class VToolShoulderPoint : public VToolLinePoint { public: + /** + * @brief VToolShoulderPoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeCreation + * @param parent + */ VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief FindPoint + * @param p1Line + * @param p2Line + * @param pShoulder + * @param length + * @return + */ static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, const qreal &length); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p2Line + */ qint64 p2Line; + /** + * @brief pShoulder + */ qint64 pShoulder; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; }; diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index d0d482fd4..8079d2ce7 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -32,27 +32,81 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogsinglepoint.h" +/** + * @brief The VToolSinglePoint class + */ class VToolSinglePoint : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolSinglePoint + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); signals: + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); private: + /** + * @brief dialogSinglePoint + */ QSharedPointer dialogSinglePoint; }; diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index d4277af40..cf0aeaf8e 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -35,43 +35,155 @@ #include "../../widgets/vcontrolpointspline.h" #include "../../geometry/vsplinepath.h" +/** + * @brief The VToolSpline class + */ class VToolSpline:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolSpline + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1 + * @param p4 + * @param kAsm1 + * @param kAsm2 + * @param angle1 + * @param angle2 + * @param kCurve + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + */ void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint ); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint ( bool enable ); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui ( int result ); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position, const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw ( const QString &newName ); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index a58ddc2ee..5f20851c4 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -34,45 +34,167 @@ #include "../../dialogs/dialogsplinepath.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VToolSplinePath class + */ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolSplinePath + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param path + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); + /** + * @brief AddPathPoint + * @param domElement + * @param splPoint + */ void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint); + /** + * @brief UpdatePathPoint + * @param node + * @param path + */ void UpdatePathPoint(QDomNode& node, VSplinePath &path); + /** + * @brief CorectControlPoints + * @param spl + * @param splPath + * @param indexSpline + */ void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline); }; diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index dc848c76b..5a9543cde 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -32,36 +32,120 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogtriangle.h" +/** + * @brief The VToolTriangle class + */ class VToolTriangle : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolTriangle + * @param doc dom document container + * @param data + * @param id + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param axisP1 + * @param axisP2 + * @param firstPoint + * @param secondPoint + * @return + */ static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, const QPointF &secondPoint); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VToolTriangle) + /** + * @brief axisP1Id + */ qint64 axisP1Id; + /** + * @brief axisP2Id + */ qint64 axisP2Id; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; }; diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index 7bdba7e28..b5ddd9f8c 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -32,30 +32,97 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogalongline.h" +/** + * @brief The VModelingAlongLine class + */ class VModelingAlongLine : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingAlongLine + * @param doc dom document container + * @param data + * @param id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param typeCreation + * @param parent + */ VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingAlongLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingAlongLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; }; diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 510ba9d07..e32f8f6cf 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -34,31 +34,106 @@ #include "../../dialogs/dialogarc.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VModelingArc class + */ class VModelingArc :public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingArc + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingArc* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param center + * @param radius + * @param f1 + * @param f2 + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index cb5196cd2..21b83161e 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -32,33 +32,105 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogbisector.h" +/** + * @brief The VModelingBisector class + */ class VModelingBisector : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingBisector + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeCreation + * @param parent + */ VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingBisector* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingBisector* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief thirdPointId + */ qint64 thirdPointId; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; }; diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index 2bf52d30a..f22ab5bf5 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -32,28 +32,89 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogendline.h" +/** + * @brief The VModelingEndLine class + */ class VModelingEndLine : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingEndLine + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param typeCreation + * @param parent + */ VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingEndLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; }; diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 791779e46..d89f5a4d9 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -32,30 +32,97 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogheight.h" +/** + * @brief The VModelingHeight class + */ class VModelingHeight : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingHeight + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param typeCreation + * @param parent + */ VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingHeight* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingHeight* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief p1LineId + */ qint64 p1LineId; + /** + * @brief p2LineId + */ qint64 p2LineId; }; diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 2798eadb7..bf9729389 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -33,32 +33,106 @@ #include #include "../../dialogs/dialogline.h" +/** + * @brief The VModelingLine class + */ class VModelingLine: public VModelingTool, public QGraphicsLineItem { Q_OBJECT public: + /** + * @brief VModelingLine + * @param doc dom document container + * @param data + * @param id + * @param firstPoint + * @param secondPoint + * @param typeCreation + * @param parent + */ VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param firstPoint + * @param secondPoint + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingLine* Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPoint + */ qint64 firstPoint; + /** + * @brief secondPoint + */ qint64 secondPoint; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; }; diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index b8ca4d2eb..b0dfd515f 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -32,35 +32,111 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialoglineintersect.h" +/** + * @brief The VModelingLineIntersect class + */ class VModelingLineIntersect:public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingLineIntersect + * @param doc dom document container + * @param data + * @param id + * @param p1Line1 + * @param p2Line1 + * @param p1Line2 + * @param p2Line2 + * @param typeCreation + * @param parent + */ VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingLineIntersect* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1Line1Id + * @param p2Line1Id + * @param p1Line2Id + * @param p2Line2Id + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingLineIntersect* Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p1Line1 + */ qint64 p1Line1; + /** + * @brief p2Line1 + */ qint64 p2Line1; + /** + * @brief p1Line2 + */ qint64 p1Line2; + /** + * @brief p2Line2 + */ qint64 p2Line2; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; }; diff --git a/tools/modelingTools/vmodelinglinepoint.h b/tools/modelingTools/vmodelinglinepoint.h index 4ca0e9ced..1ef7ee104 100644 --- a/tools/modelingTools/vmodelinglinepoint.h +++ b/tools/modelingTools/vmodelinglinepoint.h @@ -31,20 +31,55 @@ #include "vmodelingpoint.h" +/** + * @brief The VModelingLinePoint class + */ class VModelingLinePoint : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingLinePoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param basePointId + * @param angle + * @param parent + */ VModelingLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); protected: + /** + * @brief typeLine + */ QString typeLine; + /** + * @brief formula + */ QString formula; + /** + * @brief angle + */ qreal angle; + /** + * @brief basePointId + */ qint64 basePointId; + /** + * @brief mainLine + */ QGraphicsLineItem *mainLine; + /** + * @brief RefreshGeometry + */ virtual void RefreshGeometry(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens() {doc->DecrementReferens(basePointId);} private: Q_DISABLE_COPY(VModelingLinePoint) diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index 3d9062a0e..362b4897d 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -32,31 +32,100 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialognormal.h" +/** + * @brief The VModelingNormal class + */ class VModelingNormal : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingNormal + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingNormal* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param pointName + * @param angle + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingNormal* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; }; diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index e03799136..4a1e88432 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -32,25 +32,79 @@ #include "vmodelingtool.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VModelingPoint class + */ class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VModelingPoint + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); virtual ~VModelingPoint() {} + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result) = 0; protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VModelingPoint) diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index d9be2cda2..df58ee4f2 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -32,36 +32,112 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialogpointofcontact.h" +/** + * @brief The VModelingPointOfContact class + */ class VModelingPointOfContact : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingPointOfContact + * @param doc dom document container + * @param data + * @param id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingPointOfContact* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingPointOfContact* Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief radius + */ QString radius; + /** + * @brief center + */ qint64 center; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; }; diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 4a859ea84..30a5b0d8f 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -32,33 +32,99 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialogpointofintersection.h" +/** + * @brief The VModelingPointOfIntersection class + */ class VModelingPointOfIntersection : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingPointOfIntersection + * @param doc dom document container + * @param data + * @param id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingPointOfIntersection* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingPointOfIntersection* Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VModelingPointOfIntersection) + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; }; diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index 7b9d27027..5fe6f796e 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -32,33 +32,105 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogshoulderpoint.h" +/** + * @brief The VModelingShoulderPoint class + */ class VModelingShoulderPoint : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingShoulderPoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeCreation + * @param parent + */ VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingShoulderPoint* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingShoulderPoint* Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p2Line + */ qint64 p2Line; + /** + * @brief pShoulder + */ qint64 pShoulder; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; }; diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 7173fc501..b55dbb005 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -35,39 +35,137 @@ #include "../../widgets/vcontrolpointspline.h" #include "../../geometry/vsplinepath.h" +/** + * @brief The VModelingSpline class + */ class VModelingSpline:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingSpline + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingSpline* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1 + * @param p4 + * @param kAsm1 + * @param kAsm2 + * @param angle1 + * @param angle2 + * @param kCurve + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + */ void RefreshLine (const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint ); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint ( bool enable ); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui ( int result ); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition (const qint32 &indexSpline, SplinePoint::Position position, const QPointF &pos); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 09d77d2ff..3a7ebc519 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -34,41 +34,149 @@ #include "../../dialogs/dialogsplinepath.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VModelingSplinePath class + */ class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingSplinePath + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingSplinePath* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param path + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &pos); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); + /** + * @brief AddPathPoint + * @param domElement + * @param splPoint + */ void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint); + /** + * @brief UpdatePathPoint + * @param node + * @param path + */ void UpdatePathPoint(QDomNode& node, VSplinePath &path); + /** + * @brief CorectControlPoints + * @param spl + * @param splPath + * @param indexSpline + */ void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline); }; diff --git a/tools/modelingTools/vmodelingtool.h b/tools/modelingTools/vmodelingtool.h index 53c57236c..2387104c0 100644 --- a/tools/modelingTools/vmodelingtool.h +++ b/tools/modelingTools/vmodelingtool.h @@ -32,22 +32,63 @@ #include "../vabstracttool.h" #include +/** + * @brief The VModelingTool class + */ class VModelingTool: public VAbstractTool { Q_OBJECT public: + /** + * @brief VModelingTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VModelingTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VModelingTool(){} + /** + * @brief setDialog + */ virtual void setDialog(){} + /** + * @brief ignoreContextMenu + * @param enable + */ inline void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} public slots: + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result)=0; protected: + /** + * @brief ignoreContextMenuEvent + */ bool ignoreContextMenuEvent; + /** + * @brief ignoreFullUpdate + */ bool ignoreFullUpdate; + /** + * @brief AddToModeling + * @param domElement + */ void AddToModeling(const QDomElement &domElement); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); template + /** + * @brief ContextMenu + * @param dialog + * @param tool + * @param event + * @param showRemove + */ void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, bool showRemove = true) { diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index 09dfdfb21..62ad4e844 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -33,33 +33,109 @@ #include "../drawTools/vtooltriangle.h" #include "../../dialogs/dialogtriangle.h" +/** + * @brief The VModelingTriangle class + */ class VModelingTriangle : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingTriangle + * @param doc dom document container + * @param data + * @param id + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingTriangle* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingTriangle* Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VModelingTriangle) + /** + * @brief axisP1Id + */ qint64 axisP1Id; + /** + * @brief axisP2Id + */ qint64 axisP2Id; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; }; diff --git a/tools/nodeDetails/vabstractnode.h b/tools/nodeDetails/vabstractnode.h index 7fff53e9e..b2190c760 100644 --- a/tools/nodeDetails/vabstractnode.h +++ b/tools/nodeDetails/vabstractnode.h @@ -31,21 +31,58 @@ #include "../vabstracttool.h" +/** + * @brief The VAbstractNode class + */ class VAbstractNode : public VAbstractTool { Q_OBJECT public: + /** + * @brief VAbstractNode + * @param doc dom document container + * @param data + * @param id + * @param idNode + * @param typeobject + * @param parent + */ VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode, Draw::Draws typeobject, QObject *parent = 0 ); virtual ~VAbstractNode() {} + /** + * @brief AttrIdObject + */ static const QString AttrIdObject; + /** + * @brief AttrTypeObject + */ static const QString AttrTypeObject; + /** + * @brief TypeObjectCalculation + */ static const QString TypeObjectCalculation; + /** + * @brief TypeObjectModeling + */ static const QString TypeObjectModeling; protected: + /** + * @brief idNode + */ qint64 idNode; + /** + * @brief typeobject + */ Draw::Draws typeobject; + /** + * @brief AddToModeling + * @param domElement + */ void AddToModeling(const QDomElement &domElement); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); }; diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index f71096694..b99abd458 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -32,24 +32,74 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeArc class + */ class VNodeArc :public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeArc + * @param doc dom document container + * @param data + * @param id + * @param idArc + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idArc + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); protected: + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index 7874715c6..fcc63b362 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -32,29 +32,101 @@ #include "vabstractnode.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VNodePoint class + */ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VNodePoint + * @param doc dom document container + * @param data + * @param id + * @param idPoint + * @param typeobject + * @param typeCreation + * @param parent + */ VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idPoint + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VNodePoint) diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index fc8dcb202..016992a35 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -32,25 +32,76 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeSpline class + */ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeSpline + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param parse + * @param typeCreation + * @return + */ static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); protected: + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index f5b0c9cba..831e9860d 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -32,24 +32,74 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeSplinePath class + */ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeSplinePath + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); protected: + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index f3a2ea372..038b3e2d4 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -32,72 +32,280 @@ #include "vdatatool.h" #include "../xml/vdomdocument.h" +/** + * @brief The VAbstractTool class + */ class VAbstractTool: public VDataTool { Q_OBJECT public: + /** + * @brief VAbstractTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VAbstractTool() {} + /** + * @brief LineIntersectRect + * @param rec + * @param line + * @return + */ static QPointF LineIntersectRect(QRectF rec, QLineF line); + /** + * @brief LineIntersectCircle + * @param center + * @param radius + * @param line + * @param p1 + * @param p2 + * @return + */ static qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2); + /** + * @brief ClosestPoint + * @param line + * @param p + * @return + */ static QPointF ClosestPoint(const QLineF &line, const QPointF &p); + /** + * @brief addVector + * @param p + * @param p1 + * @param p2 + * @param k + * @return + */ static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief LineCoefficients + * @param line + * @param a + * @param b + * @param c + */ static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c); + /** + * @brief AttrId + */ static const QString AttrId; + /** + * @brief AttrType + */ static const QString AttrType; + /** + * @brief AttrMx + */ static const QString AttrMx; + /** + * @brief AttrMy + */ static const QString AttrMy; + /** + * @brief AttrName + */ static const QString AttrName; + /** + * @brief AttrX + */ static const QString AttrX; + /** + * @brief AttrY + */ static const QString AttrY; + /** + * @brief AttrTypeLine + */ static const QString AttrTypeLine; + /** + * @brief AttrLength + */ static const QString AttrLength; + /** + * @brief AttrBasePoint + */ static const QString AttrBasePoint; + /** + * @brief AttrFirstPoint + */ static const QString AttrFirstPoint; + /** + * @brief AttrSecondPoint + */ static const QString AttrSecondPoint; + /** + * @brief AttrThirdPoint + */ static const QString AttrThirdPoint; + /** + * @brief AttrCenter + */ static const QString AttrCenter; + /** + * @brief AttrRadius + */ static const QString AttrRadius; + /** + * @brief AttrAngle + */ static const QString AttrAngle; + /** + * @brief AttrAngle1 + */ static const QString AttrAngle1; + /** + * @brief AttrAngle2 + */ static const QString AttrAngle2; + /** + * @brief AttrP1Line + */ static const QString AttrP1Line; + /** + * @brief AttrP2Line + */ static const QString AttrP2Line; + /** + * @brief AttrP1Line1 + */ static const QString AttrP1Line1; + /** + * @brief AttrP2Line1 + */ static const QString AttrP2Line1; + /** + * @brief AttrP1Line2 + */ static const QString AttrP1Line2; + /** + * @brief AttrP2Line2 + */ static const QString AttrP2Line2; + /** + * @brief AttrPShoulder + */ static const QString AttrPShoulder; + /** + * @brief AttrPoint1 + */ static const QString AttrPoint1; + /** + * @brief AttrPoint4 + */ static const QString AttrPoint4; + /** + * @brief AttrKAsm1 + */ static const QString AttrKAsm1; + /** + * @brief AttrKAsm2 + */ static const QString AttrKAsm2; + /** + * @brief AttrKCurve + */ static const QString AttrKCurve; + /** + * @brief AttrPathPoint + */ static const QString AttrPathPoint; + /** + * @brief AttrPSpline + */ static const QString AttrPSpline; + /** + * @brief AttrAxisP1 + */ static const QString AttrAxisP1; + /** + * @brief AttrAxisP2 + */ static const QString AttrAxisP2; + /** + * @brief TypeLineNone + */ static const QString TypeLineNone; + /** + * @brief TypeLineLine + */ static const QString TypeLineLine; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile()=0; signals: + /** + * @brief toolhaveChange + */ void toolhaveChange(); + /** + * @brief ChoosedTool + * @param id + * @param type + */ void ChoosedTool(qint64 id, Scene::Scenes type); + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); + /** + * @brief RemoveTool + * @param tool + */ void RemoveTool(QGraphicsItem *tool); protected: + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief id + */ const qint64 id; + /** + * @brief baseColor + */ const Qt::GlobalColor baseColor; + /** + * @brief currentColor + */ Qt::GlobalColor currentColor; + /** + * @brief AddToFile + */ virtual void AddToFile()=0; + /** + * @brief getData + * @return + */ inline const VContainer *getData() const {return &data;} + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(){} + /** + * @brief RemoveAllChild + * @param domElement + */ void RemoveAllChild(QDomElement &domElement); template + /** + * @brief AddAttribute + * @param domElement + * @param name + * @param value + */ void AddAttribute(QDomElement &domElement, const QString &name, const T &value) { QDomAttr domAttr = doc->createAttribute(name); diff --git a/tools/vdatatool.h b/tools/vdatatool.h index 86d0b2927..a7b0cfcf5 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -32,20 +32,57 @@ #include "../container/vcontainer.h" //We need QObject class because we use qobject_cast. +/** + * @brief The VDataTool class + */ class VDataTool : public QObject { Q_OBJECT public: + /** + * @brief VDataTool + * @param data + * @param parent + */ VDataTool(VContainer *data, QObject *parent = 0): QObject(parent), data(*data), _referens(1){} virtual ~VDataTool(){} + /** + * @brief operator = + * @param tool + * @return + */ VDataTool &operator= (const VDataTool &tool); + /** + * @brief getData + * @return + */ inline VContainer getData() const { return data; } + /** + * @brief setData + * @param value + */ inline void setData(const VContainer *value) {data = *value;} + /** + * @brief referens + * @return + */ virtual inline qint64 referens() const {return _referens;} + /** + * @brief incrementReferens + */ virtual inline void incrementReferens(){++_referens;} + /** + * @brief decrementReferens + */ virtual void decrementReferens(); protected: + /** + * @brief data container with data + */ VContainer data; + /** + * @brief _referens + */ qint64 _referens; }; diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index b0079d5b8..571d13c05 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -33,20 +33,58 @@ #include #include "../dialogs/dialogdetail.h" +/** + * @brief The VToolDetail class + */ class VToolDetail: public VAbstractTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolDetail + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param scene + * @param parent + */ VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation, VMainGraphicsScene *scene, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param newDetail + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); template + /** + * @brief AddTool + * @param tool + * @param id + * @param typeTool + */ void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool) { tool->setParentItem(this); @@ -61,33 +99,110 @@ public: AddNode(domElement, node); } } + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief TagNode + */ static const QString TagNode; + /** + * @brief AttrSupplement + */ static const QString AttrSupplement; + /** + * @brief AttrClosed + */ static const QString AttrClosed; + /** + * @brief AttrWidth + */ static const QString AttrWidth; + /** + * @brief AttrIdObject + */ static const QString AttrIdObject; + /** + * @brief AttrNodeType + */ static const QString AttrNodeType; + /** + * @brief NodeTypeContour + */ static const QString NodeTypeContour; + /** + * @brief NodeTypeModeling + */ static const QString NodeTypeModeling; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); signals: + /** + * @brief RemoveTool + * @param tool + */ void RemoveTool(QGraphicsItem *tool); protected: + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: Q_DISABLE_COPY(VToolDetail) + /** + * @brief dialogDetail + */ QSharedPointer dialogDetail; + /** + * @brief sceneDetails + */ VMainGraphicsScene *sceneDetails; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); + /** + * @brief AddNode + * @param domElement + * @param node + */ void AddNode(QDomElement &domElement, VNodeDetail &node); template + /** + * @brief InitTool + * @param scene + * @param node + */ void InitTool(VMainGraphicsScene *scene, const VNodeDetail &node); }; diff --git a/widgets/doubledelegate.h b/widgets/doubledelegate.h index c4bc8ac49..c69a53e29 100644 --- a/widgets/doubledelegate.h +++ b/widgets/doubledelegate.h @@ -31,14 +31,45 @@ #include +/** + * @brief The DoubleSpinBoxDelegate class + */ class DoubleSpinBoxDelegate : public QItemDelegate { Q_OBJECT public: + /** + * @brief DoubleSpinBoxDelegate + * @param parent + */ DoubleSpinBoxDelegate(QObject *parent = 0): QItemDelegate(parent){} + /** + * @brief createEditor + * @param parent + * @param option + * @param index + * @return + */ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; + /** + * @brief setEditorData + * @param editor + * @param index + */ void setEditorData(QWidget *editor, const QModelIndex &index) const; + /** + * @brief setModelData + * @param editor + * @param model + * @param index + */ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; + /** + * @brief updateEditorGeometry + * @param editor + * @param option + * @param index + */ void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; }; diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 359dd1806..03a099690 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -31,12 +31,26 @@ #include +/** + * @brief The VApplication class + */ class VApplication : public QApplication { Q_OBJECT public: + /** + * @brief VApplication + * @param argc + * @param argv + */ VApplication(int &argc, char ** argv): QApplication(argc, argv){} virtual ~VApplication() {} + /** + * @brief notify + * @param receiver + * @param event + * @return + */ virtual bool notify(QObject * receiver, QEvent * event); }; diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index fddc4ccec..6b34f77a9 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -33,33 +33,110 @@ #include #include "../geometry/vsplinepath.h" +/** + * @brief The VControlPointSpline class + */ class VControlPointSpline : public QObject, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VControlPointSpline + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + * @param parent + */ VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, QGraphicsItem * parent = 0); signals: + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF pos); public slots: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief controlLine + */ QGraphicsLineItem *controlLine; + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); private: Q_DISABLE_COPY(VControlPointSpline) + /** + * @brief indexSpline + */ qint32 indexSpline; + /** + * @brief position + */ SplinePoint::Position position; + /** + * @brief LineIntersectCircle + * @param center + * @param radius + * @param line + * @param p1 + * @param p2 + * @return + */ qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) const; + /** + * @brief ClosestPoint + * @param line + * @param p + * @return + */ QPointF ClosestPoint(const QLineF &line, const QPointF &p) const; + /** + * @brief addVector + * @param p + * @param p1 + * @param p2 + * @param k + * @return + */ QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const; }; diff --git a/widgets/vgraphicssimpletextitem.h b/widgets/vgraphicssimpletextitem.h index 3f3b2a2a8..753a68497 100644 --- a/widgets/vgraphicssimpletextitem.h +++ b/widgets/vgraphicssimpletextitem.h @@ -31,20 +31,57 @@ #include +/** + * @brief The VGraphicsSimpleTextItem class + */ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem { Q_OBJECT public: + /** + * @brief VGraphicsSimpleTextItem + * @param parent + */ VGraphicsSimpleTextItem(QGraphicsItem * parent = 0); + /** + * @brief VGraphicsSimpleTextItem + * @param text + * @param parent + */ VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = 0 ); + /** + * @brief FontSize + * @return + */ qint32 FontSize()const {return fontSize;} signals: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF pos); protected: + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief fontSize + */ qint32 fontSize; }; diff --git a/widgets/vitem.h b/widgets/vitem.h index 750b41305..6d1f01254 100644 --- a/widgets/vitem.h +++ b/widgets/vitem.h @@ -65,7 +65,15 @@ public: * @param angle кут в градусах на який повертається деталь. */ void Rotate ( qreal angle ); + /** + * @brief getPaper + * @return + */ QGraphicsRectItem *getPaper() const {return paper;} + /** + * @brief setPaper + * @param value + */ void setPaper(QGraphicsRectItem *value) {paper = value;} public slots: /** @@ -98,6 +106,9 @@ private: *номер. */ qint32 numInOutList; + /** + * @brief paper + */ QGraphicsRectItem* paper; signals: /** diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index 8d605d64d..ef8b99769 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -31,31 +31,105 @@ #include +/** + * @brief The VMainGraphicsScene class + */ class VMainGraphicsScene : public QGraphicsScene { Q_OBJECT public: + /** + * @brief VMainGraphicsScene + */ VMainGraphicsScene(); + /** + * @brief VMainGraphicsScene + * @param sceneRect + * @param parent + */ VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = 0); + /** + * @brief getHorScrollBar + * @return + */ inline qint32 getHorScrollBar() const {return horScrollBar;} + /** + * @brief setHorScrollBar + * @param value + */ inline void setHorScrollBar(const qint32 &value) {horScrollBar = value;} + /** + * @brief getVerScrollBar + * @return + */ inline qint32 getVerScrollBar() const {return verScrollBar;} + /** + * @brief setVerScrollBar + * @param value + */ inline void setVerScrollBar(const qint32 &value) {verScrollBar = value;} public slots: + /** + * @brief ChoosedItem + * @param id + * @param type + */ void ChoosedItem(qint64 id, const Scene::Scenes &type); + /** + * @brief RemoveTool + * @param tool + */ inline void RemoveTool(QGraphicsItem *tool) {this->removeItem(tool);} + /** + * @brief SetFactor + * @param factor + */ void SetFactor(qreal factor); protected: + /** + * @brief mouseMoveEvent + * @param event + */ void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + /** + * @brief mousePressEvent + * @param event + */ void mousePressEvent(QGraphicsSceneMouseEvent *event); signals: + /** + * @brief mouseMove + * @param scenePos + */ void mouseMove(QPointF scenePos); + /** + * @brief mousePress + * @param scenePos + */ void mousePress(QPointF scenePos); + /** + * @brief ChoosedObject + * @param id + * @param type + */ void ChoosedObject(qint64 id, Scene::Scenes type); + /** + * @brief NewFactor + * @param factor + */ void NewFactor(qreal factor); private: + /** + * @brief horScrollBar + */ qint32 horScrollBar; + /** + * @brief verScrollBar + */ qint32 verScrollBar; + /** + * @brief scaleFactor + */ qreal scaleFactor; }; diff --git a/widgets/vmaingraphicsview.h b/widgets/vmaingraphicsview.h index c4bb43956..a42d53967 100644 --- a/widgets/vmaingraphicsview.h +++ b/widgets/vmaingraphicsview.h @@ -31,15 +31,33 @@ #include +/** + * @brief The VMainGraphicsView class + */ class VMainGraphicsView : public QGraphicsView { Q_OBJECT public: + /** + * @brief VMainGraphicsView + * @param parent + */ explicit VMainGraphicsView(QWidget *parent = 0); signals: + /** + * @brief NewFactor + * @param factor + */ void NewFactor(qreal factor); public slots: + /** + * @brief scalingTime + * @param x + */ void scalingTime(qreal x); + /** + * @brief animFinished + */ void animFinished(); protected: /** @@ -47,9 +65,20 @@ protected: * @param event передається подія. */ void wheelEvent ( QWheelEvent * event ); + /** + * @brief mousePressEvent + * @param mousePress + */ void mousePressEvent(QMouseEvent *mousePress); + /** + * @brief mouseReleaseEvent + * @param event + */ void mouseReleaseEvent(QMouseEvent *event); private: + /** + * @brief _numScheduledScalings + */ qint32 _numScheduledScalings; }; diff --git a/widgets/vtablegraphicsview.h b/widgets/vtablegraphicsview.h index da6f9a5fa..fc93206b9 100644 --- a/widgets/vtablegraphicsview.h +++ b/widgets/vtablegraphicsview.h @@ -31,10 +31,16 @@ #include +/** + * @brief The VTableGraphicsView class + */ class VTableGraphicsView : public QGraphicsView { Q_OBJECT public: + /** + * @brief The typeMove_e enum + */ enum typeMove_e { Left, Right, Up, Down }; VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = 0); signals: diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 1042beb9a..b13cf58c0 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -37,6 +37,9 @@ namespace Document { + /** + * @brief The Document enum + */ enum Document { LiteParse, FullParse}; Q_DECLARE_FLAGS(Documents, Document) } @@ -46,83 +49,372 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Weffc++" #endif + +/** + * @brief The VDomDocument class + */ class VDomDocument : public QObject, public QDomDocument { Q_OBJECT public: + /** + * @brief VDomDocument + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); + /** + * @brief VDomDocument + * @param name + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); + /** + * @brief VDomDocument + * @param doc dom document containertype + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); ~VDomDocument(){} + /** + * @brief elementById + * @param id + * @return + */ QDomElement elementById(const QString& id); + /** + * @brief CreateEmptyFile + */ void CreateEmptyFile(); + /** + * @brief ChangeActivDraw + * @param name + * @param parse + */ void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse); + /** + * @brief GetNameActivDraw + * @return + */ inline QString GetNameActivDraw() const {return nameActivDraw;} + /** + * @brief GetActivDrawElement + * @param element + * @return + */ bool GetActivDrawElement(QDomElement &element); + /** + * @brief GetActivCalculationElement + * @param element + * @return + */ bool GetActivCalculationElement(QDomElement &element); + /** + * @brief GetActivModelingElement + * @param element + * @return + */ bool GetActivModelingElement(QDomElement &element); + /** + * @brief GetActivDetailsElement + * @param element + * @return + */ bool GetActivDetailsElement(QDomElement &element); + /** + * @brief appendDraw + * @param name + * @return + */ bool appendDraw(const QString& name); + /** + * @brief SetNameDraw + * @param name + * @return + */ bool SetNameDraw(const QString& name); + /** + * @brief Parse + * @param parse + * @param sceneDraw + * @param sceneDetail + */ void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail); + /** + * @brief getTools + * @return + */ inline QHash* getTools() {return &tools;} + /** + * @brief getHistory + * @return + */ inline QVector *getHistory() {return &history;} + /** + * @brief getCursor + * @return + */ inline qint64 getCursor() const {return cursor;} + /** + * @brief setCursor + * @param value + */ void setCursor(const qint64 &value); + /** + * @brief setCurrentData + */ void setCurrentData(); + /** + * @brief AddTool + * @param id + * @param tool + */ void AddTool(const qint64 &id, VDataTool *tool); + /** + * @brief UpdateToolData + * @param id + * @param data + */ void UpdateToolData(const qint64 &id, VContainer *data); + /** + * @brief IncrementReferens + * @param id + */ void IncrementReferens(qint64 id) const; + /** + * @brief DecrementReferens + * @param id + */ void DecrementReferens(qint64 id) const; + /** + * @brief TestUniqueId + */ void TestUniqueId() const; signals: + /** + * @brief ChangedActivDraw + * @param newName + */ void ChangedActivDraw(const QString &newName); + /** + * @brief ChangedNameDraw + * @param oldName + * @param newName + */ void ChangedNameDraw(const QString oldName, const QString newName); + /** + * @brief FullUpdateFromFile + */ void FullUpdateFromFile(); + /** + * @brief haveChange + */ void haveChange(); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief ChangedCursor + * @param id + */ void ChangedCursor(qint64 id); public slots: + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); + /** + * @brief haveLiteChange + */ void haveLiteChange(); + /** + * @brief ShowHistoryTool + * @param id + * @param color + * @param enable + */ void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable); private: Q_DISABLE_COPY(VDomDocument) + /** + * @brief map + */ QHash map; + /** + * @brief nameActivDraw + */ QString nameActivDraw; + /** + * @brief data container with data + */ VContainer *data; + /** + * @brief tools + */ QHash tools; + /** + * @brief history + */ QVector history; + /** + * @brief cursor + */ qint64 cursor; + /** + * @brief comboBoxDraws + */ QComboBox *comboBoxDraws; + /** + * @brief mode + */ Draw::Draws *mode; + /** + * @brief find + * @param node + * @param id + * @return + */ bool find(const QDomElement &node, const QString& id); + /** + * @brief CheckNameDraw + * @param name + * @return + */ bool CheckNameDraw(const QString& name) const; + /** + * @brief SetActivDraw + * @param name + */ void SetActivDraw(const QString& name); + /** + * @brief GetActivNodeElement + * @param name + * @param element + * @return + */ bool GetActivNodeElement(const QString& name, QDomElement& element); + /** + * @brief ParseDrawElement + * @param sceneDraw + * @param sceneDetail + * @param node + * @param parse + */ void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, const QDomNode& node, const Document::Documents &parse); + /** + * @brief ParseDrawMode + * @param sceneDraw + * @param sceneDetail + * @param node + * @param parse + * @param mode + */ void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode); + /** + * @brief ParseDetailElement + * @param sceneDetail + * @param domElement + * @param parse + */ void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); + /** + * @brief ParseDetails + * @param sceneDetail + * @param domElement + * @param parse + */ void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); + /** + * @brief ParsePointElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString &type, const Draw::Draws &mode); + /** + * @brief ParseLineElement + * @param scene + * @param domElement + * @param parse + * @param mode + */ void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const Draw::Draws &mode); + /** + * @brief ParseSplineElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString& type, const Draw::Draws &mode); + /** + * @brief ParseArcElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString& type, const Draw::Draws &mode); + /** + * @brief ParseIncrementsElement + * @param node + */ void ParseIncrementsElement(const QDomNode& node); + /** + * @brief GetParametrId + * @param domElement + * @return + */ qint64 GetParametrId(const QDomElement& domElement) const; + /** + * @brief GetParametrLongLong + * @param domElement + * @param name + * @return + */ qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name) const; + /** + * @brief GetParametrString + * @param domElement + * @param name + * @return + */ QString GetParametrString(const QDomElement& domElement, const QString &name) const; + /** + * @brief GetParametrDouble + * @param domElement + * @param name + * @return + */ qreal GetParametrDouble(const QDomElement& domElement, const QString &name) const; + /** + * @brief CollectId + * @param node + * @param vector + */ void CollectId(const QDomElement &node, QVector &vector)const; }; diff --git a/xml/vtoolrecord.h b/xml/vtoolrecord.h index a2f964970..77ed466f3 100644 --- a/xml/vtoolrecord.h +++ b/xml/vtoolrecord.h @@ -29,20 +29,65 @@ #ifndef VTOOLRECORD_H #define VTOOLRECORD_H +/** + * @brief The VToolRecord class + */ class VToolRecord { public: + /** + * @brief VToolRecord + */ VToolRecord(); + /** + * @brief VToolRecord + * @param id + * @param typeTool + * @param nameDraw + */ VToolRecord(const qint64 &id, const Tool::Tools &typeTool, const QString &nameDraw); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief setId + * @param value + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getTypeTool + * @return + */ inline Tool::Tools getTypeTool() const {return typeTool;} + /** + * @brief setTypeTool + * @param value + */ inline void setTypeTool(const Tool::Tools &value) {typeTool = value;} + /** + * @brief getNameDraw + * @return + */ inline QString getNameDraw() const {return nameDraw;} + /** + * @brief setNameDraw + * @param value + */ inline void setNameDraw(const QString &value) {nameDraw = value;} private: + /** + * @brief id + */ qint64 id; + /** + * @brief typeTool + */ Tool::Tools typeTool; + /** + * @brief nameDraw + */ QString nameDraw; };