New define NULL_ID.

--HG--
branch : develop
This commit is contained in:
dismine 2014-08-17 18:20:55 +03:00
parent 036979a68c
commit a33ab27909
45 changed files with 67 additions and 58 deletions

View File

@ -34,7 +34,7 @@
#include <QLineF>
#include <QtAlgorithms>
quint32 VContainer::_id = 0;
quint32 VContainer::_id = NULL_ID;
//---------------------------------------------------------------------------------------------------------------------
/**
@ -270,7 +270,7 @@ void VContainer::UpdateId(quint32 newId)
template <typename val>
void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val point)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
Q_ASSERT_X(id > NULL_ID, Q_FUNC_INFO, "id = 0");
SCASSERT(point != nullptr);
point->setId(id);
if (gObjects.contains(id))
@ -288,7 +288,7 @@ void VContainer::UpdateObject(QHash<quint32, val> &obj, const quint32 &id, val p
*/
void VContainer::Clear()
{
_id = 0;
_id = NULL_ID;
details.clear();
ClearVariables();
@ -404,7 +404,7 @@ void VContainer::UpdateGObject(quint32 id, VGObject* obj)
*/
void VContainer::UpdateDetail(quint32 id, const VDetail &detail)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
Q_ASSERT_X(id > NULL_ID, Q_FUNC_INFO, "id = 0");
details[id] = detail;
UpdateId(id);
}

View File

@ -32,7 +32,7 @@
//---------------------------------------------------------------------------------------------------------------------
VCurveLength::VCurveLength()
:VInternalVariable(), id(0), parentId(0)
:VInternalVariable(), id(NULL_ID), parentId(NULL_ID)
{
type = VarType::Unknown;
}

View File

@ -27,13 +27,14 @@
*************************************************************************/
#include "vincrement.h"
#include "../options.h"
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VIncrement create enpty increment
*/
VIncrement::VIncrement()
:VVariable(), id(0)
:VVariable(), id(NULL_ID)
{
type = VarType::Increment;
}

View File

@ -34,7 +34,7 @@
//---------------------------------------------------------------------------------------------------------------------
VLineAngle::VLineAngle()
:VInternalVariable(), p1Id(0), p2Id(0)
:VInternalVariable(), p1Id(NULL_ID), p2Id(NULL_ID)
{
type = VarType::LineAngle;
}

View File

@ -34,7 +34,7 @@
//---------------------------------------------------------------------------------------------------------------------
VLengthLine::VLengthLine()
:VInternalVariable(), p1Id(0), p2Id(0)
:VInternalVariable(), p1Id(NULL_ID), p2Id(NULL_ID)
{
type = VarType::LineLength;
}

View File

@ -40,7 +40,7 @@
//---------------------------------------------------------------------------------------------------------------------
PatternPage::PatternPage(QWidget *parent):
QWidget(parent), userName(0), graphOutputCheck(0), undoCount(0)
QWidget(parent), userName(nullptr), graphOutputCheck(nullptr), undoCount(nullptr)
{
QGroupBox *userGroup = UserGroup();
QGroupBox *graphOutputGroup = GraphOutputGroup();

View File

@ -48,7 +48,7 @@
* @param parent parent widget
*/
DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent)
:DialogTool(data, 0, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0), m(nullptr)
:DialogTool(data, NULL_ID, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0), m(nullptr)
{
ui->setupUi(this);

View File

@ -42,7 +42,8 @@
*/
DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()),
typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), formulaBaseHeight(0), line(nullptr)
typeLine(QString()), formula(QString()), firstPointId(NULL_ID), secondPointId(NULL_ID), formulaBaseHeight(0),
line(nullptr)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -45,7 +45,7 @@
*/
DialogArc::DialogArc(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false),
timerRadius(nullptr), timerF1(nullptr), timerF2(nullptr), center(0), radius(QString()), f1(QString()),
timerRadius(nullptr), timerF1(nullptr), timerF2(nullptr), center(NULL_ID), radius(QString()), f1(QString()),
f2(QString()), formulaBaseHeight(0), formulaBaseHeightF1(0), formulaBaseHeightF2(0), path(nullptr)
{
ui->setupUi(this);

View File

@ -43,8 +43,8 @@
*/
DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), typeLine(QString()),
formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0), formulaBaseHeight(0), line(nullptr),
prepare(false)
formula(QString()), firstPointId(NULL_ID), secondPointId(NULL_ID), thirdPointId(NULL_ID), formulaBaseHeight(0),
line(nullptr), prepare(false)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -41,8 +41,8 @@
* @param parent parent widget
*/
DialogCutArc::DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent)
: DialogTool(data, toolId, parent), ui(new Ui::DialogCutArc), pointName(QString()), formula(QString()), arcId(0),
formulaBaseHeight(0), path(nullptr)
: DialogTool(data, toolId, parent), ui(new Ui::DialogCutArc), pointName(QString()), formula(QString()),
arcId(NULL_ID), formulaBaseHeight(0), path(nullptr)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -40,7 +40,7 @@
*/
DialogCutSpline::DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSpline), pointName(QString()), formula(QString()),
splineId(0), formulaBaseHeight(0)
splineId(NULL_ID), formulaBaseHeight(0)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -40,7 +40,7 @@
*/
DialogCutSplinePath::DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogCutSplinePath), pointName(QString()), formula(QString()),
splinePathId(0), formulaBaseHeight(0)
splinePathId(NULL_ID), formulaBaseHeight(0)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -43,7 +43,7 @@
*/
DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()),
formulaLength(QString()), formulaAngle(QString()), basePointId(0), formulaBaseHeight(0),
formulaLength(QString()), formulaAngle(QString()), basePointId(NULL_ID), formulaBaseHeight(0),
formulaBaseHeightAngle(0), line(nullptr)
{
ui->setupUi(this);

View File

@ -43,7 +43,7 @@
*/
DialogHeight::DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogHeight), number(0), pointName(QString()),
typeLine(QString()), basePointId(0), p1LineId(0), p2LineId(0), line(nullptr)
typeLine(QString()), basePointId(NULL_ID), p1LineId(NULL_ID), p2LineId(NULL_ID), line(nullptr)
{
ui->setupUi(this);
labelEditNamePoint = ui->labelEditNamePoint;

View File

@ -43,7 +43,7 @@
* @param parent parent widget
*/
DialogLine::DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0),
:DialogTool(data, toolId, parent), ui(new Ui::DialogLine), number(0), firstPoint(NULL_ID), secondPoint(NULL_ID),
typeLine(QString()), line(nullptr)
{
ui->setupUi(this);

View File

@ -42,7 +42,7 @@
*/
DialogLineIntersect::DialogLineIntersect(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogLineIntersect), number(0), pointName(QString()),
p1Line1(0), p2Line1(0), p1Line2(0), p2Line2(0), flagPoint(true), line(nullptr)
p1Line1(NULL_ID), p2Line1(NULL_ID), p1Line2(NULL_ID), p2Line2(NULL_ID), flagPoint(true), line(nullptr)
{
ui->setupUi(this);
number = 0;

View File

@ -40,7 +40,7 @@
*/
DialogNormal::DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), typeLine(QString()),
formula(QString()), angle(0), firstPointId(0), secondPointId(0), formulaBaseHeight(0), line(nullptr)
formula(QString()), angle(0), firstPointId(NULL_ID), secondPointId(NULL_ID), formulaBaseHeight(0), line(nullptr)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -41,7 +41,7 @@
*/
DialogPointOfContact::DialogPointOfContact(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogPointOfContact), number(0), pointName(QString()),
radius(QString()), center(0), firstPoint(0), secondPoint(0), formulaBaseHeight(0), line(nullptr)
radius(QString()), center(NULL_ID), firstPoint(NULL_ID), secondPoint(NULL_ID), formulaBaseHeight(0), line(nullptr)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -42,7 +42,7 @@
*/
DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogPointOfIntersection), number(0), pointName(QString()),
firstPointId(0), secondPointId(0), line(nullptr)
firstPointId(NULL_ID), secondPointId(NULL_ID), line(nullptr)
{
ui->setupUi(this);
labelEditNamePoint = ui->labelEditNamePoint;

View File

@ -43,7 +43,8 @@
*/
DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()),
typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0), formulaBaseHeight(0), line (nullptr)
typeLine(QString()), formula(QString()), p1Line(NULL_ID), p2Line(NULL_ID), pShoulder(NULL_ID), formulaBaseHeight(0),
line (nullptr)
{
ui->setupUi(this);
InitVariables(ui);

View File

@ -39,8 +39,8 @@
* @param parent parent widget
*/
DialogSpline::DialogSpline(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogSpline), number(0), p1(0), p4(0), angle1(0), angle2(0),
kAsm1(1), kAsm2(1), kCurve(1)
:DialogTool(data, toolId, parent), ui(new Ui::DialogSpline), number(0), p1(NULL_ID), p4(NULL_ID), angle1(0),
angle2(0), kAsm1(1), kAsm2(1), kCurve(1)
{
ui->setupUi(this);
InitOkCancel(ui);

View File

@ -40,8 +40,8 @@
* @param parent parent widget
*/
DialogTriangle::DialogTriangle(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogTriangle), number(0), pointName(QString()), axisP1Id(0),
axisP2Id(0), firstPointId(0), secondPointId(0), line (nullptr)
:DialogTool(data, toolId, parent), ui(new Ui::DialogTriangle), number(0), pointName(QString()), axisP1Id(NULL_ID),
axisP2Id(NULL_ID), firstPointId(NULL_ID), secondPointId(NULL_ID), line (nullptr)
{
ui->setupUi(this);
labelEditNamePoint = ui->labelEditNamePoint;

View File

@ -38,8 +38,8 @@
* @param parent parent widget
*/
DialogUnionDetails::DialogUnionDetails(const VContainer *data, const quint32 &toolId, QWidget *parent)
:DialogTool(data, toolId, parent), ui(new Ui::DialogUnionDetails), indexD1(0), indexD2(0), d1(0), d2(0), numberD(0),
numberP(0), p1(0), p2(0)
:DialogTool(data, toolId, parent), ui(new Ui::DialogUnionDetails), indexD1(0), indexD2(0), d1(NULL_ID), d2(NULL_ID),
numberD(0), numberP(0), p1(NULL_ID), p2(NULL_ID)
{
ui->setupUi(this);
InitOkCancel(ui);

View File

@ -27,6 +27,7 @@
*************************************************************************/
#include "vexceptionbadid.h"
#include "../options.h"
//---------------------------------------------------------------------------------------------------------------------
/**
@ -44,7 +45,7 @@ VExceptionBadId::VExceptionBadId(const QString &what, const quint32 &id)
* @param key string key
*/
VExceptionBadId::VExceptionBadId(const QString &what, const QString &key)
:VException(what), id(0), key(key){}
:VException(what), id(NULL_ID), key(key){}
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -32,13 +32,13 @@
//---------------------------------------------------------------------------------------------------------------------
VDetail::VDetail()
:_id(0), nodes(QVector<VNodeDetail>()), name(QString()), mx(0), my(0), seamAllowance(true), closed(true),
:_id(NULL_ID), nodes(QVector<VNodeDetail>()), name(QString()), mx(0), my(0), seamAllowance(true), closed(true),
width(0)
{}
//---------------------------------------------------------------------------------------------------------------------
VDetail::VDetail(const QString &name, const QVector<VNodeDetail> &nodes)
:_id(0), nodes(QVector<VNodeDetail>()), name(name), mx(0), my(0), seamAllowance(true), closed(true),
:_id(NULL_ID), nodes(QVector<VNodeDetail>()), name(name), mx(0), my(0), seamAllowance(true), closed(true),
width(0)
{
this->nodes = nodes;
@ -46,7 +46,7 @@ VDetail::VDetail(const QString &name, const QVector<VNodeDetail> &nodes)
//---------------------------------------------------------------------------------------------------------------------
VDetail::VDetail(const VDetail &detail)
:_id(0), nodes(detail.getNodes()), name(detail.getName()), mx(detail.getMx()), my(detail.getMy()),
:_id(NULL_ID), nodes(detail.getNodes()), name(detail.getName()), mx(detail.getMx()), my(detail.getMy()),
seamAllowance(detail.getSeamAllowance()), closed(detail.getClosed()), width(detail.getWidth())
{}

View File

@ -33,7 +33,7 @@
* @brief VGObject default constructor.
*/
VGObject::VGObject()
:_id(0), type(GOType::Unknown), idObject(0), _name(QString()), mode(Draw::Calculation)
:_id(NULL_ID), type(GOType::Unknown), idObject(NULL_ID), _name(QString()), mode(Draw::Calculation)
{}
//---------------------------------------------------------------------------------------------------------------------
@ -44,7 +44,7 @@ VGObject::VGObject()
* @param mode mode creation. Used in modeling mode.
*/
VGObject::VGObject(const GOType &type, const quint32 &idObject, const Draw &mode)
:_id(0), type(type), idObject(idObject), _name(QString()), mode(mode)
:_id(NULL_ID), type(type), idObject(idObject), _name(QString()), mode(mode)
{}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@
//---------------------------------------------------------------------------------------------------------------------
VNodeDetail::VNodeDetail()
:id(0), typeTool(Tool::NodePoint), typeNode(NodeDetail::Contour), mx(0), my(0)
:id(NULL_ID), typeTool(Tool::NodePoint), typeNode(NodeDetail::Contour), mx(0), my(0)
{}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@
MainWindow::MainWindow(QWidget *parent)
:QMainWindow(parent), ui(new Ui::MainWindow), pattern(nullptr), doc(nullptr), tool(Tool::ArrowTool),
currentScene(nullptr), sceneDraw(nullptr), sceneDetails(nullptr), mouseCoordinate(nullptr), helpLabel(nullptr),
isInitialized(false), dialogTable(0), dialogTool(nullptr), dialogHistory(nullptr),
isInitialized(false), dialogTable(nullptr), dialogTool(nullptr), dialogHistory(nullptr),
comboBoxDraws(nullptr), curFile(QString()), mode(Draw::Calculation), currentDrawIndex(0),
currentToolBoxIndex(0), drawMode(true), recentFileActs{nullptr, nullptr, nullptr, nullptr, nullptr},
separatorAct(nullptr), autoSaveTimer(nullptr), guiEnabled(true), gradationHeights(nullptr),

View File

@ -39,6 +39,7 @@ class QString;
#define SceneSize 50000
#define DefPointRadius 2.0//mm
#define NULL_ID 0//use this value for initialization variables that keeps id values. 0 mean uknown id value.
enum class SceneObject : char { Point, Line, Spline, Arc, SplinePath, Detail };
enum class Tool : char

View File

@ -50,7 +50,8 @@ const QString VToolBisector::ToolType = QStringLiteral("bisector");
VToolBisector::VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
const quint32 &thirdPointId, const Source &typeCreation, QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), thirdPointId(0)
:VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(NULL_ID),
thirdPointId(NULL_ID)
{
this->firstPointId = firstPointId;
this->thirdPointId = thirdPointId;

View File

@ -42,7 +42,8 @@ const QString VToolPoint::TagName = QStringLiteral("point");
* @param parent parent object.
*/
VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(0), lineName(0)
:VDrawTool(doc, data, id), QGraphicsEllipseItem(parent), radius(DefPointRadius), namePoint(nullptr),
lineName(nullptr)
{
radius = qApp->toPixel(DefPointRadius/*mm*/, Unit::Mm);
namePoint = new VGraphicsSimpleTextItem(this);

View File

@ -31,7 +31,7 @@
//---------------------------------------------------------------------------------------------------------------------
VUndoCommand::VUndoCommand(const QDomElement &xml, VPattern *doc, QUndoCommand *parent)
:QObject(), QUndoCommand(parent), xml(xml), doc(doc), nodeId(0), redoFlag(false)
:QObject(), QUndoCommand(parent), xml(xml), doc(doc), nodeId(NULL_ID), redoFlag(false)
{
SCASSERT(doc != nullptr);
}

View File

@ -32,7 +32,8 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolAlongLine::VisToolAlongLine(const VContainer *data, QGraphicsItem *parent)
: VisLine(data, parent), point2Id(0), point(nullptr), lineP1(nullptr), lineP2(nullptr), line(nullptr), length(0)
: VisLine(data, parent), point2Id(NULL_ID), point(nullptr), lineP1(nullptr), lineP2(nullptr), line(nullptr),
length(0)
{
this->mainColor = Qt::red;
this->setZValue(2);// Show on top real tool

View File

@ -33,7 +33,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolBisector::VisToolBisector(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), point2Id(0), point3Id(0), point(nullptr), line1P1(nullptr), line1P2(nullptr),
:VisLine(data, parent), point2Id(NULL_ID), point3Id(NULL_ID), point(nullptr), line1P1(nullptr), line1P2(nullptr),
line1(nullptr), line2P2(nullptr), line2(nullptr), length(0)
{
line1P1 = InitPoint(supportColor, this);

View File

@ -32,7 +32,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolHeight::VisToolHeight(const VContainer *data, QGraphicsItem *parent)
: VisLine(data, parent), lineP1Id(0), lineP2Id(0), point(nullptr), base_point(nullptr), lineP1(nullptr),
: VisLine(data, parent), lineP1Id(NULL_ID), lineP2Id(NULL_ID), point(nullptr), base_point(nullptr), lineP1(nullptr),
lineP2(nullptr), line(nullptr), line_intersection(nullptr)
{
base_point = InitPoint(supportColor, this);

View File

@ -33,7 +33,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolLine::VisToolLine(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), point2Id(0)
:VisLine(data, parent), point2Id(NULL_ID)
{
this->mainColor = Qt::red;
}

View File

@ -32,8 +32,8 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolLineIntersect::VisToolLineIntersect(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), line1P2Id(0), line2P1Id(0), line2P2Id(0), point(nullptr), line1P1(nullptr),
line1P2(nullptr), line1(nullptr), line2P1(nullptr), line2P2(nullptr)
:VisLine(data, parent), line1P2Id(NULL_ID), line2P1Id(NULL_ID), line2P2Id(NULL_ID), point(nullptr),
line1P1(nullptr), line1P2(nullptr), line1(nullptr), line2P1(nullptr), line2P2(nullptr)
{
line1P1 = InitPoint(supportColor, this);
line1P2 = InitPoint(supportColor, this);

View File

@ -32,8 +32,8 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolNormal::VisToolNormal(const VContainer *data, QGraphicsItem *parent)
: VisLine(data, parent), point2Id(0), point(nullptr), lineP1(nullptr), lineP2(nullptr), line(nullptr), length(0),
angle(0)
: VisLine(data, parent), point2Id(NULL_ID), point(nullptr), lineP1(nullptr), lineP2(nullptr), line(nullptr),
length(0), angle(0)
{
this->mainColor = Qt::red;

View File

@ -32,7 +32,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolPointOfContact::VisToolPointOfContact(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), lineP2Id(0), radiusId(0), point(nullptr), lineP1(nullptr), lineP2(nullptr),
:VisLine(data, parent), lineP2Id(NULL_ID), radiusId(NULL_ID), point(nullptr), lineP1(nullptr), lineP2(nullptr),
arc_point(nullptr), circle(nullptr), radius(0)
{
arc_point = InitPoint(supportColor, this);

View File

@ -32,7 +32,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolPointOfIntersection::VisToolPointOfIntersection(const VContainer *data, QGraphicsItem *parent)
: VisLine(data, parent), point2Id(0), point(nullptr), axisP1(nullptr), axisP2(nullptr), axis2(nullptr)
: VisLine(data, parent), point2Id(NULL_ID), point(nullptr), axisP1(nullptr), axisP2(nullptr), axis2(nullptr)
{
axisP1 = InitPoint(supportColor, this);
axisP2 = InitPoint(supportColor, this);

View File

@ -32,7 +32,7 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolShoulderPoint::VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), lineP1Id(0), lineP2Id(0), point(nullptr), line1P1(nullptr), line1P2(nullptr),
:VisLine(data, parent), lineP1Id(NULL_ID), lineP2Id(NULL_ID), point(nullptr), line1P1(nullptr), line1P2(nullptr),
line1(nullptr), line2P2(nullptr), line2(nullptr), line3(nullptr), length(0)
{
line1P1 = InitPoint(supportColor, this);

View File

@ -34,8 +34,9 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolTriangle::VisToolTriangle(const VContainer *data, QGraphicsItem *parent)
:VisLine(data, parent), point2Id(0), hypotenuseP1Id(0), hypotenuseP2Id(0), point(nullptr), axisP1(nullptr),
axisP2(nullptr), axis(nullptr), hypotenuseP1(nullptr), hypotenuseP2(nullptr), foot1(nullptr), foot2(nullptr)
:VisLine(data, parent), point2Id(NULL_ID), hypotenuseP1Id(NULL_ID), hypotenuseP2Id(NULL_ID), point(nullptr),
axisP1(nullptr), axisP2(nullptr), axis(nullptr), hypotenuseP1(nullptr), hypotenuseP2(nullptr), foot1(nullptr),
foot2(nullptr)
{
axisP1 = InitPoint(supportColor, this);
axisP2 = InitPoint(supportColor, this);

View File

@ -35,7 +35,7 @@
//---------------------------------------------------------------------------------------------------------------------
Visualization::Visualization(const VContainer *data)
:QObject(), data(data), factor(VDrawTool::factor), scenePos(QPointF()),
mainColor(Qt::red), supportColor(Qt::magenta), lineStyle(Qt::SolidLine), point1Id(0), toolTip(QString())
mainColor(Qt::red), supportColor(Qt::magenta), lineStyle(Qt::SolidLine), point1Id(NULL_ID), toolTip(QString())
{}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -33,7 +33,7 @@
* @brief VToolRecord default constructor.
*/
VToolRecord::VToolRecord()
:id(0), typeTool(Tool::ArrowTool), nameDraw(QString())
:id(NULL_ID), typeTool(Tool::ArrowTool), nameDraw(QString())
{}
//---------------------------------------------------------------------------------------------------------------------