diff --git a/share/resources/schema/pattern.xsd b/share/resources/schema/pattern.xsd
index 8c8394d6a..d1a1fe300 100644
--- a/share/resources/schema/pattern.xsd
+++ b/share/resources/schema/pattern.xsd
@@ -13,7 +13,7 @@
-
+
@@ -32,51 +32,51 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
@@ -86,21 +86,21 @@
-
+
-
+
-
-
+
+
@@ -113,31 +113,31 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
@@ -149,9 +149,9 @@
-
-
-
+
+
+
@@ -159,10 +159,10 @@
-
+
-
-
+
+
@@ -178,20 +178,20 @@
-
-
-
+
+
+
-
-
+
+
-
+
-
+
diff --git a/src/container/vcontainer.cpp b/src/container/vcontainer.cpp
index bcda3190d..7f49d3b71 100644
--- a/src/container/vcontainer.cpp
+++ b/src/container/vcontainer.cpp
@@ -31,13 +31,13 @@
#include
#include
-qint64 VContainer::_id = 0;
+quint32 VContainer::_id = 0;
VContainer::VContainer()
- :base(QHash()), gObjects(QHash()),
+ :base(QHash()), gObjects(QHash()),
standardTable(QHash()), incrementTable(QHash()),
lengthLines(QHash()), lineAngles(QHash()), lengthSplines(QHash()),
- lengthArcs(QHash()), details(QHash())
+ lengthArcs(QHash()), details(QHash())
{
SetSize(500);
SetGrowth(1760);
@@ -51,10 +51,10 @@ VContainer &VContainer::operator =(const VContainer &data)
}
VContainer::VContainer(const VContainer &data)
- :base(QHash()), gObjects(QHash()),
+ :base(QHash()), gObjects(QHash()),
standardTable(QHash()), incrementTable(QHash()),
lengthLines(QHash()), lineAngles(QHash()), lengthSplines(QHash()),
- lengthArcs(QHash()), details(QHash())
+ lengthArcs(QHash()), details(QHash())
{
setData(data);
}
@@ -71,9 +71,9 @@ void VContainer::setData(const VContainer &data)
qDeleteAll(gObjects);
gObjects.clear();
- const QHash *obj = data.DataGObjects();
+ const QHash *obj = data.DataGObjects();
Q_CHECK_PTR(obj);
- QHashIterator i(*obj);
+ QHashIterator i(*obj);
while (i.hasNext())
{
i.next();
@@ -112,7 +112,7 @@ void VContainer::setData(const VContainer &data)
details = *data.DataDetails();
}
-const VGObject *VContainer::GetGObject(qint64 id)const
+const VGObject *VContainer::GetGObject(quint32 id)const
{
return GetObject(gObjects, id);
}
@@ -179,19 +179,19 @@ qreal VContainer::GetLineAngle(const QString &name) const
return GetVariable(lineAngles, name);
}
-const VDetail VContainer::GetDetail(qint64 id) const
+const VDetail VContainer::GetDetail(quint32 id) const
{
return GetVariable(details, id);
}
-qint64 VContainer::AddGObject(VGObject *obj)
+quint32 VContainer::AddGObject(VGObject *obj)
{
return AddObject(gObjects, obj);
}
-qint64 VContainer::AddDetail(VDetail detail)
+quint32 VContainer::AddDetail(VDetail detail)
{
- qint64 id = getNextId();
+ quint32 id = getNextId();
details[id] = detail;
return id;
}
@@ -201,13 +201,13 @@ void VContainer::AddIncrementTableRow(const QString &name, VIncrementTableRow ro
incrementTable[name] = row;
}
-qint64 VContainer::getNextId()
+quint32 VContainer::getNextId()
{
_id++;
return _id;
}
-void VContainer::UpdateId(qint64 newId)
+void VContainer::UpdateId(quint32 newId)
{
if (newId > _id)
{
@@ -216,7 +216,7 @@ void VContainer::UpdateId(qint64 newId)
}
template
-void VContainer::UpdateObject(QHash &obj, const qint64 &id, val point)
+void VContainer::UpdateObject(QHash &obj, const quint32 &id, val point)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
Q_CHECK_PTR(point);
@@ -236,7 +236,7 @@ void VContainer::AddLengthSpline(const QString &name, const qreal &value)
lengthSplines[name] = value;
}
-void VContainer::AddLengthArc(const qint64 &id)
+void VContainer::AddLengthArc(const quint32 &id)
{
const VArc * arc = GeometricObject(id);
lengthArcs[arc->name()] = toMM(arc->GetLength());
@@ -292,7 +292,7 @@ void VContainer::ClearCalculationGObjects()
{
if (gObjects.size()>0)
{
- QHashIterator i(gObjects);
+ QHashIterator i(gObjects);
while (i.hasNext())
{
i.next();
@@ -347,7 +347,7 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const
return 0;
}
-void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId)
+void VContainer::AddLine(const quint32 &firstPointId, const quint32 &secondPointId)
{
QString nameLine = GetNameLine(firstPointId, secondPointId);
const VPointF *first = GeometricObject(firstPointId);
@@ -358,16 +358,16 @@ void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId
}
template
-qint64 VContainer::AddObject(QHash &obj, val value)
+quint32 VContainer::AddObject(QHash &obj, val value)
{
Q_CHECK_PTR(value);
- qint64 id = getNextId();
+ quint32 id = getNextId();
value->setId(id);
obj[id] = value;
return id;
}
-QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint) const
+QString VContainer::GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const
{
const VPointF *first = GeometricObject(firstPoint);
const VPointF *second = GeometricObject(secondPoint);
@@ -375,7 +375,7 @@ QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPo
return QString("Line_%1_%2").arg(first->name(), second->name());
}
-QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint) const
+QString VContainer::GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const
{
const VPointF *first = GeometricObject(firstPoint);
const VPointF *second = GeometricObject(secondPoint);
@@ -383,12 +383,12 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec
return QString("AngleLine_%1_%2").arg(first->name(), second->name());
}
-void VContainer::UpdateGObject(qint64 id, VGObject* obj)
+void VContainer::UpdateGObject(quint32 id, VGObject* obj)
{
UpdateObject(gObjects, id, obj);
}
-void VContainer::UpdateDetail(qint64 id, const VDetail &detail)
+void VContainer::UpdateDetail(quint32 id, const VDetail &detail)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
details[id] = detail;
diff --git a/src/container/vcontainer.h b/src/container/vcontainer.h
index 87508a6b8..fd44cfcf7 100644
--- a/src/container/vcontainer.h
+++ b/src/container/vcontainer.h
@@ -62,7 +62,7 @@ public:
VContainer(const VContainer &data);
~VContainer();
template
- void CopyGObject(const VContainer &data, const qint64 &id)
+ void CopyGObject(const VContainer &data, const quint32 &id)
{
T *obj = new T(*data.GeometricObject(id));
Q_CHECK_PTR(obj);
@@ -74,7 +74,7 @@ public:
*/
void setData(const VContainer &data);
template
- const T GeometricObject(qint64 id) const
+ const T GeometricObject(quint32 id) const
{
VGObject *gObj = 0;
if (gObjects.contains(id))
@@ -95,7 +95,7 @@ public:
* @param id id of point
* @return point
*/
- const VGObject *GetGObject(qint64 id) const;
+ const VGObject *GetGObject(quint32 id) const;
/**
* @brief GetStandardTableCell return standard table row by name
* @param name name of standard table row
@@ -137,24 +137,24 @@ public:
* @param id id of detail
* @return detail
*/
- const VDetail GetDetail(qint64 id) const;
+ const VDetail GetDetail(quint32 id) const;
/**
* @brief getId return current id
* @return current id
*/
- static qint64 getId() {return _id;}
+ static quint32 getId() {return _id;}
/**
* @brief AddPoint add new point to container
* @param point new point
* @return return id of new point in container
*/
- qint64 AddGObject(VGObject *obj);
+ quint32 AddGObject(VGObject *obj);
/**
* @brief AddDetail add new detail to container
* @param detail new detail
* @return return id of new detail in container
*/
- qint64 AddDetail(VDetail detail);
+ quint32 AddDetail(VDetail detail);
/**
* @brief AddStandardTableCell add new row of standard table
* @param name name of row of standard table
@@ -184,7 +184,7 @@ public:
* @brief AddLengthArc add length of arc to container
* @param id id of arc
*/
- void AddLengthArc(const qint64 &id);
+ void AddLengthArc(const quint32 &id);
/**
* @brief AddLineAngle add angle of line to container
* @param name name of line angle
@@ -197,7 +197,7 @@ public:
* @param secondPointId id of second point of line
* @param mode mode of line
*/
- void AddLine(const qint64 &firstPointId, const qint64 &secondPointId);
+ void AddLine(const quint32 &firstPointId, const quint32 &secondPointId);
/**
* @brief GetNameLine return name of line
* @param firstPoint id of first point of line
@@ -205,7 +205,7 @@ public:
* @return name of line
*/
// cppcheck-suppress functionStatic
- QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint) const;
+ QString GetNameLine(const quint32 &firstPoint, const quint32 &secondPoint) const;
/**
* @brief GetNameLineAngle return name of line angle
* @param firstPoint id of first point of line
@@ -213,19 +213,19 @@ public:
* @return name of angle of line
*/
// cppcheck-suppress functionStatic
- QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint) const;
+ QString GetNameLineAngle(const quint32 &firstPoint, const quint32 &secondPoint) const;
/**
* @brief UpdatePoint update point by id
* @param id id of existing point
* @param point point
*/
- void UpdateGObject(qint64 id, VGObject* obj);
+ void UpdateGObject(quint32 id, VGObject* obj);
/**
* @brief UpdateDetail update detail by id
* @param id id of existing detail
* @param detail detail
*/
- void UpdateDetail(qint64 id, const VDetail &detail);
+ void UpdateDetail(quint32 id, const VDetail &detail);
/**
* @brief UpdateStandardTableCell update standard table row by name
* @param name name of row
@@ -319,7 +319,7 @@ public:
* @brief getNextId generate next unique id
* @return next unique id
*/
- static qint64 getNextId();
+ static quint32 getNextId();
/**
* @brief RemoveIncrementTableRow remove row by name from increment table
* @param name name of existing row
@@ -329,7 +329,7 @@ public:
* @brief data container with datagObjects return container of gObjects
* @return pointer on container of gObjects
*/
- inline const QHash *DataGObjects() const {return &gObjects;}
+ inline const QHash *DataGObjects() const {return &gObjects;}
/**
* @brief data container with dataBase return container of data
* @return pointer on container of base data
@@ -369,12 +369,12 @@ public:
* @brief data container with dataDetails return container of details
* @return pointer on container of details
*/
- inline const QHash *DataDetails() const {return &details;}
+ inline const QHash *DataDetails() const {return &details;}
/**
* @brief UpdateId update id. If new id bigger when current save new like current.
* @param newId id
*/
- static void UpdateId(qint64 newId);
+ static void UpdateId(quint32 newId);
/**
* @brief CreateManTableIGroup generate man standard table of measurements
*/
@@ -383,7 +383,7 @@ private:
/**
* @brief _id current id. New object will have value +1. For empty class equal 0.
*/
- static qint64 _id;
+ static quint32 _id;
/**
* @brief base container of base data (size and growth)
*/
@@ -391,7 +391,7 @@ private:
/**
* @brief gObjects graphicals objects of pattern.
*/
- QHash gObjects;
+ QHash gObjects;
/**
* @brief standardTable container of standard table rows
*/
@@ -419,7 +419,7 @@ private:
/**
* @brief details container of details
*/
- QHash details;
+ QHash details;
template
/**
* @brief GetObject return object from container
@@ -445,7 +445,7 @@ private:
* @param id id of existing object
* @param point object
*/
- void UpdateObject(QHash &obj, const qint64 &id, val point);
+ void UpdateObject(QHash &obj, const quint32 &id, val point);
template
/**
* @brief AddObject add object to container
@@ -453,7 +453,7 @@ private:
* @param value object
* @return id of object in container
*/
- static qint64 AddObject(QHash &obj, val value);
+ static quint32 AddObject(QHash &obj, val value);
};
#endif // VCONTAINER_H
diff --git a/src/container/vincrementtablerow.cpp b/src/container/vincrementtablerow.cpp
index 7b7b00655..2e41c2755 100644
--- a/src/container/vincrementtablerow.cpp
+++ b/src/container/vincrementtablerow.cpp
@@ -31,5 +31,5 @@
VIncrementTableRow::VIncrementTableRow()
:id(0), base(0), ksize(0), kgrowth(0), description(QString()){}
-VIncrementTableRow::VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, QString description)
+VIncrementTableRow::VIncrementTableRow(quint32 id, qreal base, qreal ksize, qreal kgrowth, QString description)
:id(id), base(base), ksize(ksize), kgrowth(kgrowth), description(description){}
diff --git a/src/container/vincrementtablerow.h b/src/container/vincrementtablerow.h
index 493967569..e7572befd 100644
--- a/src/container/vincrementtablerow.h
+++ b/src/container/vincrementtablerow.h
@@ -49,18 +49,18 @@ public:
* @param kgrowth increment in growths
* @param description description of increment
*/
- VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth,
+ VIncrementTableRow(quint32 id, qreal base, qreal ksize, qreal kgrowth,
QString description = QString());
/**
* @brief getId return id of row
* @return id
*/
- inline qint64 getId() const {return id;}
+ inline quint32 getId() const {return id;}
/**
* @brief setId set id of row
* @param value id
*/
- inline void setId(const qint64 &value) {id = value;}
+ inline void setId(const quint32 &value) {id = value;}
/**
* @brief getBase return value in base size and growth
* @return value
@@ -105,7 +105,7 @@ private:
/**
* @brief id identificator
*/
- qint64 id;
+ quint32 id;
/**
* @brief base value in base size and growth
*/
diff --git a/src/dialogs/app/dialoghistory.cpp b/src/dialogs/app/dialoghistory.cpp
index fa920848c..2f97b8367 100644
--- a/src/dialogs/app/dialoghistory.cpp
+++ b/src/dialogs/app/dialoghistory.cpp
@@ -63,7 +63,7 @@ DialogHistory::~DialogHistory()
void DialogHistory::DialogAccepted()
{
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, false);
emit DialogClosed(QDialog::Accepted);
}
@@ -78,7 +78,7 @@ void DialogHistory::cellClicked(int row, int column)
item = ui->tableWidget->item(row, 0);
cursorRow = row;
item->setIcon(QIcon("://icon/32x32/put_after.png"));
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
disconnect(doc, &VPattern::ChangedCursor, this, &DialogHistory::ChangedCursor);
doc->setCursor(id);
connect(doc, &VPattern::ChangedCursor, this, &DialogHistory::ChangedCursor);
@@ -86,22 +86,22 @@ void DialogHistory::cellClicked(int row, int column)
else
{
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, false);
cursorToolRecordRow = row;
item = ui->tableWidget->item(cursorToolRecordRow, 0);
- id = qvariant_cast(item->data(Qt::UserRole));
+ id = qvariant_cast(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, true);
}
}
-void DialogHistory::ChangedCursor(qint64 id)
+void DialogHistory::ChangedCursor(quint32 id)
{
for (qint32 i = 0; i< ui->tableWidget->rowCount(); ++i)
{
QTableWidgetItem *item = ui->tableWidget->item(i, 0);
- qint64 rId = qvariant_cast(item->data(Qt::UserRole));
+ quint32 rId = qvariant_cast(item->data(Qt::UserRole));
if (rId == id)
{
QTableWidgetItem *oldCursorItem = ui->tableWidget->item(cursorRow, 0);
@@ -161,15 +161,15 @@ void DialogHistory::FillTable()
QString DialogHistory::Record(const VToolRecord &tool)
{
QString record = QString();
- qint64 basePointId = 0;
- qint64 secondPointId = 0;
- qint64 firstPointId = 0;
- qint64 thirdPointId = 0;
- qint64 p1Line1 = 0;
- qint64 p2Line1 = 0;
- qint64 p1Line2 = 0;
- qint64 p2Line2 = 0;
- qint64 center = 0;
+ quint32 basePointId = 0;
+ quint32 secondPointId = 0;
+ quint32 firstPointId = 0;
+ quint32 thirdPointId = 0;
+ quint32 p1Line1 = 0;
+ quint32 p2Line1 = 0;
+ quint32 p1Line2 = 0;
+ quint32 p2Line2 = 0;
+ quint32 center = 0;
QDomElement domElement;
switch ( tool.getTypeTool() )
{
@@ -186,7 +186,7 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- basePointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrBasePoint, "0");
+ basePointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrBasePoint, "0");
}
QString basePointIdName = data->GeometricObject(basePointId)->name();
QString toolIdName = data->GeometricObject(tool.getId())->name();
@@ -198,8 +198,8 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ firstPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString firstPointIdName = data->GeometricObject(firstPointId)->name();
QString secondPointIdName = data->GeometricObject(secondPointId)->name();
@@ -211,8 +211,8 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- basePointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ basePointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString basePointIdName = data->GeometricObject(basePointId)->name();
QString secondPointIdName = data->GeometricObject(secondPointId)->name();
@@ -231,8 +231,8 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- basePointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ basePointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString basePointIdName = data->GeometricObject(basePointId)->name();
QString secondPointIdName = data->GeometricObject(secondPointId)->name();
@@ -245,9 +245,9 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
- thirdPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrThirdPoint, "0");
+ firstPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
+ thirdPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrThirdPoint, "0");
}
QString firstPointIdName = data->GeometricObject(firstPointId)->name();
QString basePointIdName = data->GeometricObject(basePointId)->name();
@@ -262,10 +262,10 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- p1Line1 = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP1Line1, "0");
- p2Line1 = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP2Line1, "0");
- p1Line2 = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP1Line2, "0");
- p2Line2 = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP2Line2, "0");
+ p1Line1 = doc->GetParametrUInt(domElement, VAbstractTool::AttrP1Line1, "0");
+ p2Line1 = doc->GetParametrUInt(domElement, VAbstractTool::AttrP2Line1, "0");
+ p1Line2 = doc->GetParametrUInt(domElement, VAbstractTool::AttrP1Line2, "0");
+ p2Line2 = doc->GetParametrUInt(domElement, VAbstractTool::AttrP2Line2, "0");
}
QString p1Line1Name = data->GeometricObject(p1Line1)->name();
QString p2Line1Name = data->GeometricObject(p2Line1)->name();
@@ -314,9 +314,9 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- center = doc->GetParametrLongLong(domElement, VAbstractTool::AttrCenter, "0");
- firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ center = doc->GetParametrUInt(domElement, VAbstractTool::AttrCenter, "0");
+ firstPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString firstPointIdName = data->GeometricObject(firstPointId)->name();
QString centerName = data->GeometricObject(center)->name();
@@ -328,14 +328,14 @@ QString DialogHistory::Record(const VToolRecord &tool)
}
case Tool::Height:
{
- qint64 p1LineId = 0;
- qint64 p2LineId = 0;
+ quint32 p1LineId = 0;
+ quint32 p2LineId = 0;
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- basePointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrBasePoint, "0");
- p1LineId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP1Line, "0");
- p2LineId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrP2Line, "0");
+ basePointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrBasePoint, "0");
+ p1LineId = doc->GetParametrUInt(domElement, VAbstractTool::AttrP1Line, "0");
+ p2LineId = doc->GetParametrUInt(domElement, VAbstractTool::AttrP2Line, "0");
}
QString basePointIdName = data->GeometricObject(basePointId)->name();
QString p1LineIdName = data->GeometricObject(p1LineId)->name();
@@ -346,15 +346,15 @@ QString DialogHistory::Record(const VToolRecord &tool)
}
case Tool::Triangle:
{
- qint64 axisP1Id = 0;
- qint64 axisP2Id = 0;
+ quint32 axisP1Id = 0;
+ quint32 axisP2Id = 0;
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- axisP1Id = doc->GetParametrLongLong(domElement, VAbstractTool::AttrAxisP1, "0");
- axisP2Id = doc->GetParametrLongLong(domElement, VAbstractTool::AttrAxisP2, "0");
- firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ axisP1Id = doc->GetParametrUInt(domElement, VAbstractTool::AttrAxisP1, "0");
+ axisP2Id = doc->GetParametrUInt(domElement, VAbstractTool::AttrAxisP2, "0");
+ firstPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString axisP1IdName = data->GeometricObject(axisP1Id)->name();
QString axisP2IdName = data->GeometricObject(axisP2Id)->name();
@@ -369,8 +369,8 @@ QString DialogHistory::Record(const VToolRecord &tool)
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ firstPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPointId = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
}
QString firstPointIdName = data->GeometricObject(firstPointId)->name();
QString secondPointIdName = data->GeometricObject(secondPointId)->name();
@@ -381,11 +381,11 @@ QString DialogHistory::Record(const VToolRecord &tool)
break;
case Tool::CutArcTool:
{
- qint64 arcId = 0;
+ quint32 arcId = 0;
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- arcId = doc->GetParametrLongLong(domElement, VToolCutArc::AttrArc, "0");
+ arcId = doc->GetParametrUInt(domElement, VToolCutArc::AttrArc, "0");
}
const VArc *arc = data->GeometricObject(arcId);
QString arcCenterName = data->GeometricObject(arc->GetCenter().id())->name();
@@ -395,11 +395,11 @@ QString DialogHistory::Record(const VToolRecord &tool)
break;
case Tool::CutSplineTool:
{
- qint64 splineId = 0;
+ quint32 splineId = 0;
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- splineId = doc->GetParametrLongLong(domElement, VToolCutSpline::AttrSpline, "0");
+ splineId = doc->GetParametrUInt(domElement, VToolCutSpline::AttrSpline, "0");
}
const VSpline *spl = data->GeometricObject(splineId);
QString toolIdName = data->GeometricObject(tool.getId())->name();
@@ -410,11 +410,11 @@ QString DialogHistory::Record(const VToolRecord &tool)
break;
case Tool::CutSplinePathTool:
{
- qint64 splinePathId = 0;
+ quint32 splinePathId = 0;
domElement = doc->elementById(QString().setNum(tool.getId()));
if (domElement.isElement())
{
- splinePathId = doc->GetParametrLongLong(domElement, VToolCutSplinePath::AttrSplinePath, "0");
+ splinePathId = doc->GetParametrUInt(domElement, VToolCutSplinePath::AttrSplinePath, "0");
}
const VSplinePath *splPath = data->GeometricObject(splinePathId);
QVector points = splPath->GetSplinePath();
@@ -469,7 +469,7 @@ void DialogHistory::ShowPoint()
item->setSelected(true);
cursorToolRecordRow = 0;
item = ui->tableWidget->item(0, 0);
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, true);
}
}
@@ -477,7 +477,7 @@ void DialogHistory::ShowPoint()
void DialogHistory::closeEvent(QCloseEvent *event)
{
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, false);
DialogTool::closeEvent(event);
}
diff --git a/src/dialogs/app/dialoghistory.h b/src/dialogs/app/dialoghistory.h
index 526f6f46f..3a6f797c7 100644
--- a/src/dialogs/app/dialoghistory.h
+++ b/src/dialogs/app/dialoghistory.h
@@ -67,7 +67,7 @@ public slots:
* @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);
+ void ChangedCursor(quint32 id);
/**
* @brief UpdateHistory update history table
*/
@@ -79,7 +79,7 @@ signals:
* @param color new color of tool
* @param enable true enable selection, false disable selection
*/
- void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable);
+ void ShowHistoryTool(quint32 id, Qt::GlobalColor color, bool enable);
protected:
/**
* @brief closeEvent handle when windows is closing
diff --git a/src/dialogs/app/dialogincrements.cpp b/src/dialogs/app/dialogincrements.cpp
index 7bd2c87df..048fce127 100644
--- a/src/dialogs/app/dialogincrements.cpp
+++ b/src/dialogs/app/dialogincrements.cpp
@@ -110,7 +110,7 @@ void DialogIncrements::FillIncrementTable()
{
const QHash *incrementTable = data->DataIncrementTable();
QHashIterator i(*incrementTable);
- QMap map;
+ QMap map;
//Sorting QHash by id
while (i.hasNext())
{
@@ -120,7 +120,7 @@ void DialogIncrements::FillIncrementTable()
}
qint32 currentRow = -1;
- QMapIterator iMap(map);
+ QMapIterator iMap(map);
while (iMap.hasNext())
{
iMap.next();
@@ -312,7 +312,7 @@ void DialogIncrements::clickedToolButtonAdd()
num++;
} while (data->IncrementTableContains(name));
- qint64 id = data->getNextId();
+ quint32 id = data->getNextId();
qreal base = 0;
qreal ksize = 0;
qreal kgrowth = 0;
@@ -367,7 +367,7 @@ void DialogIncrements::clickedToolButtonRemove()
qint32 row = item->row();
QTableWidgetItem *itemName = ui->tableWidgetIncrement->item(row, 0);
data->RemoveIncrementTableRow(itemName->text());
- qint64 id = qvariant_cast(item->data(Qt::UserRole));
+ quint32 id = qvariant_cast(item->data(Qt::UserRole));
QDomElement domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
@@ -384,7 +384,7 @@ void DialogIncrements::clickedToolButtonRemove()
emit haveLiteChange();
}
-void DialogIncrements::AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, qreal kgrowth,
+void DialogIncrements::AddIncrementToFile(quint32 id, QString name, qreal base, qreal ksize, qreal kgrowth,
QString description)
{
QDomNodeList list = doc->elementsByTagName("increments");
@@ -421,14 +421,14 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
{
QTableWidgetItem *item = 0;
QTableWidgetItem *itemName = 0;
- qint64 id;
+ quint32 id;
QDomElement domElement;
this->row = row;
switch (column)
{
case 0:
item = ui->tableWidgetIncrement->item(row, 0);
- id = qvariant_cast(item->data(Qt::UserRole));
+ id = qvariant_cast(item->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
@@ -442,7 +442,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
case 2:
itemName = ui->tableWidgetIncrement->item(row, 0);
item = ui->tableWidgetIncrement->item(row, column);
- id = qvariant_cast(itemName->data(Qt::UserRole));
+ id = qvariant_cast(itemName->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
@@ -464,7 +464,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
case 3:
itemName = ui->tableWidgetIncrement->item(row, 0);
item = ui->tableWidgetIncrement->item(row, column);
- id = qvariant_cast(itemName->data(Qt::UserRole));
+ id = qvariant_cast(itemName->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
@@ -477,7 +477,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
case 4:
itemName = ui->tableWidgetIncrement->item(row, 0);
item = ui->tableWidgetIncrement->item(row, column);
- id = qvariant_cast(itemName->data(Qt::UserRole));
+ id = qvariant_cast(itemName->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
@@ -490,7 +490,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
case 5:
itemName = ui->tableWidgetIncrement->item(row, 0);
item = ui->tableWidgetIncrement->item(row, column);
- id = qvariant_cast(itemName->data(Qt::UserRole));
+ id = qvariant_cast(itemName->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
diff --git a/src/dialogs/app/dialogincrements.h b/src/dialogs/app/dialogincrements.h
index 85e13eba7..7ed6977b3 100644
--- a/src/dialogs/app/dialogincrements.h
+++ b/src/dialogs/app/dialogincrements.h
@@ -133,7 +133,7 @@ private:
* @param kgrowth increment in growths
* @param description description of increment
*/
- void AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, qreal kgrowth,
+ void AddIncrementToFile(quint32 id, QString name, qreal base, qreal ksize, qreal kgrowth,
QString description);
};
diff --git a/src/dialogs/tools/dialogalongline.cpp b/src/dialogs/tools/dialogalongline.cpp
index f7d1f21ee..26e72d9e9 100644
--- a/src/dialogs/tools/dialogalongline.cpp
+++ b/src/dialogs/tools/dialogalongline.cpp
@@ -81,7 +81,7 @@ DialogAlongLine::~DialogAlongLine()
delete ui;
}
-void DialogAlongLine::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogAlongLine::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -124,12 +124,12 @@ void DialogAlongLine::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogAlongLine::setSecondPointId(const qint64 &value, const qint64 &id)
+void DialogAlongLine::setSecondPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
-void DialogAlongLine::setFirstPointId(const qint64 &value, const qint64 &id)
+void DialogAlongLine::setFirstPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
}
diff --git a/src/dialogs/tools/dialogalongline.h b/src/dialogs/tools/dialogalongline.h
index 33acbc715..33dceade7 100644
--- a/src/dialogs/tools/dialogalongline.h
+++ b/src/dialogs/tools/dialogalongline.h
@@ -84,31 +84,31 @@ public:
* @brief getFirstPointId return id first point of line
* @return id
*/
- inline qint64 getFirstPointId() const {return firstPointId;}
+ inline quint32 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);
+ void setFirstPointId(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPointId return id second point of line
* @return id
*/
- inline qint64 getSecondPointId() const {return secondPointId;}
+ inline quint32 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);
+ void setSecondPointId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -138,11 +138,11 @@ private:
/**
* @brief firstPointId id first point of line
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second point of line
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // DIALOGALONGLINE_H
diff --git a/src/dialogs/tools/dialogarc.cpp b/src/dialogs/tools/dialogarc.cpp
index 5056dc055..de4898881 100644
--- a/src/dialogs/tools/dialogarc.cpp
+++ b/src/dialogs/tools/dialogarc.cpp
@@ -94,7 +94,7 @@ DialogArc::~DialogArc()
delete ui;
}
-void DialogArc::SetCenter(const qint64 &value)
+void DialogArc::SetCenter(const quint32 &value)
{
center = value;
ChangeCurrentData(ui->comboBoxBasePoint, center);
@@ -118,7 +118,7 @@ void DialogArc::SetRadius(const QString &value)
ui->lineEditRadius->setText(radius);
}
-void DialogArc::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogArc::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
diff --git a/src/dialogs/tools/dialogarc.h b/src/dialogs/tools/dialogarc.h
index d472ad928..f712ffc19 100644
--- a/src/dialogs/tools/dialogarc.h
+++ b/src/dialogs/tools/dialogarc.h
@@ -54,12 +54,12 @@ public:
* @brief GetCenter return id of center point
* @return id id
*/
- inline qint64 GetCenter() const {return center;}
+ inline quint32 GetCenter() const {return center;}
/**
* @brief SetCenter set id of center point
* @param value id
*/
- void SetCenter(const qint64 &value);
+ void SetCenter(const quint32 &value);
/**
* @brief GetRadius return formula of radius
* @return formula
@@ -96,7 +96,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -172,7 +172,7 @@ private:
/**
* @brief center id of center point
*/
- qint64 center;
+ quint32 center;
/**
* @brief radius formula of radius
*/
diff --git a/src/dialogs/tools/dialogbisector.cpp b/src/dialogs/tools/dialogbisector.cpp
index 50500f263..f0a4e1045 100644
--- a/src/dialogs/tools/dialogbisector.cpp
+++ b/src/dialogs/tools/dialogbisector.cpp
@@ -82,7 +82,7 @@ DialogBisector::~DialogBisector()
delete ui;
}
-void DialogBisector::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogBisector::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -144,17 +144,17 @@ void DialogBisector::setFormula(const QString &value)
ui->lineEditFormula->setText(formula);
}
-void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id)
+void DialogBisector::setFirstPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
}
-void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id)
+void DialogBisector::setSecondPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
-void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id)
+void DialogBisector::setThirdPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxThirdPoint, thirdPointId, value, id);
}
diff --git a/src/dialogs/tools/dialogbisector.h b/src/dialogs/tools/dialogbisector.h
index ec4168754..f93466e1e 100644
--- a/src/dialogs/tools/dialogbisector.h
+++ b/src/dialogs/tools/dialogbisector.h
@@ -84,42 +84,42 @@ public:
* @brief getFirstPointId return id of first point
* @return id
*/
- inline qint64 getFirstPointId() const {return firstPointId;}
+ inline quint32 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);
+ void setFirstPointId(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPointId return id of second point
* @return id
*/
- inline qint64 getSecondPointId() const {return secondPointId;}
+ inline quint32 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);
+ void setSecondPointId(const quint32 &value, const quint32 &id);
/**
* @brief getThirdPointId return id of third point
* @return id
*/
- inline qint64 getThirdPointId() const {return thirdPointId;}
+ inline quint32 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);
+ void setThirdPointId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -149,15 +149,15 @@ private:
/**
* @brief firstPointId id of first point
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id of second point
*/
- qint64 secondPointId;
+ quint32 secondPointId;
/**
* @brief thirdPointId id of third point
*/
- qint64 thirdPointId;
+ quint32 thirdPointId;
};
#endif // DIALOGBISECTOR_H
diff --git a/src/dialogs/tools/dialogcutarc.cpp b/src/dialogs/tools/dialogcutarc.cpp
index 71d9c919a..af9c00b46 100644
--- a/src/dialogs/tools/dialogcutarc.cpp
+++ b/src/dialogs/tools/dialogcutarc.cpp
@@ -76,7 +76,7 @@ DialogCutArc::~DialogCutArc()
delete ui;
}
-void DialogCutArc::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogCutArc::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Arc)
{
@@ -95,7 +95,7 @@ void DialogCutArc::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogCutArc::setArcId(const qint64 &value, const qint64 &id)
+void DialogCutArc::setArcId(const quint32 &value, const quint32 &id)
{
setCurrentArcId(ui->comboBoxArc, arcId, value, id, ComboMode::CutArc);
}
diff --git a/src/dialogs/tools/dialogcutarc.h b/src/dialogs/tools/dialogcutarc.h
index 0baf2dcbc..4e296c416 100644
--- a/src/dialogs/tools/dialogcutarc.h
+++ b/src/dialogs/tools/dialogcutarc.h
@@ -74,20 +74,20 @@ public:
* @brief getArcId return id of arc
* @return id
*/
- qint64 getArcId() const {return arcId;}
+ quint32 getArcId() const {return arcId;}
/**
* @brief setArcId set id of arc
* @param value id
* @param id don't show this id in list
*/
- void setArcId(const qint64 &value, const qint64 &id);
+ void setArcId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -109,7 +109,7 @@ private:
/**
* @brief arcId keep id of arc
*/
- qint64 arcId;
+ quint32 arcId;
};
#endif // DIALOGCUTARC_H
diff --git a/src/dialogs/tools/dialogcutspline.cpp b/src/dialogs/tools/dialogcutspline.cpp
index 988faea7e..33dc8b931 100644
--- a/src/dialogs/tools/dialogcutspline.cpp
+++ b/src/dialogs/tools/dialogcutspline.cpp
@@ -88,12 +88,12 @@ void DialogCutSpline::setFormula(const QString &value)
ui->lineEditFormula->setText(formula);
}
-void DialogCutSpline::setSplineId(const qint64 &value, const qint64 &id)
+void DialogCutSpline::setSplineId(const quint32 &value, const quint32 &id)
{
setCurrentSplineId(ui->comboBoxSpline, splineId, value, id, ComboMode::CutSpline);
}
-void DialogCutSpline::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogCutSpline::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Spline)
{
diff --git a/src/dialogs/tools/dialogcutspline.h b/src/dialogs/tools/dialogcutspline.h
index 17d6f6bae..c429eeb73 100644
--- a/src/dialogs/tools/dialogcutspline.h
+++ b/src/dialogs/tools/dialogcutspline.h
@@ -74,20 +74,20 @@ public:
* @brief getSplineId return id base point of line
* @return id
*/
- inline qint64 getSplineId() const {return splineId;}
+ inline quint32 getSplineId() const {return splineId;}
/**
* @brief setSplineId set id spline
* @param value id
* @param id don't show this id in list
*/
- void setSplineId(const qint64 &value, const qint64 &id);
+ void setSplineId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -109,7 +109,7 @@ private:
/**
* @brief splineId keep id of spline
*/
- qint64 splineId;
+ quint32 splineId;
};
#endif // DIALOGCUTSPLINE_H
diff --git a/src/dialogs/tools/dialogcutsplinepath.cpp b/src/dialogs/tools/dialogcutsplinepath.cpp
index 561b47f5c..12f92a2bc 100644
--- a/src/dialogs/tools/dialogcutsplinepath.cpp
+++ b/src/dialogs/tools/dialogcutsplinepath.cpp
@@ -89,12 +89,12 @@ void DialogCutSplinePath::setFormula(const QString &value)
ui->lineEditFormula->setText(formula);
}
-void DialogCutSplinePath::setSplinePathId(const qint64 &value, const qint64 &id)
+void DialogCutSplinePath::setSplinePathId(const quint32 &value, const quint32 &id)
{
setCurrentSplinePathId(ui->comboBoxSplinePath, splinePathId, value, id, ComboMode::CutSpline);
}
-void DialogCutSplinePath::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogCutSplinePath::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::SplinePath)
{
diff --git a/src/dialogs/tools/dialogcutsplinepath.h b/src/dialogs/tools/dialogcutsplinepath.h
index b4dadc0b1..6c19e15bb 100644
--- a/src/dialogs/tools/dialogcutsplinepath.h
+++ b/src/dialogs/tools/dialogcutsplinepath.h
@@ -74,20 +74,20 @@ public:
* @brief getSplineId return id base point of line
* @return id
*/
- inline qint64 getSplinePathId() const {return splinePathId;}
+ inline quint32 getSplinePathId() const {return splinePathId;}
/**
* @brief setSplineId set id spline
* @param value id
* @param id don't show this id in list
*/
- void setSplinePathId(const qint64 &value, const qint64 &id);
+ void setSplinePathId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -109,7 +109,7 @@ private:
/**
* @brief splinePathId keep id of splinePath
*/
- qint64 splinePathId;
+ quint32 splinePathId;
};
#endif // DIALOGCUTSPLINEPATH_H
diff --git a/src/dialogs/tools/dialogdetail.cpp b/src/dialogs/tools/dialogdetail.cpp
index a465d7764..57b1ec48a 100644
--- a/src/dialogs/tools/dialogdetail.cpp
+++ b/src/dialogs/tools/dialogdetail.cpp
@@ -60,7 +60,7 @@ DialogDetail::DialogDetail(const VContainer *data, QWidget *parent)
connect(ui.toolButtonDelete, &QToolButton::clicked, this, &DialogDetail::DeleteItem);
}
-void DialogDetail::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogDetail::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type != Scene::Line && type != Scene::Detail)
{
@@ -103,7 +103,7 @@ void DialogDetail::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const NodeDetail::NodeDetails &typeNode, qreal mx,
+void DialogDetail::NewItem(quint32 id, const Tool::Tools &typeTool, const NodeDetail::NodeDetails &typeNode, qreal mx,
qreal my)
{
QString name;
diff --git a/src/dialogs/tools/dialogdetail.h b/src/dialogs/tools/dialogdetail.h
index c02c41940..0ddd2a653 100644
--- a/src/dialogs/tools/dialogdetail.h
+++ b/src/dialogs/tools/dialogdetail.h
@@ -61,7 +61,7 @@ public slots:
* @param id id of objects (points, arcs, splines, spline paths)
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -121,7 +121,7 @@ private:
* @param mx offset respect to x
* @param my offset respect to y
*/
- void NewItem(qint64 id, const Tool::Tools &typeTool, const NodeDetail::NodeDetails &typeNode,
+ void NewItem(quint32 id, const Tool::Tools &typeTool, const NodeDetail::NodeDetails &typeNode,
qreal mx = 0, qreal my = 0);
};
diff --git a/src/dialogs/tools/dialogendline.cpp b/src/dialogs/tools/dialogendline.cpp
index ba0834eb4..359083d19 100644
--- a/src/dialogs/tools/dialogendline.cpp
+++ b/src/dialogs/tools/dialogendline.cpp
@@ -93,7 +93,7 @@ DialogEndLine::DialogEndLine(const VContainer *data, QWidget *parent)
connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogEndLine::FormulaChanged);
}
-void DialogEndLine::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogEndLine::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -128,7 +128,7 @@ void DialogEndLine::setAngle(const qreal &value)
ui->doubleSpinBoxAngle->setValue(angle);
}
-void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id)
+void DialogEndLine::setBasePointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
}
diff --git a/src/dialogs/tools/dialogendline.h b/src/dialogs/tools/dialogendline.h
index 34cadbaf5..4426170d8 100644
--- a/src/dialogs/tools/dialogendline.h
+++ b/src/dialogs/tools/dialogendline.h
@@ -94,20 +94,20 @@ public:
* @brief getBasePointId return id base point of line
* @return id
*/
- inline qint64 getBasePointId() const {return basePointId;}
+ inline quint32 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);
+ void setBasePointId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -137,7 +137,7 @@ private:
/**
* @brief basePointId id base point of line
*/
- qint64 basePointId;
+ quint32 basePointId;
};
#endif // DIALOGENDLINE_H
diff --git a/src/dialogs/tools/dialogheight.cpp b/src/dialogs/tools/dialogheight.cpp
index 184cf725d..8c5339aaf 100644
--- a/src/dialogs/tools/dialogheight.cpp
+++ b/src/dialogs/tools/dialogheight.cpp
@@ -68,25 +68,25 @@ void DialogHeight::setTypeLine(const QString &value)
SetupTypeLine(ui->comboBoxLineType, value);
}
-void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id)
+void DialogHeight::setBasePointId(const quint32 &value, const quint32 &id)
{
basePointId = value;
setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
}
-void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id)
+void DialogHeight::setP1LineId(const quint32 &value, const quint32 &id)
{
p1LineId = value;
setCurrentPointId(ui->comboBoxP1Line, p1LineId, value, id);
}
-void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id)
+void DialogHeight::setP2LineId(const quint32 &value, const quint32 &id)
{
p2LineId = value;
setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id);
}
-void DialogHeight::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogHeight::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
diff --git a/src/dialogs/tools/dialogheight.h b/src/dialogs/tools/dialogheight.h
index 4074ba80e..f767c6205 100644
--- a/src/dialogs/tools/dialogheight.h
+++ b/src/dialogs/tools/dialogheight.h
@@ -74,42 +74,42 @@ public:
* @brief getBasePointId return id base point of height
* @return id
*/
- inline qint64 getBasePointId() const {return basePointId;}
+ inline quint32 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);
+ void setBasePointId(const quint32 &value, const quint32 &id);
/**
* @brief getP1LineId return id first point of line
* @return id id
*/
- inline qint64 getP1LineId() const {return p1LineId;}
+ inline quint32 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);
+ void setP1LineId(const quint32 &value, const quint32 &id);
/**
* @brief getP2LineId return id second point of line
* @return id
*/
- inline qint64 getP2LineId() const{return p2LineId;}
+ inline quint32 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);
+ void setP2LineId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -135,15 +135,15 @@ private:
/**
* @brief basePointId id base point of height
*/
- qint64 basePointId;
+ quint32 basePointId;
/**
* @brief p1LineId id first point of line
*/
- qint64 p1LineId;
+ quint32 p1LineId;
/**
* @brief p2LineId id second point of line
*/
- qint64 p2LineId;
+ quint32 p2LineId;
};
#endif // DIALOGHEIGHT_H
diff --git a/src/dialogs/tools/dialogline.cpp b/src/dialogs/tools/dialogline.cpp
index ccbb31eb8..4433856c3 100644
--- a/src/dialogs/tools/dialogline.cpp
+++ b/src/dialogs/tools/dialogline.cpp
@@ -52,7 +52,7 @@ DialogLine::~DialogLine()
delete ui;
}
-void DialogLine::setSecondPoint(const qint64 &value)
+void DialogLine::setSecondPoint(const quint32 &value)
{
secondPoint = value;
const VPointF *point = data->GeometricObject(value);
@@ -69,7 +69,7 @@ void DialogLine::setTypeLine(const QString &value)
SetupTypeLine(ui->comboBoxLineType, value);
}
-void DialogLine::setFirstPoint(const qint64 &value)
+void DialogLine::setFirstPoint(const quint32 &value)
{
firstPoint = value;
const VPointF *point = data->GeometricObject(value);
@@ -84,14 +84,14 @@ void DialogLine::setFirstPoint(const qint64 &value)
void DialogLine::DialogAccepted()
{
qint32 index = ui->comboBoxFirstPoint->currentIndex();
- firstPoint = qvariant_cast(ui->comboBoxFirstPoint->itemData(index));
+ firstPoint = qvariant_cast(ui->comboBoxFirstPoint->itemData(index));
index = ui->comboBoxSecondPoint->currentIndex();
- secondPoint = qvariant_cast(ui->comboBoxSecondPoint->itemData(index));
+ secondPoint = qvariant_cast(ui->comboBoxSecondPoint->itemData(index));
typeLine = GetTypeLine(ui->comboBoxLineType);
DialogClosed(QDialog::Accepted);
}
-void DialogLine::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogLine::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
diff --git a/src/dialogs/tools/dialogline.h b/src/dialogs/tools/dialogline.h
index 1ec7d59a3..f5b400379 100644
--- a/src/dialogs/tools/dialogline.h
+++ b/src/dialogs/tools/dialogline.h
@@ -54,22 +54,22 @@ public:
* @brief getFirstPoint return id first point
* @return id
*/
- inline qint64 getFirstPoint() const {return firstPoint;}
+ inline quint32 getFirstPoint() const {return firstPoint;}
/**
* @brief setFirstPoint set id first point
* @param value id
*/
- void setFirstPoint(const qint64 &value);
+ void setFirstPoint(const quint32 &value);
/**
* @brief getSecondPoint return id second point
* @return id
*/
- inline qint64 getSecondPoint() const {return secondPoint;}
+ inline quint32 getSecondPoint() const {return secondPoint;}
/**
* @brief setSecondPoint set id second point
* @param value id
*/
- void setSecondPoint(const qint64 &value);
+ void setSecondPoint(const quint32 &value);
/**
* @brief getTypeLine return type of line
* @return type
@@ -86,7 +86,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -104,11 +104,11 @@ private:
/**
* @brief firstPoint id first point
*/
- qint64 firstPoint;
+ quint32 firstPoint;
/**
* @brief secondPoint id second point
*/
- qint64 secondPoint;
+ quint32 secondPoint;
/**
* @brief typeLine type of line
*/
diff --git a/src/dialogs/tools/dialoglineintersect.cpp b/src/dialogs/tools/dialoglineintersect.cpp
index 4950225f2..31a04adbc 100644
--- a/src/dialogs/tools/dialoglineintersect.cpp
+++ b/src/dialogs/tools/dialoglineintersect.cpp
@@ -57,7 +57,7 @@ DialogLineIntersect::~DialogLineIntersect()
delete ui;
}
-void DialogLineIntersect::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogLineIntersect::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -142,28 +142,28 @@ void DialogLineIntersect::DialogAccepted()
void DialogLineIntersect::P1Line1Changed( int index)
{
- p1Line1 = qvariant_cast(ui->comboBoxP1Line1->itemData(index));
+ p1Line1 = qvariant_cast(ui->comboBoxP1Line1->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P2Line1Changed(int index)
{
- p2Line1 = qvariant_cast(ui->comboBoxP2Line1->itemData(index));
+ p2Line1 = qvariant_cast(ui->comboBoxP2Line1->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P1Line2Changed(int index)
{
- p1Line2 = qvariant_cast(ui->comboBoxP1Line2->itemData(index));
+ p1Line2 = qvariant_cast(ui->comboBoxP1Line2->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P2Line2Changed(int index)
{
- p2Line2 = qvariant_cast(ui->comboBoxP2Line2->itemData(index));
+ p2Line2 = qvariant_cast(ui->comboBoxP2Line2->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
@@ -195,25 +195,25 @@ bool DialogLineIntersect::CheckIntersecion()
}
}
-void DialogLineIntersect::setP2Line2(const qint64 &value)
+void DialogLineIntersect::setP2Line2(const quint32 &value)
{
p2Line2 = value;
ChangeCurrentData(ui->comboBoxP2Line2, value);
}
-void DialogLineIntersect::setP1Line2(const qint64 &value)
+void DialogLineIntersect::setP1Line2(const quint32 &value)
{
p1Line2 = value;
ChangeCurrentData(ui->comboBoxP1Line2, value);
}
-void DialogLineIntersect::setP2Line1(const qint64 &value)
+void DialogLineIntersect::setP2Line1(const quint32 &value)
{
p2Line1 = value;
ChangeCurrentData(ui->comboBoxP2Line1, value);
}
-void DialogLineIntersect::setP1Line1(const qint64 &value)
+void DialogLineIntersect::setP1Line1(const quint32 &value)
{
p1Line1 = value;
ChangeCurrentData(ui->comboBoxP1Line1, value);
diff --git a/src/dialogs/tools/dialoglineintersect.h b/src/dialogs/tools/dialoglineintersect.h
index 49871348c..bfc0c0888 100644
--- a/src/dialogs/tools/dialoglineintersect.h
+++ b/src/dialogs/tools/dialoglineintersect.h
@@ -54,42 +54,42 @@ public:
* @brief getP1Line1 return id first point of first line
* @return id
*/
- inline qint64 getP1Line1() const {return p1Line1;}
+ inline quint32 getP1Line1() const {return p1Line1;}
/**
* @brief setP1Line1 set id first point of first line
* @param value id
*/
- void setP1Line1(const qint64 &value);
+ void setP1Line1(const quint32 &value);
/**
* @brief getP2Line1 return id second point of first line
* @return id
*/
- inline qint64 getP2Line1() const {return p2Line1;}
+ inline quint32 getP2Line1() const {return p2Line1;}
/**
* @brief setP2Line1 set id second point of first line
* @param value id
*/
- void setP2Line1(const qint64 &value);
+ void setP2Line1(const quint32 &value);
/**
* @brief getP1Line2 return id first point of second line
* @return id
*/
- inline qint64 getP1Line2() const {return p1Line2;}
+ inline quint32 getP1Line2() const {return p1Line2;}
/**
* @brief setP1Line2 set id first point of second line
* @param value id
*/
- void setP1Line2(const qint64 &value);
+ void setP1Line2(const quint32 &value);
/**
* @brief getP2Line2 return id second point of second line
* @return id
*/
- inline qint64 getP2Line2() const {return p2Line2;}
+ inline quint32 getP2Line2() const {return p2Line2;}
/**
* @brief setP2Line2 set id second point of second line
* @param value id
*/
- void setP2Line2(const qint64 &value);
+ void setP2Line2(const quint32 &value);
/**
* @brief getPointName return name of point
* @return
@@ -106,7 +106,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -148,19 +148,19 @@ private:
/**
* @brief p1Line1 id first point of first line
*/
- qint64 p1Line1;
+ quint32 p1Line1;
/**
* @brief p2Line1 id second point of first line
*/
- qint64 p2Line1;
+ quint32 p2Line1;
/**
* @brief p1Line2 id first point of second line
*/
- qint64 p1Line2;
+ quint32 p1Line2;
/**
* @brief p2Line2 id second point of second line
*/
- qint64 p2Line2;
+ quint32 p2Line2;
/**
* @brief flagPoint keep state of point
*/
diff --git a/src/dialogs/tools/dialognormal.cpp b/src/dialogs/tools/dialognormal.cpp
index 70e9c1aed..99ea9f05f 100644
--- a/src/dialogs/tools/dialognormal.cpp
+++ b/src/dialogs/tools/dialognormal.cpp
@@ -98,7 +98,7 @@ DialogNormal::~DialogNormal()
delete ui;
}
-void DialogNormal::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogNormal::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -142,12 +142,12 @@ void DialogNormal::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogNormal::setSecondPointId(const qint64 &value, const qint64 &id)
+void DialogNormal::setSecondPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
-void DialogNormal::setFirstPointId(const qint64 &value, const qint64 &id)
+void DialogNormal::setFirstPointId(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
}
diff --git a/src/dialogs/tools/dialognormal.h b/src/dialogs/tools/dialognormal.h
index 556a8b9a2..5bf0459b5 100644
--- a/src/dialogs/tools/dialognormal.h
+++ b/src/dialogs/tools/dialognormal.h
@@ -94,31 +94,31 @@ public:
* @brief getFirstPointId return id of first point
* @return id
*/
- inline qint64 getFirstPointId() const {return firstPointId;}
+ inline quint32 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);
+ void setFirstPointId(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPointId return id of second point
* @return id
*/
- inline qint64 getSecondPointId() const {return secondPointId;}
+ inline quint32 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);
+ void setSecondPointId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -152,11 +152,11 @@ private:
/**
* @brief firstPointId id first point of line
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second point of line
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // DIALOGNORMAL_H
diff --git a/src/dialogs/tools/dialogpointofcontact.cpp b/src/dialogs/tools/dialogpointofcontact.cpp
index 2f8374a2a..b66dfe4fd 100644
--- a/src/dialogs/tools/dialogpointofcontact.cpp
+++ b/src/dialogs/tools/dialogpointofcontact.cpp
@@ -75,7 +75,7 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, QWidget *pare
connect(ui.lineEditFormula, &QLineEdit::textChanged, this, &DialogPointOfContact::FormulaChanged);
}
-void DialogPointOfContact::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogPointOfContact::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -129,17 +129,17 @@ void DialogPointOfContact::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id)
+void DialogPointOfContact::setSecondPoint(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui.comboBoxSecondPoint, secondPoint, value, id);
}
-void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id)
+void DialogPointOfContact::setFirstPoint(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui.comboBoxFirstPoint, firstPoint, value, id);
}
-void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id)
+void DialogPointOfContact::setCenter(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui.comboBoxCenter, center, value, id);
center = value;
diff --git a/src/dialogs/tools/dialogpointofcontact.h b/src/dialogs/tools/dialogpointofcontact.h
index d5a610c30..75a2d6a13 100644
--- a/src/dialogs/tools/dialogpointofcontact.h
+++ b/src/dialogs/tools/dialogpointofcontact.h
@@ -69,42 +69,42 @@ public:
* @brief GetCenter return id of center point
* @return id
*/
- inline qint64 getCenter() const {return center;}
+ inline quint32 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);
+ void setCenter(const quint32 &value, const quint32 &id);
/**
* @brief getFirstPoint return id first point
* @return id
*/
- inline qint64 getFirstPoint() const {return firstPoint;}
+ inline quint32 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);
+ void setFirstPoint(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPoint return id second point
* @return id
*/
- inline qint64 getSecondPoint() const {return secondPoint;}
+ inline quint32 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);
+ void setSecondPoint(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -130,15 +130,15 @@ private:
/**
* @brief center id center point of arc
*/
- qint64 center;
+ quint32 center;
/**
* @brief firstPoint id first point of line
*/
- qint64 firstPoint;
+ quint32 firstPoint;
/**
* @brief secondPoint id second point of line
*/
- qint64 secondPoint;
+ quint32 secondPoint;
};
#endif // DIALOGPOINTOFCONTACT_H
diff --git a/src/dialogs/tools/dialogpointofintersection.cpp b/src/dialogs/tools/dialogpointofintersection.cpp
index 0ec306a6e..b7faaa0a2 100644
--- a/src/dialogs/tools/dialogpointofintersection.cpp
+++ b/src/dialogs/tools/dialogpointofintersection.cpp
@@ -55,13 +55,13 @@ DialogPointOfIntersection::~DialogPointOfIntersection()
delete ui;
}
-void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint64 &id)
+void DialogPointOfIntersection::setSecondPointId(const quint32 &value, const quint32 &id)
{
secondPointId = value;
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
-void DialogPointOfIntersection::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogPointOfIntersection::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -102,7 +102,7 @@ void DialogPointOfIntersection::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogPointOfIntersection::setFirstPointId(const qint64 &value, const qint64 &id)
+void DialogPointOfIntersection::setFirstPointId(const quint32 &value, const quint32 &id)
{
firstPointId = value;
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
diff --git a/src/dialogs/tools/dialogpointofintersection.h b/src/dialogs/tools/dialogpointofintersection.h
index 4a184a544..6798bd3ca 100644
--- a/src/dialogs/tools/dialogpointofintersection.h
+++ b/src/dialogs/tools/dialogpointofintersection.h
@@ -64,31 +64,31 @@ public:
* @brief getFirstPointId return id of first point
* @return id
*/
- inline qint64 getFirstPointId() const {return firstPointId;}
+ inline quint32 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);
+ void setFirstPointId(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPointId return id of second point
* @return id
*/
- inline qint64 getSecondPointId() const {return secondPointId;}
+ inline quint32 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);
+ void setSecondPointId(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -110,11 +110,11 @@ private:
/**
* @brief firstPointId id first point of line
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second point of line
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // DIALOGPOINTOFINTERSECTION_H
diff --git a/src/dialogs/tools/dialogshoulderpoint.cpp b/src/dialogs/tools/dialogshoulderpoint.cpp
index ddf25d596..4a0500ba6 100644
--- a/src/dialogs/tools/dialogshoulderpoint.cpp
+++ b/src/dialogs/tools/dialogshoulderpoint.cpp
@@ -83,7 +83,7 @@ DialogShoulderPoint::~DialogShoulderPoint()
delete ui;
}
-void DialogShoulderPoint::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogShoulderPoint::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -138,17 +138,17 @@ void DialogShoulderPoint::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-void DialogShoulderPoint::setPShoulder(const qint64 &value, const qint64 &id)
+void DialogShoulderPoint::setPShoulder(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxPShoulder, pShoulder, value, id);
}
-void DialogShoulderPoint::setP2Line(const qint64 &value, const qint64 &id)
+void DialogShoulderPoint::setP2Line(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxP2Line, p2Line, value, id);
}
-void DialogShoulderPoint::setP1Line(const qint64 &value, const qint64 &id)
+void DialogShoulderPoint::setP1Line(const quint32 &value, const quint32 &id)
{
setCurrentPointId(ui->comboBoxP1Line, p1Line, value, id);
}
diff --git a/src/dialogs/tools/dialogshoulderpoint.h b/src/dialogs/tools/dialogshoulderpoint.h
index 790aba904..c456ebc68 100644
--- a/src/dialogs/tools/dialogshoulderpoint.h
+++ b/src/dialogs/tools/dialogshoulderpoint.h
@@ -84,42 +84,42 @@ public:
* @brief getP1Line return id first point of line
* @return id
*/
- inline qint64 getP1Line() const {return p1Line;}
+ inline quint32 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);
+ void setP1Line(const quint32 &value, const quint32 &id);
/**
* @brief getP2Line return id second point of line
* @return id
*/
- inline qint64 getP2Line() const {return p2Line;}
+ inline quint32 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);
+ void setP2Line(const quint32 &value, const quint32 &id);
/**
* @brief getPShoulder return id shoulder point
* @return id
*/
- inline qint64 getPShoulder() const {return pShoulder;}
+ inline quint32 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);
+ void setPShoulder(const quint32 &value, const quint32 &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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -149,15 +149,15 @@ private:
/**
* @brief p1Line id first point of line
*/
- qint64 p1Line;
+ quint32 p1Line;
/**
* @brief p2Line id second point of line
*/
- qint64 p2Line;
+ quint32 p2Line;
/**
* @brief pShoulder id shoulder point
*/
- qint64 pShoulder;
+ quint32 pShoulder;
};
#endif // DIALOGSHOULDERPOINT_H
diff --git a/src/dialogs/tools/dialogspline.cpp b/src/dialogs/tools/dialogspline.cpp
index 88b1a8f19..a5fdef0f0 100644
--- a/src/dialogs/tools/dialogspline.cpp
+++ b/src/dialogs/tools/dialogspline.cpp
@@ -51,12 +51,12 @@ DialogSpline::~DialogSpline()
delete ui;
}
-qint64 DialogSpline::getP1() const
+quint32 DialogSpline::getP1() const
{
return p1;
}
-void DialogSpline::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogSpline::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -81,7 +81,7 @@ void DialogSpline::ChoosedObject(qint64 id, const Scene::Scenes &type)
number = 0;
emit ToolTip("");
index = ui->comboBoxP1->currentIndex();
- qint64 p1Id = qvariant_cast(ui->comboBoxP1->itemData(index));
+ quint32 p1Id = qvariant_cast(ui->comboBoxP1->itemData(index));
QPointF p1 = data->GeometricObject(p1Id)->toQPointF();
QPointF p4 = data->GeometricObject(id)->toQPointF();
@@ -139,19 +139,19 @@ void DialogSpline::setAngle1(const qreal &value)
ui->spinBoxAngle1->setValue(static_cast(value));
}
-void DialogSpline::setP4(const qint64 &value)
+void DialogSpline::setP4(const quint32 &value)
{
p4 = value;
ChangeCurrentData(ui->comboBoxP4, value);
}
-void DialogSpline::setP1(const qint64 &value)
+void DialogSpline::setP1(const quint32 &value)
{
p1 = value;
ChangeCurrentData(ui->comboBoxP1, value);
}
-qint64 DialogSpline::getP4() const
+quint32 DialogSpline::getP4() const
{
return p4;
}
diff --git a/src/dialogs/tools/dialogspline.h b/src/dialogs/tools/dialogspline.h
index f78b94bd5..281d28ea8 100644
--- a/src/dialogs/tools/dialogspline.h
+++ b/src/dialogs/tools/dialogspline.h
@@ -54,22 +54,22 @@ public:
* @brief getP1 return id first point of spline
* @return id
*/
- qint64 getP1() const;
+ quint32 getP1() const;
/**
* @brief setP1 set id first point of spline
* @param value id
*/
- void setP1(const qint64 &value);
+ void setP1(const quint32 &value);
/**
* @brief getP4 return id fourth point of spline
* @return id
*/
- qint64 getP4() const;
+ quint32 getP4() const;
/**
* @brief setP4 set id fourth point of spline
* @param value id
*/
- void setP4(const qint64 &value);
+ void setP4(const quint32 &value);
/**
* @brief getAngle1 return first angle of spline
* @return angle in degree
@@ -126,7 +126,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -144,11 +144,11 @@ private:
/**
* @brief p1 id first point of spline
*/
- qint64 p1;
+ quint32 p1;
/**
* @brief p4 id fourth point of spline
*/
- qint64 p4;
+ quint32 p4;
/**
* @brief angle1 first angle of spline in degree
*/
diff --git a/src/dialogs/tools/dialogsplinepath.cpp b/src/dialogs/tools/dialogsplinepath.cpp
index 7f80afc83..4abe04686 100644
--- a/src/dialogs/tools/dialogsplinepath.cpp
+++ b/src/dialogs/tools/dialogsplinepath.cpp
@@ -76,7 +76,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value)
}
-void DialogSplinePath::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogSplinePath::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -113,7 +113,7 @@ void DialogSplinePath::PointChanged(int row)
void DialogSplinePath::currentPointChanged(int index)
{
- qint64 id = qvariant_cast(ui->comboBoxPoint->itemData(index));
+ quint32 id = qvariant_cast(ui->comboBoxPoint->itemData(index));
qint32 row = ui->listWidget->currentRow();
QListWidgetItem *item = ui->listWidget->item( row );
VSplinePoint p = qvariant_cast(item->data(Qt::UserRole));
@@ -164,7 +164,7 @@ void DialogSplinePath::KAsm2Changed(qreal d)
item->setData(Qt::UserRole, QVariant::fromValue(p));
}
-void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2)
+void DialogSplinePath::NewItem(quint32 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2)
{
const VPointF *point = data->GeometricObject(id);
QListWidgetItem *item = new QListWidgetItem(point->name());
@@ -182,7 +182,7 @@ void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2
EnableFields();
}
-void DialogSplinePath::DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2)
+void DialogSplinePath::DataPoint(quint32 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2)
{
disconnect(ui->comboBoxPoint, static_cast(&QComboBox::currentIndexChanged),
this, &DialogSplinePath::currentPointChanged);
diff --git a/src/dialogs/tools/dialogsplinepath.h b/src/dialogs/tools/dialogsplinepath.h
index fe33e24d6..5d9ab2ec6 100644
--- a/src/dialogs/tools/dialogsplinepath.h
+++ b/src/dialogs/tools/dialogsplinepath.h
@@ -67,7 +67,7 @@ public slots:
* @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);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -120,7 +120,7 @@ private:
* @param kAsm2 second coefficient asymmetry
* @param angle2 second angle in degree
*/
- void NewItem(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
+ void NewItem(quint32 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
/**
* @brief dataPoint show data of point in fields
* @param id id
@@ -129,7 +129,7 @@ private:
* @param kAsm2 second coefficient asymmetry
* @param angle2 second angle of spline
*/
- void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
+ void DataPoint(quint32 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
/**
* @brief EnableFields enable or disable fields
*/
diff --git a/src/dialogs/tools/dialogtool.cpp b/src/dialogs/tools/dialogtool.cpp
index 1e721d7e5..353ef34f4 100644
--- a/src/dialogs/tools/dialogtool.cpp
+++ b/src/dialogs/tools/dialogtool.cpp
@@ -70,12 +70,12 @@ void DialogTool::showEvent(QShowEvent *event)
isInitialized = true;//first show windows are held
}
-void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const
+void DialogTool::FillComboBoxPoints(QComboBox *box, const quint32 &id) const
{
Q_CHECK_PTR(box);
- const QHash *objs = data->DataGObjects();
- QHashIterator i(*objs);
- QMap list;
+ const QHash *objs = data->DataGObjects();
+ QHashIterator i(*objs);
+ QMap list;
while (i.hasNext())
{
i.next();
@@ -92,12 +92,12 @@ void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const
FillList(box, list);
}
-void DialogTool::FillComboBoxArcs(QComboBox *box, const qint64 &id, ComboMode::ComboBoxCutArc cut) const
+void DialogTool::FillComboBoxArcs(QComboBox *box, const quint32 &id, ComboMode::ComboBoxCutArc cut) const
{
Q_CHECK_PTR(box);
- const QHash *objs = data->DataGObjects();
- QHashIterator i(*objs);
- QMap list;
+ const QHash *objs = data->DataGObjects();
+ QHashIterator i(*objs);
+ QMap list;
while (i.hasNext())
{
i.next();
@@ -129,12 +129,12 @@ void DialogTool::FillComboBoxArcs(QComboBox *box, const qint64 &id, ComboMode::C
FillList(box, list);
}
-void DialogTool::FillComboBoxSplines(QComboBox *box, const qint64 &id, ComboMode::ComboBoxCutSpline cut) const
+void DialogTool::FillComboBoxSplines(QComboBox *box, const quint32 &id, ComboMode::ComboBoxCutSpline cut) const
{
Q_CHECK_PTR(box);
- const QHash *objs = data->DataGObjects();
- QHashIterator i(*objs);
- QMap list;
+ const QHash *objs = data->DataGObjects();
+ QHashIterator i(*objs);
+ QMap list;
while (i.hasNext())
{
i.next();
@@ -166,12 +166,12 @@ void DialogTool::FillComboBoxSplines(QComboBox *box, const qint64 &id, ComboMode
FillList(box, list);
}
-void DialogTool::FillComboBoxSplinesPath(QComboBox *box, const qint64 &id, ComboMode::ComboBoxCutSpline cut) const
+void DialogTool::FillComboBoxSplinesPath(QComboBox *box, const quint32 &id, ComboMode::ComboBoxCutSpline cut) const
{
Q_CHECK_PTR(box);
- const QHash *objs = data->DataGObjects();
- QHashIterator i(*objs);
- QMap list;
+ const QHash *objs = data->DataGObjects();
+ QHashIterator i(*objs);
+ QMap list;
while (i.hasNext())
{
i.next();
@@ -261,7 +261,7 @@ void DialogTool::ChangeCurrentText(QComboBox *box, const QString &value)
}
}
-void DialogTool::ChangeCurrentData(QComboBox *box, const qint64 &value) const
+void DialogTool::ChangeCurrentData(QComboBox *box, const quint32 &value) const
{
qint32 index = box->findData(value);
if (index != -1)
@@ -333,7 +333,7 @@ void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label)
labelEditFormula->setPalette(palette);
}
-void DialogTool::setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const
+void DialogTool::setCurrentPointId(QComboBox *box, quint32 &pointId, const quint32 &value, const quint32 &id) const
{
Q_CHECK_PTR(box);
FillComboBoxPoints(box, id);
@@ -341,7 +341,7 @@ void DialogTool::setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64
ChangeCurrentData(box, value);
}
-void DialogTool::setCurrentSplineId(QComboBox *box, qint64 &splineId, const qint64 &value, const qint64 &id,
+void DialogTool::setCurrentSplineId(QComboBox *box, quint32 &splineId, const quint32 &value, const quint32 &id,
ComboMode::ComboBoxCutSpline cut) const
{
Q_CHECK_PTR(box);
@@ -350,7 +350,7 @@ void DialogTool::setCurrentSplineId(QComboBox *box, qint64 &splineId, const qint
ChangeCurrentData(box, value);
}
-void DialogTool::setCurrentArcId(QComboBox *box, qint64 &arcId, const qint64 &value, const qint64 &id,
+void DialogTool::setCurrentArcId(QComboBox *box, quint32 &arcId, const quint32 &value, const quint32 &id,
ComboMode::ComboBoxCutArc cut) const
{
Q_CHECK_PTR(box);
@@ -359,8 +359,8 @@ void DialogTool::setCurrentArcId(QComboBox *box, qint64 &arcId, const qint64 &va
ChangeCurrentData(box, value);
}
-void DialogTool::setCurrentSplinePathId(QComboBox *box, qint64 &splinePathId, const qint64 &value,
- const qint64 &id, ComboMode::ComboBoxCutSpline cut) const
+void DialogTool::setCurrentSplinePathId(QComboBox *box, quint32 &splinePathId, const quint32 &value,
+ const quint32 &id, ComboMode::ComboBoxCutSpline cut) const
{
Q_CHECK_PTR(box);
FillComboBoxSplinesPath(box, id, cut);
@@ -368,14 +368,14 @@ void DialogTool::setCurrentSplinePathId(QComboBox *box, qint64 &splinePathId, co
ChangeCurrentData(box, value);
}
-qint64 DialogTool::getCurrentObjectId(QComboBox *box) const
+quint32 DialogTool::getCurrentObjectId(QComboBox *box) const
{
Q_CHECK_PTR(box);
qint32 index = box->currentIndex();
Q_ASSERT(index != -1);
if (index != -1)
{
- return qvariant_cast(box->itemData(index));
+ return qvariant_cast(box->itemData(index));
}
else
{
@@ -383,12 +383,12 @@ qint64 DialogTool::getCurrentObjectId(QComboBox *box) const
}
}
-void DialogTool::FillList(QComboBox *box, const QMap &list) const
+void DialogTool::FillList(QComboBox *box, const QMap &list) const
{
Q_CHECK_PTR(box);
box->clear();
- QMapIterator iter(list);
+ QMapIterator iter(list);
while (iter.hasNext())
{
iter.next();
@@ -402,7 +402,7 @@ void DialogTool::CheckState()
bOk->setEnabled(flagFormula && flagName);
}
-void DialogTool::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogTool::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
Q_UNUSED(id);
Q_UNUSED(type);
diff --git a/src/dialogs/tools/dialogtool.h b/src/dialogs/tools/dialogtool.h
index 613dcdbac..4e1cf2079 100644
--- a/src/dialogs/tools/dialogtool.h
+++ b/src/dialogs/tools/dialogtool.h
@@ -82,7 +82,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief NamePointChanged check name of point
*/
@@ -274,8 +274,8 @@ protected:
* @param box comboBox
* @param id don't show this id in list
*/
- void FillComboBoxPoints(QComboBox *box, const qint64 &id = 0)const;
- void FillComboBoxArcs(QComboBox *box, const qint64 &id = 0,
+ void FillComboBoxPoints(QComboBox *box, const quint32 &id = 0)const;
+ void FillComboBoxArcs(QComboBox *box, const quint32 &id = 0,
ComboMode::ComboBoxCutArc cut = ComboMode::NoCutArc)const;
/**
* @brief FillComboBoxSplines fill comboBox list of splines
@@ -283,7 +283,7 @@ protected:
* @param id don't show id in list
* @param cut if set to ComboMode::CutSpline don't show id+1 and id+2
*/
- void FillComboBoxSplines(QComboBox *box, const qint64 &id = 0,
+ void FillComboBoxSplines(QComboBox *box, const quint32 &id = 0,
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline)const;
/**
* @brief FillComboBoxSplinesPath
@@ -291,7 +291,7 @@ protected:
* @param id don't show id in list
* @param cut if set to ComboMode::CutSpline don't show id+1 and id+2
*/
- void FillComboBoxSplinesPath(QComboBox *box, const qint64 &id = 0,
+ void FillComboBoxSplinesPath(QComboBox *box, const quint32 &id = 0,
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline)const;
/**
* @brief FillComboBoxTypeLine fill comboBox list of type lines
@@ -331,7 +331,7 @@ protected:
* @param box combobox
* @param value id of item
*/
- void ChangeCurrentData(QComboBox *box, const qint64 &value) const;
+ void ChangeCurrentData(QComboBox *box, const quint32 &value) const;
/**
* @brief PutValHere put variable into line edit from list
* @param lineEdit lineEdit
@@ -360,7 +360,7 @@ protected:
* @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;
+ void setCurrentPointId(QComboBox *box, quint32 &pointId, const quint32 &value, const quint32 &id) const;
/**
* @brief setCurrentSplineId set current spline id in combobox
* @param box combobox
@@ -369,7 +369,7 @@ protected:
* @param id don't show this id in list
* @param cut if set to ComboMode::CutSpline don't show id+1 and id+2
*/
- void setCurrentSplineId(QComboBox *box, qint64 &splineId, const qint64 &value, const qint64 &id,
+ void setCurrentSplineId(QComboBox *box, quint32 &splineId, const quint32 &value, const quint32 &id,
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline) const;
/**
* @brief setCurrentArcId
@@ -379,7 +379,7 @@ protected:
* @param id don't show this id in list
* @param cut if set to ComboMode::CutArc don't show id+1 and id+2
*/
- void setCurrentArcId(QComboBox *box, qint64 &arcId, const qint64 &value, const qint64 &id,
+ void setCurrentArcId(QComboBox *box, quint32 &arcId, const quint32 &value, const quint32 &id,
ComboMode::ComboBoxCutArc cut = ComboMode::NoCutArc) const;
/**
* @brief setCurrentSplinePathId set current splinePath id in combobox
@@ -389,21 +389,21 @@ protected:
* @param id don't show this id in list
* @param cut if set to ComboMode::CutSpline don't show id+1 and id+2
*/
- void setCurrentSplinePathId(QComboBox *box, qint64 &splinePathId, const qint64 &value, const qint64 &id,
+ void setCurrentSplinePathId(QComboBox *box, quint32 &splinePathId, const quint32 &value, const quint32 &id,
ComboMode::ComboBoxCutSpline cut = ComboMode::NoCutSpline) const;
/**
* @brief getCurrentPointId return current point id in combobox
* @param box combobox
* @return id or -1 if combobox is empty
*/
- qint64 getCurrentObjectId(QComboBox *box) const;
+ quint32 getCurrentObjectId(QComboBox *box) const;
private:
/**
* @brief FillList fill combobox list
* @param box combobox
* @param list list with ids and names
*/
- void FillList(QComboBox *box, const QMap &list)const;
+ void FillList(QComboBox *box, const QMap &list)const;
};
#endif // DIALOGTOOL_H
diff --git a/src/dialogs/tools/dialogtriangle.cpp b/src/dialogs/tools/dialogtriangle.cpp
index e4c1f63aa..b4ba5320e 100644
--- a/src/dialogs/tools/dialogtriangle.cpp
+++ b/src/dialogs/tools/dialogtriangle.cpp
@@ -57,7 +57,7 @@ DialogTriangle::~DialogTriangle()
delete ui;
}
-void DialogTriangle::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogTriangle::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (type == Scene::Point)
{
@@ -110,25 +110,25 @@ void DialogTriangle::setPointName(const QString &value)
ui->lineEditNamePoint->setText(pointName);
}
-void DialogTriangle::setSecondPointId(const qint64 &value, const qint64 &id)
+void DialogTriangle::setSecondPointId(const quint32 &value, const quint32 &id)
{
secondPointId = value;
setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id);
}
-void DialogTriangle::setFirstPointId(const qint64 &value, const qint64 &id)
+void DialogTriangle::setFirstPointId(const quint32 &value, const quint32 &id)
{
firstPointId = value;
setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id);
}
-void DialogTriangle::setAxisP2Id(const qint64 &value, const qint64 &id)
+void DialogTriangle::setAxisP2Id(const quint32 &value, const quint32 &id)
{
axisP2Id = value;
setCurrentPointId(ui->comboBoxAxisP2, axisP2Id, value, id);
}
-void DialogTriangle::setAxisP1Id(const qint64 &value, const qint64 &id)
+void DialogTriangle::setAxisP1Id(const quint32 &value, const quint32 &id)
{
axisP1Id = value;
setCurrentPointId(ui->comboBoxAxisP1, axisP1Id, value, id);
diff --git a/src/dialogs/tools/dialogtriangle.h b/src/dialogs/tools/dialogtriangle.h
index 0335aa9c4..964921d70 100644
--- a/src/dialogs/tools/dialogtriangle.h
+++ b/src/dialogs/tools/dialogtriangle.h
@@ -54,46 +54,46 @@ public:
* @brief getAxisP1Id return id first point of axis
* @return id
*/
- inline qint64 getAxisP1Id() const {return axisP1Id;}
+ inline quint32 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);
+ void setAxisP1Id(const quint32 &value, const quint32 &id);
/**
* @brief getAxisP2Id return id second point of axis
* @return id
*/
- inline qint64 getAxisP2Id() const {return axisP2Id;}
+ inline quint32 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);
+ void setAxisP2Id(const quint32 &value, const quint32 &id);
/**
* @brief getFirstPointId return id of first point
* @return id
*/
- inline qint64 getFirstPointId() const {return firstPointId;}
+ inline quint32 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);
+ void setFirstPointId(const quint32 &value, const quint32 &id);
/**
* @brief getSecondPointId return id of second point
* @return id
*/
- inline qint64 getSecondPointId() const {return secondPointId;}
+ inline quint32 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);
+ void setSecondPointId(const quint32 &value, const quint32 &id);
/**
* @brief getPointName return name of point
* @return name
@@ -110,7 +110,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- virtual void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ virtual void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -132,19 +132,19 @@ private:
/**
* @brief axisP1Id id first point of axis
*/
- qint64 axisP1Id;
+ quint32 axisP1Id;
/**
* @brief axisP2Id id second point of axis
*/
- qint64 axisP2Id;
+ quint32 axisP2Id;
/**
* @brief firstPointId id first point of line
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second point of line
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // DIALOGTRIANGLE_H
diff --git a/src/dialogs/tools/dialoguniondetails.cpp b/src/dialogs/tools/dialoguniondetails.cpp
index 9dac1278d..73c80a3f6 100644
--- a/src/dialogs/tools/dialoguniondetails.cpp
+++ b/src/dialogs/tools/dialoguniondetails.cpp
@@ -45,7 +45,7 @@ DialogUnionDetails::~DialogUnionDetails()
delete ui;
}
-void DialogUnionDetails::ChoosedObject(qint64 id, const Scene::Scenes &type)
+void DialogUnionDetails::ChoosedObject(quint32 id, const Scene::Scenes &type)
{
if (numberD == 0)
{
@@ -62,7 +62,7 @@ void DialogUnionDetails::DialogAccepted()
emit DialogClosed(QDialog::Accepted);
}
-bool DialogUnionDetails::CheckObject(const qint64 &id, const qint64 &idDetail) const
+bool DialogUnionDetails::CheckObject(const quint32 &id, const quint32 &idDetail) const
{
if (idDetail == 0)
{
@@ -72,7 +72,7 @@ bool DialogUnionDetails::CheckObject(const qint64 &id, const qint64 &idDetail) c
return det.Containes(id);
}
-void DialogUnionDetails::ChoosedDetail(const qint64 &id, const Scene::Scenes &type, qint64 &idDetail, ptrdiff_t &index)
+void DialogUnionDetails::ChoosedDetail(const quint32 &id, const Scene::Scenes &type, quint32 &idDetail, ptrdiff_t &index)
{
if (idDetail == 0)
{
diff --git a/src/dialogs/tools/dialoguniondetails.h b/src/dialogs/tools/dialoguniondetails.h
index ad94b45f4..c165436ab 100644
--- a/src/dialogs/tools/dialoguniondetails.h
+++ b/src/dialogs/tools/dialoguniondetails.h
@@ -54,12 +54,12 @@ public:
* @brief getD1 return id first detail
* @return id
*/
- inline qint64 getD1() const {return d1;}
+ inline quint32 getD1() const {return d1;}
/**
* @brief getD2 return id second detail
* @return id
*/
- inline qint64 getD2() const {return d2;}
+ inline quint32 getD2() const {return d2;}
/**
* @brief getIndexD1 return index edge first detail
* @return index
@@ -76,7 +76,7 @@ public slots:
* @param id id of point or detail
* @param type type of object
*/
- void ChoosedObject(qint64 id, const Scene::Scenes &type);
+ void ChoosedObject(quint32 id, const Scene::Scenes &type);
/**
* @brief DialogAccepted save data and emit signal about closed dialog.
*/
@@ -98,11 +98,11 @@ private:
/**
* @brief d1 id first detail
*/
- qint64 d1;
+ quint32 d1;
/**
* @brief d2 id second detail
*/
- qint64 d2;
+ quint32 d2;
/**
* @brief numberD number of detail, what we already have
*/
@@ -114,18 +114,18 @@ private:
/**
* @brief p1 id first point of detail
*/
- qint64 p1;
+ quint32 p1;
/**
* @brief p2 id second point of detail
*/
- qint64 p2;
+ quint32 p2;
/**
* @brief CheckObject check if detail contain this id
* @param id id of item
* @param idDetail detail id
* @return true if contain
*/
- bool CheckObject(const qint64 &id, const qint64 &idDetail) const;
+ bool CheckObject(const quint32 &id, const quint32 &idDetail) const;
/**
* @brief ChoosedDetail help save information about detail and points on detail
* @param id id selected object
@@ -133,7 +133,7 @@ private:
* @param idDetail id detail
* @param index index of edge
*/
- void ChoosedDetail(const qint64 &id, const Scene::Scenes &type, qint64 &idDetail, ptrdiff_t &index);
+ void ChoosedDetail(const quint32 &id, const Scene::Scenes &type, quint32 &idDetail, ptrdiff_t &index);
};
#endif // DIALOGUNIONDETAILS_H
diff --git a/src/exception/vexceptionbadid.h b/src/exception/vexceptionbadid.h
index 91a407c0c..587d74d7c 100644
--- a/src/exception/vexceptionbadid.h
+++ b/src/exception/vexceptionbadid.h
@@ -42,7 +42,7 @@ public:
* @param what string with error
* @param id id
*/
- VExceptionBadId(const QString &what, const qint64 &id)
+ VExceptionBadId(const QString &what, const quint32 &id)
:VException(what), id(id), key(QString()){}
/**
* @brief VExceptionBadId exception bad id
@@ -67,7 +67,7 @@ public:
* @brief BadId return bad id
* @return id
*/
- inline qint64 BadId() const {return id; }
+ inline quint32 BadId() const {return id; }
/**
* @brief BadKey return bad key
* @return key
@@ -77,7 +77,7 @@ protected:
/**
* @brief id id
*/
- qint64 id;
+ quint32 id;
/**
* @brief key key
*/
diff --git a/src/geometry/varc.cpp b/src/geometry/varc.cpp
index af91b0396..30ee685bc 100644
--- a/src/geometry/varc.cpp
+++ b/src/geometry/varc.cpp
@@ -39,7 +39,7 @@ VArc::VArc ()
}
VArc::VArc (VPointF center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2,
- QString formulaF2, qint64 idObject, Draw::Draws mode)
+ QString formulaF2, quint32 idObject, Draw::Draws mode)
: VGObject(GObject::Arc, idObject, mode), f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2),
radius(radius), formulaRadius(formulaRadius), center(center)
{
@@ -173,7 +173,7 @@ QPointF VArc::CutArc(const qreal &length, VArc &arc1, VArc &arc2) const
return line.p2();
}
-void VArc::setId(const qint64 &id)
+void VArc::setId(const quint32 &id)
{
_id = id;
_name = QString ("Arc_%1_%2").arg(center.name()).arg(id);
diff --git a/src/geometry/varc.h b/src/geometry/varc.h
index b2d42d334..ccb13fef0 100644
--- a/src/geometry/varc.h
+++ b/src/geometry/varc.h
@@ -56,7 +56,7 @@ public:
* @param f2 end angle (degree).
*/
VArc (VPointF center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2,
- QString formulaF2, qint64 idObject = 0, Draw::Draws mode = Draw::Calculation);
+ QString formulaF2, quint32 idObject = 0, Draw::Draws mode = Draw::Calculation);
/**
* @brief VArc copy constructor
* @param arc arc
@@ -150,7 +150,7 @@ public:
* @brief setId keep id arc in data.
* @param id id arc in data.
*/
- virtual void setId(const qint64 &id);
+ virtual void setId(const quint32 &id);
private:
/**
* @brief f1 start angle in degree.
diff --git a/src/geometry/vdetail.cpp b/src/geometry/vdetail.cpp
index d5e089ffb..ab7379dd4 100644
--- a/src/geometry/vdetail.cpp
+++ b/src/geometry/vdetail.cpp
@@ -72,7 +72,7 @@ void VDetail::ClearNodes()
nodes.clear();
}
-bool VDetail::Containes(const qint64 &id) const
+bool VDetail::Containes(const quint32 &id) const
{
for (ptrdiff_t i = 0; i < nodes.size(); ++i)
{
@@ -95,22 +95,22 @@ const VNodeDetail &VDetail::at(ptrdiff_t indx) const
return nodes[indx];
}
-ptrdiff_t VDetail::indexOfNode(const qint64 &id) const
+ptrdiff_t VDetail::indexOfNode(const quint32 &id) const
{
return indexOfNode(nodes, id);
}
-qint64 VDetail::id() const
+quint32 VDetail::id() const
{
return _id;
}
-void VDetail::setId(const qint64 &id)
+void VDetail::setId(const quint32 &id)
{
_id = id;
}
-bool VDetail::OnEdge(const qint64 &p1, const qint64 &p2) const
+bool VDetail::OnEdge(const quint32 &p1, const quint32 &p2) const
{
QVector list = listNodePoint();
if (list.size() < 3)
@@ -147,7 +147,7 @@ bool VDetail::OnEdge(const qint64 &p1, const qint64 &p2) const
}
}
-ptrdiff_t VDetail::Edge(const qint64 &p1, const qint64 &p2) const
+ptrdiff_t VDetail::Edge(const quint32 &p1, const quint32 &p2) const
{
if (OnEdge(p1, p2) == false)
{
@@ -171,7 +171,7 @@ ptrdiff_t VDetail::Edge(const qint64 &p1, const qint64 &p2) const
}
}
-void VDetail::NodeOnEdge(const ptrdiff_t &index, VNodeDetail &p1, VNodeDetail &p2) const
+void VDetail::NodeOnEdge(const quint32 &index, VNodeDetail &p1, VNodeDetail &p2) const
{
QVector list = listNodePoint();
if (index < 0 || index > list.size())
@@ -190,7 +190,7 @@ void VDetail::NodeOnEdge(const ptrdiff_t &index, VNodeDetail &p1, VNodeDetail &p
}
}
-VDetail VDetail::RemoveEdge(const ptrdiff_t &index) const
+VDetail VDetail::RemoveEdge(const quint32 &index) const
{
VDetail det(*this);
det.ClearNodes();
@@ -232,9 +232,9 @@ VDetail VDetail::RemoveEdge(const ptrdiff_t &index) const
return det;
}
-QList VDetail::Missing(const VDetail &det) const
+QList VDetail::Missing(const VDetail &det) const
{
- QList list;
+ QList list;
if (nodes.size() == det.CountNode())
{
return list;
@@ -268,7 +268,7 @@ QVector VDetail::listNodePoint() const
return list;
}
-ptrdiff_t VDetail::indexOfNode(const QVector &list, const qint64 &id)
+ptrdiff_t VDetail::indexOfNode(const QVector &list, const quint32 &id)
{
for (ptrdiff_t i = 0; i < list.size(); ++i)
{
diff --git a/src/geometry/vdetail.h b/src/geometry/vdetail.h
index 9bdaa6eaf..fa4318fef 100644
--- a/src/geometry/vdetail.h
+++ b/src/geometry/vdetail.h
@@ -103,7 +103,7 @@ public:
* @param id object id.
* @return true if containe.
*/
- bool Containes(const qint64 &id)const;
+ bool Containes(const quint32 &id)const;
/**
* @brief operator [] find node by index in list.
* @param indx index node in list.
@@ -191,17 +191,17 @@ public:
* @param id object (arc, point, spline, splinePath) id.
* @return index in list or -1 id can't find.
*/
- ptrdiff_t indexOfNode(const qint64 &id) const;
+ ptrdiff_t indexOfNode(const quint32 &id) const;
/**
* @brief id return id detail in list data.
* @return id.
*/
- qint64 id() const;
+ quint32 id() const;
/**
* @brief setId set id detail in list data.
* @param id detail id.
*/
- void setId(const qint64 &id);
+ void setId(const quint32 &id);
/**
* @brief OnEdge checks if two poins located on the edge. Edge is line between two points. If between two points
* located arcs or splines ignore this.
@@ -209,7 +209,7 @@ public:
* @param p2 id second point.
* @return true - on edge, false - no.
*/
- bool OnEdge(const qint64 &p1, const qint64 &p2)const;
+ bool OnEdge(const quint32 &p1, const quint32 &p2)const;
/**
* @brief Edge return edge index in detail. Edge is line between two points. If between two points
* located arcs or splines ignore this.
@@ -217,32 +217,32 @@ public:
* @param p2 id second point.
* @return edge index or -1 if points don't located on edge
*/
- ptrdiff_t Edge(const qint64 &p1, const qint64 &p2)const;
+ ptrdiff_t Edge(const quint32 &p1, const quint32 &p2)const;
/**
* @brief NodeOnEdge return nodes located on edge with index.
* @param index index of edge.
* @param p1 first node.
* @param p2 second node.
*/
- void NodeOnEdge(const ptrdiff_t &index, VNodeDetail &p1, VNodeDetail &p2)const;
+ void NodeOnEdge(const quint32 &index, VNodeDetail &p1, VNodeDetail &p2)const;
/**
* @brief RemoveEdge return detail without edge with index.
* @param index idex of edge.
* @return
*/
- VDetail RemoveEdge(const ptrdiff_t &index) const;
+ VDetail RemoveEdge(const quint32 &index) const;
/**
* @brief Missing find missing ids in detail. When we deleted object in detail and return this detail need
* understand, what nodes need make invisible.
* @param det changed detail.
* @return list with missing detail.
*/
- QList Missing(const VDetail &det) const;
+ QList Missing(const VDetail &det) const;
private:
/**
* @brief _id id detail.
*/
- qint64 _id;
+ quint32 _id;
/**
* @brief nodes list detail nodes.
*/
@@ -282,7 +282,7 @@ private:
* @param id object (arc, point, spline, splinePath) id.
* @return index in list or -1 id can't find.
*/
- static ptrdiff_t indexOfNode(const QVector &list, const qint64 &id);
+ static ptrdiff_t indexOfNode(const QVector &list, const quint32 &id);
};
#endif // VDETAIL_H
diff --git a/src/geometry/vequidistant.cpp b/src/geometry/vequidistant.cpp
index a0c7048e5..66407cf34 100644
--- a/src/geometry/vequidistant.cpp
+++ b/src/geometry/vequidistant.cpp
@@ -28,7 +28,7 @@
#include "vequidistant.h"
-QPainterPath VEquidistant::ContourPath(const qint64 &idDetail, const VContainer *data) const
+QPainterPath VEquidistant::ContourPath(const quint32 &idDetail, const VContainer *data) const
{
Q_CHECK_PTR(data);
VDetail detail = data->GetDetail(idDetail);
diff --git a/src/geometry/vequidistant.h b/src/geometry/vequidistant.h
index a35ab3a83..652788fbb 100644
--- a/src/geometry/vequidistant.h
+++ b/src/geometry/vequidistant.h
@@ -44,7 +44,7 @@ public:
* @param data container with objects (points, arcs, splines).
* @return return painter path of contour detail.
*/
- QPainterPath ContourPath(const qint64 &idDetail, const VContainer *data) const;
+ QPainterPath ContourPath(const quint32 &idDetail, const VContainer *data) const;
private:
/**
* @brief GetLengthContour return length of contour.
diff --git a/src/geometry/vgobject.cpp b/src/geometry/vgobject.cpp
index 94d025598..bbd23f03b 100644
--- a/src/geometry/vgobject.cpp
+++ b/src/geometry/vgobject.cpp
@@ -33,7 +33,7 @@ VGObject::VGObject()
{
}
-VGObject::VGObject(const GObject::Type &type, const qint64 &idObject, const Draw::Draws &mode)
+VGObject::VGObject(const GObject::Type &type, const quint32 &idObject, const Draw::Draws &mode)
:_id(0), type(type), idObject(idObject), _name(QString()), mode(mode)
{
}
@@ -53,12 +53,12 @@ VGObject &VGObject::operator=(const VGObject &obj)
return *this;
}
-qint64 VGObject::getIdObject() const
+quint32 VGObject::getIdObject() const
{
return idObject;
}
-void VGObject::setIdObject(const qint64 &value)
+void VGObject::setIdObject(const quint32 &value)
{
idObject = value;
}
@@ -88,12 +88,12 @@ GObject::Type VGObject::getType() const
return type;
}
-qint64 VGObject::id() const
+quint32 VGObject::id() const
{
return _id;
}
-void VGObject::setId(const qint64 &id)
+void VGObject::setId(const quint32 &id)
{
_id = id;
}
diff --git a/src/geometry/vgobject.h b/src/geometry/vgobject.h
index 917cef7a9..c06428087 100644
--- a/src/geometry/vgobject.h
+++ b/src/geometry/vgobject.h
@@ -61,7 +61,7 @@ public:
* @param idObject id parent object.
* @param mode mode creation. Used in modeling mode.
*/
- VGObject(const GObject::Type &type, const qint64 &idObject = 0, const Draw::Draws &mode = Draw::Calculation);
+ VGObject(const GObject::Type &type, const quint32 &idObject = 0, const Draw::Draws &mode = Draw::Calculation);
/**
* @brief VGObject copy constructor.
* @param obj object.
@@ -78,12 +78,12 @@ public:
* @brief getIdObject return parent id.
* @return parent id or 0 if object don't have parent.
*/
- qint64 getIdObject() const;
+ quint32 getIdObject() const;
/**
* @brief setIdObject set parent id.
* @param value parent id.
*/
- void setIdObject(const qint64 &value);
+ void setIdObject(const quint32 &value);
/**
* @brief name return name graphical object.
* @return name
@@ -113,17 +113,17 @@ public:
* @brief id return id object.
* @return id
*/
- qint64 id() const;
+ quint32 id() const;
/**
* @brief setId set id object.
* @param id id.
*/
- virtual void setId(const qint64 &id);
+ virtual void setId(const quint32 &id);
protected:
/**
* @brief _id id in container. Ned for arcs, spline and spline paths.
*/
- qint64 _id;
+ quint32 _id;
/**
* @brief type type of graphical object
*/
@@ -131,7 +131,7 @@ protected:
/**
* @brief idObject id of parent object. Only for modeling. All another return 0.
*/
- qint64 idObject;
+ quint32 idObject;
/**
* @brief _name object name
*/
diff --git a/src/geometry/vnodedetail.cpp b/src/geometry/vnodedetail.cpp
index 45bc99e92..33a858f58 100644
--- a/src/geometry/vnodedetail.cpp
+++ b/src/geometry/vnodedetail.cpp
@@ -31,7 +31,7 @@
VNodeDetail::VNodeDetail()
:id(0), typeTool(Tool::NodePoint), typeNode(NodeDetail::Contour), mx(0), my(0){}
-VNodeDetail::VNodeDetail(qint64 id, Tool::Tools typeTool, NodeDetail::NodeDetails typeNode, qreal mx, qreal my)
+VNodeDetail::VNodeDetail(quint32 id, Tool::Tools typeTool, NodeDetail::NodeDetails typeNode, qreal mx, qreal my)
:id(id), typeTool(typeTool), typeNode(typeNode), mx(mx), my(my){}
VNodeDetail::VNodeDetail(const VNodeDetail &node)
diff --git a/src/geometry/vnodedetail.h b/src/geometry/vnodedetail.h
index 3acff0c40..6d018339c 100644
--- a/src/geometry/vnodedetail.h
+++ b/src/geometry/vnodedetail.h
@@ -60,7 +60,7 @@ public:
* @param mx object bias x axis
* @param my object bias y axis
*/
- VNodeDetail(qint64 id, Tool::Tools typeTool, NodeDetail::NodeDetails typeNode, qreal mx = 0,
+ VNodeDetail(quint32 id, Tool::Tools typeTool, NodeDetail::NodeDetails typeNode, qreal mx = 0,
qreal my = 0);
/**
* @brief VNodeDetail copy constructor
@@ -77,12 +77,12 @@ public:
* @brief getId return object id.
* @return id.
*/
- inline qint64 getId() const {return id;}
+ inline quint32 getId() const {return id;}
/**
* @brief setId set object id.
* @param value object id.
*/
- inline void setId(const qint64 &value) {id = value;}
+ inline void setId(const quint32 &value) {id = value;}
/**
* @brief getTypeTool return tool type.
* @return tool type.
@@ -127,7 +127,7 @@ private:
/**
* @brief id object id.
*/
- qint64 id;
+ quint32 id;
/**
* @brief typeTool type of tool
*/
diff --git a/src/geometry/vpointf.cpp b/src/geometry/vpointf.cpp
index 33783552f..703b93fe1 100644
--- a/src/geometry/vpointf.cpp
+++ b/src/geometry/vpointf.cpp
@@ -28,7 +28,7 @@
#include "vpointf.h"
-VPointF::VPointF(qreal x, qreal y, QString name, qreal mx, qreal my, qint64 idObject, Draw::Draws mode)
+VPointF::VPointF(qreal x, qreal y, QString name, qreal mx, qreal my, quint32 idObject, Draw::Draws mode)
:VGObject(GObject::Point, idObject, mode), _mx(mx), _my(my), _x(x), _y(y)
{
this->_name = name;
diff --git a/src/geometry/vpointf.h b/src/geometry/vpointf.h
index 63da46ba7..51aaffcaa 100644
--- a/src/geometry/vpointf.h
+++ b/src/geometry/vpointf.h
@@ -60,7 +60,7 @@ public:
* @param mx offset name respect to x
* @param my offset name respect to y
*/
- VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, qint64 idObject = 0,
+ VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, quint32 idObject = 0,
Draw::Draws mode = Draw::Calculation);
/**
* @brief operator = assignment operator
diff --git a/src/geometry/vspline.cpp b/src/geometry/vspline.cpp
index ecde28308..3a7e76ca4 100644
--- a/src/geometry/vspline.cpp
+++ b/src/geometry/vspline.cpp
@@ -40,7 +40,7 @@ VSpline::VSpline ( const VSpline & spline )
kCurve(spline.GetKcurve()){}
VSpline::VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
- qint64 idObject, Draw::Draws mode)
+ quint32 idObject, Draw::Draws mode)
:VGObject(GObject::Spline, idObject, mode), p1(p1), p2(QPointF()), p3(QPointF()), p4(p4), angle1(angle1),
angle2(angle2), kAsm1(kAsm1), kAsm2(kAsm2), kCurve(kCurve)
{
@@ -67,7 +67,7 @@ VSpline::VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm
this->p3 = p4p3.p2();
}
-VSpline::VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, qreal kCurve, qint64 idObject, Draw::Draws mode)
+VSpline::VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, qreal kCurve, quint32 idObject, Draw::Draws mode)
:VGObject(GObject::Spline, idObject, mode), p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), angle2(0), kAsm1(1),
kAsm2(1), kCurve(1)
{
diff --git a/src/geometry/vspline.h b/src/geometry/vspline.h
index 80b9dbc5d..af1bebfb8 100644
--- a/src/geometry/vspline.h
+++ b/src/geometry/vspline.h
@@ -66,7 +66,7 @@ public:
* @param kAsm2 coefficient of length second control line.
*/
VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
- qint64 idObject = 0, Draw::Draws mode = Draw::Calculation);
+ quint32 idObject = 0, Draw::Draws mode = Draw::Calculation);
/**
* @brief VSpline constructor.
* @param p1 first point spline.
@@ -74,7 +74,7 @@ public:
* @param p3 second control point.
* @param p4 second point spline.
*/
- VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, qreal kCurve, qint64 idObject = 0,
+ VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, qreal kCurve, quint32 idObject = 0,
Draw::Draws mode = Draw::Calculation);
/**
* @brief GetP1 return first spline point.
diff --git a/src/geometry/vsplinepath.cpp b/src/geometry/vsplinepath.cpp
index 7bb871d7b..d91f0fc6d 100644
--- a/src/geometry/vsplinepath.cpp
+++ b/src/geometry/vsplinepath.cpp
@@ -29,7 +29,7 @@
#include "vsplinepath.h"
#include "../exception/vexception.h"
-VSplinePath::VSplinePath(qreal kCurve, qint64 idObject, Draw::Draws mode)
+VSplinePath::VSplinePath(qreal kCurve, quint32 idObject, Draw::Draws mode)
: VGObject(GObject::SplinePath, idObject, mode), path(QVector()), kCurve(kCurve), maxCountPoints(0)
{
}
diff --git a/src/geometry/vsplinepath.h b/src/geometry/vsplinepath.h
index 890689abf..b13cc4922 100644
--- a/src/geometry/vsplinepath.h
+++ b/src/geometry/vsplinepath.h
@@ -59,7 +59,7 @@ public:
* @param idObject parent id.
* @param mode mode creation spline path.
*/
- VSplinePath(qreal kCurve = 1, qint64 idObject = 0, Draw::Draws mode = Draw::Calculation);
+ VSplinePath(qreal kCurve = 1, quint32 idObject = 0, Draw::Draws mode = Draw::Calculation);
/**
* @brief VSplinePath copy constructor.
* @param splPath spline path.
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 6761c6873..8eb4b7cf8 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -186,12 +186,12 @@ void MainWindow::ActionNewDraw()
pattern->ClearGObjects();
//Create single point
- qint64 id = pattern->AddGObject(new VPointF(toPixel((10+comboBoxDraws->count()*5)), toPixel(10), "А", 5, 10));
+ quint32 id = pattern->AddGObject(new VPointF(toPixel((10+comboBoxDraws->count()*5)), toPixel(10), "А", 5, 10));
VToolSinglePoint *spoint = new VToolSinglePoint(doc, pattern, id, Tool::FromGui);
sceneDraw->addItem(spoint);
connect(spoint, &VToolPoint::ChoosedTool, sceneDraw, &VMainGraphicsScene::ChoosedItem);
connect(sceneDraw, &VMainGraphicsScene::NewFactor, spoint, &VToolSinglePoint::SetFactor);
- QHash* tools = doc->getTools();
+ QHash* tools = doc->getTools();
tools->insert(id, spoint);
VDrawTool::AddRecord(id, Tool::SinglePointTool, doc);
SetEnableTool(true);
@@ -657,7 +657,7 @@ void MainWindow::currentDrawChanged( int index )
if (drawMode)
{
ArrowTool();
- qint64 id = doc->SPointActiveDraw();
+ quint32 id = doc->SPointActiveDraw();
if (id != 0)
{
const VPointF *p = pattern->GeometricObject(id);
@@ -1084,8 +1084,8 @@ void MainWindow::ActionLayout(bool checked)
Q_UNUSED(checked);
hide();
QVector listDetails;
- const QHash *details = pattern->DataDetails();
- QHashIterator idetail(*details);
+ const QHash *details = pattern->DataDetails();
+ QHashIterator idetail(*details);
while (idetail.hasNext())
{
idetail.next();
diff --git a/src/tools/drawTools/vdrawtool.cpp b/src/tools/drawTools/vdrawtool.cpp
index a588da3da..c2afef8d2 100644
--- a/src/tools/drawTools/vdrawtool.cpp
+++ b/src/tools/drawTools/vdrawtool.cpp
@@ -30,7 +30,7 @@
qreal VDrawTool::factor = 1;
-VDrawTool::VDrawTool(VPattern *doc, VContainer *data, qint64 id)
+VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id)
:VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
nameActivDraw(doc->GetNameActivDraw()), dialog(0)
{
@@ -44,7 +44,7 @@ VDrawTool::~VDrawTool()
delete dialog;
}
-void VDrawTool::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VDrawTool::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
Q_UNUSED(id);
Q_UNUSED(color);
@@ -102,7 +102,7 @@ void VDrawTool::AddToCalculation(const QDomElement &domElement)
bool ok = doc->GetActivNodeElement(VPattern::TagCalculation, calcElement);
if (ok)
{
- qint64 id = doc->getCursor();
+ quint32 id = doc->getCursor();
if (id <= 0)
{
calcElement.appendChild(domElement);
diff --git a/src/tools/drawTools/vdrawtool.h b/src/tools/drawTools/vdrawtool.h
index e44cbc54f..ff41eca7c 100644
--- a/src/tools/drawTools/vdrawtool.h
+++ b/src/tools/drawTools/vdrawtool.h
@@ -49,7 +49,7 @@ public:
* @param id object id in container.
* @param parent parent object.
*/
- VDrawTool(VPattern *doc, VContainer *data, qint64 id);
+ VDrawTool(VPattern *doc, VContainer *data, quint32 id);
virtual ~VDrawTool();
/**
* @brief setDialog set dialog when user want change tool option.
@@ -67,7 +67,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName new name active pattern peace. name new active pattern peace.
@@ -183,7 +183,7 @@ protected:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable)
+ void ShowItem(Item *item, quint32 id, Qt::GlobalColor color, bool enable)
{
Q_CHECK_PTR(item);
if (id == item->id)
diff --git a/src/tools/drawTools/vtoolalongline.cpp b/src/tools/drawTools/vtoolalongline.cpp
index 88b8d1149..c7c2da657 100644
--- a/src/tools/drawTools/vtoolalongline.cpp
+++ b/src/tools/drawTools/vtoolalongline.cpp
@@ -32,8 +32,8 @@
const QString VToolAlongLine::ToolType = QStringLiteral("alongLine");
-VToolAlongLine::VToolAlongLine(VPattern *doc, VContainer *data, qint64 id, const QString &formula,
- const qint64 &firstPointId, const qint64 &secondPointId,
+VToolAlongLine::VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const QString &typeLine, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId)
@@ -151,16 +151,16 @@ void VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatt
DialogAlongLine *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
QString formula = dialogTool->getFormula();
- qint64 firstPointId = dialogTool->getFirstPointId();
- qint64 secondPointId = dialogTool->getSecondPointId();
+ quint32 firstPointId = dialogTool->getFirstPointId();
+ quint32 secondPointId = dialogTool->getSecondPointId();
QString typeLine = dialogTool->getTypeLine();
QString pointName = dialogTool->getPointName();
Create(0, pointName, typeLine, formula, firstPointId, secondPointId, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
- const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId,
+void VToolAlongLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine,
+ const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -173,7 +173,7 @@ void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QS
if (errorMsg.isEmpty())
{
line.setLength(toPixel(result));
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject( new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolalongline.h b/src/tools/drawTools/vtoolalongline.h
index d1a325dec..0a3248eba 100644
--- a/src/tools/drawTools/vtoolalongline.h
+++ b/src/tools/drawTools/vtoolalongline.h
@@ -50,8 +50,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolAlongLine(VPattern *doc, VContainer *data, qint64 id, const QString &formula,
- const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine,
+ VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula,
+ const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- 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,
+ static void Create(const quint32 _id, const QString &pointName, const QString &typeLine, const QString &formula,
+ const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -127,7 +127,7 @@ private:
/**
* @brief secondPointId id second point of line.
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // VTOOLALONGLINE_H
diff --git a/src/tools/drawTools/vtoolarc.cpp b/src/tools/drawTools/vtoolarc.cpp
index 8eed179f8..e9bbe1808 100644
--- a/src/tools/drawTools/vtoolarc.cpp
+++ b/src/tools/drawTools/vtoolarc.cpp
@@ -33,7 +33,7 @@
const QString VToolArc::TagName = QStringLiteral("arc");
const QString VToolArc::ToolType = QStringLiteral("simple");
-VToolArc::VToolArc(VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+VToolArc::VToolArc(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent)
{
@@ -75,14 +75,14 @@ void VToolArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *d
Q_CHECK_PTR(dialog);
DialogArc *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 center = dialogTool->GetCenter();
+ quint32 center = dialogTool->GetCenter();
QString radius = dialogTool->GetRadius();
QString f1 = dialogTool->GetF1();
QString f2 = dialogTool->GetF2();
Create(0, center, radius, f1, f2, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1,
+void VToolArc::Create(const quint32 _id, const quint32 ¢er, const QString &radius, const QString &f1,
const QString &f2, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -113,7 +113,7 @@ void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &rad
VPointF c = *data->GeometricObject(center);
VArc *arc = new VArc(c, calcRadius, radius, calcF1, f1, calcF2, f2 );
Q_CHECK_PTR(arc);
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(arc);
@@ -162,7 +162,7 @@ void VToolArc::ChangedActivDraw(const QString &newName)
VDrawTool::ChangedActivDraw(newName);
}
-void VToolArc::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VToolArc::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
ShowItem(this, id, color, enable);
}
diff --git a/src/tools/drawTools/vtoolarc.h b/src/tools/drawTools/vtoolarc.h
index b81a4cfad..64452b7ca 100644
--- a/src/tools/drawTools/vtoolarc.h
+++ b/src/tools/drawTools/vtoolarc.h
@@ -48,7 +48,7 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object
*/
- VToolArc(VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+ VToolArc(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -75,7 +75,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1,
+ static void Create(const quint32 _id, const quint32 ¢er, const QString &radius, const QString &f1,
const QString &f2, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
@@ -96,7 +96,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor.
diff --git a/src/tools/drawTools/vtoolbisector.cpp b/src/tools/drawTools/vtoolbisector.cpp
index 63a0a63e5..087ef7b2a 100644
--- a/src/tools/drawTools/vtoolbisector.cpp
+++ b/src/tools/drawTools/vtoolbisector.cpp
@@ -32,9 +32,9 @@
const QString VToolBisector::ToolType = QStringLiteral("bisector");
-VToolBisector::VToolBisector(VPattern *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,
+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 Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), thirdPointId(0)
{
@@ -91,17 +91,17 @@ void VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatte
DialogBisector *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
QString formula = dialogTool->getFormula();
- qint64 firstPointId = dialogTool->getFirstPointId();
- qint64 secondPointId = dialogTool->getSecondPointId();
- qint64 thirdPointId = dialogTool->getThirdPointId();
+ quint32 firstPointId = dialogTool->getFirstPointId();
+ quint32 secondPointId = dialogTool->getSecondPointId();
+ quint32 thirdPointId = dialogTool->getThirdPointId();
QString typeLine = dialogTool->getTypeLine();
QString pointName = dialogTool->getPointName();
Create(0, formula, firstPointId, secondPointId, thirdPointId, typeLine, pointName, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolBisector::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
- const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
+void VToolBisector::Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
+ const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
@@ -117,7 +117,7 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6
{
QPointF fPoint = VToolBisector::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
thirdPoint->toQPointF(), toPixel(result));
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolbisector.h b/src/tools/drawTools/vtoolbisector.h
index b88e284c1..86ee1adeb 100644
--- a/src/tools/drawTools/vtoolbisector.h
+++ b/src/tools/drawTools/vtoolbisector.h
@@ -50,9 +50,9 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolBisector(VPattern *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,
+ VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
+ const quint32 &thirdPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief FindPoint find bisector point.
@@ -93,8 +93,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
- const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine,
+ static void Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
+ const quint32 &secondPointId, const quint32 &thirdPointId, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
@@ -140,11 +140,11 @@ private:
/**
* @brief firstPointId id first point of angle.
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief thirdPointId id third point of angle.
*/
- qint64 thirdPointId;
+ quint32 thirdPointId;
};
#endif // VTOOLBISECTOR_H
diff --git a/src/tools/drawTools/vtoolcutarc.cpp b/src/tools/drawTools/vtoolcutarc.cpp
index 426ff7094..c181191b3 100644
--- a/src/tools/drawTools/vtoolcutarc.cpp
+++ b/src/tools/drawTools/vtoolcutarc.cpp
@@ -33,8 +33,8 @@
const QString VToolCutArc::ToolType = QStringLiteral("cutArc");
const QString VToolCutArc::AttrArc = QStringLiteral("arc");
-VToolCutArc::VToolCutArc(VPattern *doc, VContainer *data, const qint64 &id, const QString &formula,
- const qint64 &arcId, const qint64 &arc1id, const qint64 &arc2id,
+VToolCutArc::VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
+ const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VToolPoint(doc, data, id, parent), formula(formula), arcId(arcId), firstArc(), secondArc(), arc1id(arc1id),
arc2id(arc2id)
@@ -84,11 +84,11 @@ void VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
Q_CHECK_PTR(dialogTool);
QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
- qint64 arcId = dialogTool->getArcId();
+ quint32 arcId = dialogTool->getArcId();
Create(0, pointName, formula, arcId, 5, 10, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolCutArc::Create(const qint64 _id, const QString &pointName, const QString &formula, const qint64 &arcId,
+void VToolCutArc::Create(const quint32 _id, const QString &pointName, const QString &formula, const quint32 &arcId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -102,9 +102,9 @@ void VToolCutArc::Create(const qint64 _id, const QString &pointName, const QStri
VArc arc2;
QPointF point = arc->CutArc(toPixel(result), arc1, arc2);
- qint64 id = _id;
- qint64 arc1id = 0;
- qint64 arc2id = 0;
+ quint32 id = _id;
+ quint32 arc1id = 0;
+ quint32 arc2id = 0;
if (typeCreation == Tool::FromGui)
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
@@ -170,7 +170,7 @@ void VToolCutArc::FullUpdateFromFile()
RefreshGeometry();
}
-void VToolCutArc::ArcChoosed(qint64 id)
+void VToolCutArc::ArcChoosed(quint32 id)
{
emit ChoosedTool(id, Scene::Arc);
}
@@ -256,7 +256,7 @@ void VToolCutArc::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrArc, QString().setNum(dialogTool->getArcId()));
}
-void VToolCutArc::RefreshArc(VSimpleArc *sArc, qint64 arcid, SimpleArc::Translation tr)
+void VToolCutArc::RefreshArc(VSimpleArc *sArc, quint32 arcid, SimpleArc::Translation tr)
{
const VArc *arc = VAbstractTool::data.GeometricObject(arcid);
QPainterPath path;
diff --git a/src/tools/drawTools/vtoolcutarc.h b/src/tools/drawTools/vtoolcutarc.h
index 1cf876fa1..d6f8d3478 100644
--- a/src/tools/drawTools/vtoolcutarc.h
+++ b/src/tools/drawTools/vtoolcutarc.h
@@ -51,8 +51,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolCutArc(VPattern *doc, VContainer *data, const qint64 &id, const QString &formula,
- const qint64 &arcId, const qint64 &arc1id, const qint64 &arc2id,
+ VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
+ const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -80,7 +80,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName, const QString &formula, const qint64 &arcId,
+ static void Create(const quint32 _id, const QString &pointName, const QString &formula, const quint32 &arcId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -94,7 +94,7 @@ public slots:
* @brief ArcChoosed send signal about selection from cutted arc.
* @param id object id in container.
*/
- void ArcChoosed(qint64 id);
+ void ArcChoosed(quint32 id);
/**
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName new name active pattern peace.
@@ -136,7 +136,7 @@ private:
/**
* @brief arcId keep id of arc
*/
- qint64 arcId;
+ quint32 arcId;
/**
* @brief firstArc first arc after cutting.
*/
@@ -148,18 +148,18 @@ private:
/**
* @brief arc1id id first arc after cutting.
*/
- const qint64 arc1id;
+ const quint32 arc1id;
/**
* @brief arc2id id second arc after cutting.
*/
- const qint64 arc2id;
+ const quint32 arc2id;
/**
* @brief RefreshArc refresh arc on scene.
* @param sArc arc.
* @param arcid arc id.
* @param tr arc type.
*/
- void RefreshArc(VSimpleArc *sArc, qint64 arcid, SimpleArc::Translation tr);
+ void RefreshArc(VSimpleArc *sArc, quint32 arcid, SimpleArc::Translation tr);
};
#endif // VTOOLCUTARC_H
diff --git a/src/tools/drawTools/vtoolcutspline.cpp b/src/tools/drawTools/vtoolcutspline.cpp
index 0c2c01ca7..0debf801d 100644
--- a/src/tools/drawTools/vtoolcutspline.cpp
+++ b/src/tools/drawTools/vtoolcutspline.cpp
@@ -33,8 +33,8 @@
const QString VToolCutSpline::ToolType = QStringLiteral("cutSpline");
const QString VToolCutSpline::AttrSpline = QStringLiteral("spline");
-VToolCutSpline::VToolCutSpline(VPattern *doc, VContainer *data, const qint64 &id, const QString &formula,
- const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id,
+VToolCutSpline::VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
+ const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id,
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formula(formula), splineId(splineId), firstSpline(), secondSpline(),
spl1id(spl1id), spl2id(spl2id)
@@ -84,12 +84,12 @@ void VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene,
Q_CHECK_PTR(dialogTool);
QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
- qint64 splineId = dialogTool->getSplineId();
+ quint32 splineId = dialogTool->getSplineId();
Create(0, pointName, formula, splineId, 5, 10, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolCutSpline::Create(const qint64 _id, const QString &pointName,
- const QString &formula, const qint64 &splineId, const qreal &mx, const qreal &my,
+void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
+ const QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -102,9 +102,9 @@ void VToolCutSpline::Create(const qint64 _id, const QString &pointName,
QPointF spl1p2, spl1p3, spl2p2, spl2p3;
QPointF point = spl->CutSpline(toPixel(result), spl1p2, spl1p3, spl2p2, spl2p3);
- qint64 id = _id;
- qint64 spl1id = 0;
- qint64 spl2id = 0;
+ quint32 id = _id;
+ quint32 spl1id = 0;
+ quint32 spl2id = 0;
if (typeCreation == Tool::FromGui)
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
@@ -171,7 +171,7 @@ void VToolCutSpline::FullUpdateFromFile()
RefreshGeometry();
}
-void VToolCutSpline::SplineChoosed(qint64 id)
+void VToolCutSpline::SplineChoosed(quint32 id)
{
emit ChoosedTool(id, Scene::Spline);
}
@@ -262,7 +262,7 @@ void VToolCutSpline::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrSpline, QString().setNum(dialogTool->getSplineId()));
}
-void VToolCutSpline::RefreshSpline(VSimpleSpline *spline, qint64 splid, SimpleSpline::Translation tr)
+void VToolCutSpline::RefreshSpline(VSimpleSpline *spline, quint32 splid, SimpleSpline::Translation tr)
{
const VSpline *spl = VAbstractTool::data.GeometricObject(splid);
QPainterPath path;
diff --git a/src/tools/drawTools/vtoolcutspline.h b/src/tools/drawTools/vtoolcutspline.h
index d9b0e7634..87405ee45 100644
--- a/src/tools/drawTools/vtoolcutspline.h
+++ b/src/tools/drawTools/vtoolcutspline.h
@@ -49,8 +49,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolCutSpline(VPattern *doc, VContainer *data, const qint64 &id, const QString &formula,
- const qint64 &splineId, const qint64 &spl1id, const qint64 &spl2id,
+ VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
+ const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -78,8 +78,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName,
- const QString &formula, const qint64 &splineId, const qreal &mx, const qreal &my,
+ static void Create(const quint32 _id, const QString &pointName,
+ const QString &formula, const quint32 &splineId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -93,7 +93,7 @@ public slots:
* @brief SplineChoosed send signal about selection from spline.
* @param id object id in container.
*/
- void SplineChoosed(qint64 id);
+ void SplineChoosed(quint32 id);
/**
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName new name active pattern peace.
@@ -139,7 +139,7 @@ private:
/**
* @brief splineId keep id of spline.
*/
- qint64 splineId;
+ quint32 splineId;
/**
* @brief firstSpline first spline after cutting.
*/
@@ -151,18 +151,18 @@ private:
/**
* @brief spl1id id first spline after cutting.
*/
- const qint64 spl1id;
+ const quint32 spl1id;
/**
* @brief spl2id id second spline after cutting.
*/
- const qint64 spl2id;
+ const quint32 spl2id;
/**
* @brief RefreshSpline refresh spline on scene.
* @param spline spline.
* @param splid spline id.
* @param tr spline type.
*/
- void RefreshSpline(VSimpleSpline *spline, qint64 splid, SimpleSpline::Translation tr);
+ void RefreshSpline(VSimpleSpline *spline, quint32 splid, SimpleSpline::Translation tr);
};
#endif // VTOOLCUTSPLINE_H
diff --git a/src/tools/drawTools/vtoolcutsplinepath.cpp b/src/tools/drawTools/vtoolcutsplinepath.cpp
index 495d4897d..e8ff9a8e9 100644
--- a/src/tools/drawTools/vtoolcutsplinepath.cpp
+++ b/src/tools/drawTools/vtoolcutsplinepath.cpp
@@ -33,9 +33,9 @@
const QString VToolCutSplinePath::ToolType = QStringLiteral("cutSplinePath");
const QString VToolCutSplinePath::AttrSplinePath = QStringLiteral("splinePath");
-VToolCutSplinePath::VToolCutSplinePath(VPattern *doc, VContainer *data, const qint64 &id,
- const QString &formula, const qint64 &splinePathId,
- const qint64 &splPath1id, const qint64 &splPath2id,
+VToolCutSplinePath::VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id,
+ const QString &formula, const quint32 &splinePathId,
+ const quint32 &splPath1id, const quint32 &splPath2id,
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formula(formula), splinePathId(splinePathId), firstSpline(), secondSpline(),
splPath1id (splPath1id), splPath2id(splPath2id)
@@ -84,12 +84,12 @@ void VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
Q_CHECK_PTR(dialogTool);
QString pointName = dialogTool->getPointName();
QString formula = dialogTool->getFormula();
- qint64 splinePathId = dialogTool->getSplinePathId();
+ quint32 splinePathId = dialogTool->getSplinePathId();
Create(0, pointName, formula, splinePathId, 5, 10, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolCutSplinePath::Create(const qint64 _id, const QString &pointName, const QString &formula,
- const qint64 &splinePathId, const qreal &mx, const qreal &my,
+void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, const QString &formula,
+ const quint32 &splinePathId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -103,9 +103,9 @@ void VToolCutSplinePath::Create(const qint64 _id, const QString &pointName, cons
qint32 p1 = 0, p2 = 0;
QPointF point = splPath->CutSplinePath(toPixel(result), p1, p2, spl1p2, spl1p3, spl2p2, spl2p3);
- qint64 id = _id;
- qint64 splPath1id = 0;
- qint64 splPath2id = 0;
+ quint32 id = _id;
+ quint32 splPath1id = 0;
+ quint32 splPath2id = 0;
if (typeCreation == Tool::FromGui)
{
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
@@ -252,7 +252,7 @@ void VToolCutSplinePath::FullUpdateFromFile()
RefreshGeometry();
}
-void VToolCutSplinePath::SplineChoosed(qint64 id)
+void VToolCutSplinePath::SplineChoosed(quint32 id)
{
emit ChoosedTool(id, Scene::SplinePath);
}
@@ -343,7 +343,7 @@ void VToolCutSplinePath::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogTool->getSplinePathId()));
}
-void VToolCutSplinePath::RefreshSpline(VSimpleSpline *spline, qint64 splPathid, SimpleSpline::Translation tr)
+void VToolCutSplinePath::RefreshSpline(VSimpleSpline *spline, quint32 splPathid, SimpleSpline::Translation tr)
{
const VSplinePath *splPath = VAbstractTool::data.GeometricObject(splPathid);
QPainterPath path;
diff --git a/src/tools/drawTools/vtoolcutsplinepath.h b/src/tools/drawTools/vtoolcutsplinepath.h
index f29d8a999..0a7f40b43 100644
--- a/src/tools/drawTools/vtoolcutsplinepath.h
+++ b/src/tools/drawTools/vtoolcutsplinepath.h
@@ -52,8 +52,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolCutSplinePath(VPattern *doc, VContainer *data, const qint64 &id, const QString &formula,
- const qint64 &splinePathId, const qint64 &splPath1id, const qint64 &splPath2id,
+ VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
+ const quint32 &splinePathId, const quint32 &splPath1id, const quint32 &splPath2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName, const QString &formula,
- const qint64 &splinePathId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
+ static void Create(const quint32 _id, const QString &pointName, const QString &formula,
+ const quint32 &splinePathId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -96,7 +96,7 @@ public slots:
* @brief SplineChoosed send signal about selection splinePath.
* @param id object id in container.
*/
- void SplineChoosed(qint64 id);
+ void SplineChoosed(quint32 id);
/**
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace.
* @param newName new name active pattern peace.
@@ -142,7 +142,7 @@ private:
/**
* @brief splineId keep id of spline.
*/
- qint64 splinePathId;
+ quint32 splinePathId;
/**
* @brief firstSpline first splinePath after cutting.
*/
@@ -154,18 +154,18 @@ private:
/**
* @brief splPath1id id first splinePath after cutting.
*/
- const qint64 splPath1id;
+ const quint32 splPath1id;
/**
* @brief splPath2id id second splinePath after cutting.
*/
- const qint64 splPath2id;
+ const quint32 splPath2id;
/**
* @brief RefreshSpline refresh splinePath on scene.
* @param spline splinePath.
* @param splPathid splinePath id.
* @param tr splineType type.
*/
- void RefreshSpline(VSimpleSpline *spline, qint64 splPathid, SimpleSpline::Translation tr);
+ void RefreshSpline(VSimpleSpline *spline, quint32 splPathid, SimpleSpline::Translation tr);
};
#endif // VTOOLCUTSPLINEPATH_H
diff --git a/src/tools/drawTools/vtoolendline.cpp b/src/tools/drawTools/vtoolendline.cpp
index 4178689fe..2fb50a4ff 100644
--- a/src/tools/drawTools/vtoolendline.cpp
+++ b/src/tools/drawTools/vtoolendline.cpp
@@ -33,8 +33,8 @@
const QString VToolEndLine::ToolType = QStringLiteral("endLine");
-VToolEndLine::VToolEndLine(VPattern *doc, VContainer *data, const qint64 &id, const QString &typeLine,
- const QString &formula, const qreal &angle, const qint64 &basePointId,
+VToolEndLine::VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &basePointId,
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent)
{
@@ -72,13 +72,13 @@ void VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPatter
QString typeLine = dialogTool->getTypeLine();
QString formula = dialogTool->getFormula();
qreal angle = dialogTool->getAngle();
- qint64 basePointId = dialogTool->getBasePointId();
+ quint32 basePointId = dialogTool->getBasePointId();
Create(0, pointName, typeLine, formula, angle, basePointId, 5, 10, scene, doc, data, Document::FullParse,
Tool::FromGui);
}
-void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
- const QString &formula, const qreal &angle, const qint64 &basePointId,
+void VToolEndLine::Create(const quint32 _id, const QString &pointName, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &basePointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -91,7 +91,7 @@ void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QStr
{
line.setLength(toPixel(result));
line.setAngle(angle);
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(line.p2().x(), line.p2().y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolendline.h b/src/tools/drawTools/vtoolendline.h
index 938beb98e..b85715035 100644
--- a/src/tools/drawTools/vtoolendline.h
+++ b/src/tools/drawTools/vtoolendline.h
@@ -50,8 +50,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolEndLine(VPattern *doc, VContainer *data, const qint64 &id, const QString &typeLine,
- const QString &formula, const qreal &angle, const qint64 &basePointId,
+ VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &basePointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
- const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx,
+ static void Create(const quint32 _id, const QString &pointName, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &basePointId, const qreal &mx,
const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
diff --git a/src/tools/drawTools/vtoolheight.cpp b/src/tools/drawTools/vtoolheight.cpp
index 893e99459..bddc198b7 100644
--- a/src/tools/drawTools/vtoolheight.cpp
+++ b/src/tools/drawTools/vtoolheight.cpp
@@ -31,8 +31,8 @@
const QString VToolHeight::ToolType = QStringLiteral("height");
-VToolHeight::VToolHeight(VPattern *doc, VContainer *data, const qint64 &id, const QString &typeLine,
- const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
+VToolHeight::VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId,
const Tool::Sources &typeCreation, QGraphicsItem * parent)
:VToolLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent), p1LineId(p1LineId), p2LineId(p2LineId)
{
@@ -69,15 +69,15 @@ void VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList);
QString pointName = dialogTool->getPointName();
QString typeLine = dialogTool->getTypeLine();
- qint64 basePointId = dialogTool->getBasePointId();
- qint64 p1LineId = dialogTool->getP1LineId();
- qint64 p2LineId = dialogTool->getP2LineId();
+ quint32 basePointId = dialogTool->getBasePointId();
+ quint32 p1LineId = dialogTool->getP1LineId();
+ quint32 p2LineId = dialogTool->getP2LineId();
Create(0, pointName, typeLine, basePointId, p1LineId, p2LineId, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolHeight::Create(const qint64 _id, const QString &pointName, const QString &typeLine,
- const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
+void VToolHeight::Create(const quint32 _id, const QString &pointName, const QString &typeLine,
+ const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -86,7 +86,7 @@ void VToolHeight::Create(const qint64 _id, const QString &pointName, const QStri
const VPointF *p2Line = data->GeometricObject(p2LineId);
QPointF pHeight = FindPoint(QLineF(p1Line->toQPointF(), p2Line->toQPointF()), basePoint->toQPointF());
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(pHeight.x(), pHeight.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolheight.h b/src/tools/drawTools/vtoolheight.h
index f1117041a..1c0f222ba 100644
--- a/src/tools/drawTools/vtoolheight.h
+++ b/src/tools/drawTools/vtoolheight.h
@@ -50,8 +50,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolHeight(VPattern *doc, VContainer *data, const qint64 &id, const QString &typeLine,
- const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
+ VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName, const QString &typeLine,
- const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId,
+ static void Create(const quint32 _id, const QString &pointName, const QString &typeLine,
+ const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
/**
@@ -125,11 +125,11 @@ private:
/**
* @brief p1LineId id first point of line.
*/
- qint64 p1LineId;
+ quint32 p1LineId;
/**
* @brief p2LineId id second point of line.
*/
- qint64 p2LineId;
+ quint32 p2LineId;
};
#endif // VTOOLHEIGHT_H
diff --git a/src/tools/drawTools/vtoolline.cpp b/src/tools/drawTools/vtoolline.cpp
index 36aa631ce..766d7d998 100644
--- a/src/tools/drawTools/vtoolline.cpp
+++ b/src/tools/drawTools/vtoolline.cpp
@@ -31,7 +31,7 @@
const QString VToolLine::TagName = QStringLiteral("line");
-VToolLine::VToolLine(VPattern *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint,
+VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, quint32 secondPoint,
const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint)
{
@@ -72,20 +72,20 @@ void VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern *
Q_CHECK_PTR(dialog);
DialogLine *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 firstPoint = dialogTool->getFirstPoint();
- qint64 secondPoint = dialogTool->getSecondPoint();
+ quint32 firstPoint = dialogTool->getFirstPoint();
+ quint32 secondPoint = dialogTool->getSecondPoint();
QString typeLine = dialogTool->getTypeLine();
Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, const QString &typeLine,
+void VToolLine::Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
Q_CHECK_PTR(scene);
Q_CHECK_PTR(doc);
Q_CHECK_PTR(data);
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->getNextId();
@@ -119,7 +119,7 @@ void VToolLine::FullUpdateFromFile()
RefreshGeometry();
}
-void VToolLine::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VToolLine::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
ShowItem(this, id, color, enable);
}
@@ -239,8 +239,8 @@ void VToolLine::RefreshGeometry()
QDomElement domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{
- firstPoint = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- secondPoint = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ firstPoint = doc->GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ secondPoint = doc->GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
typeLine = doc->GetParametrString(domElement, VAbstractTool::AttrTypeLine, VAbstractTool::TypeLineLine);
}
const VPointF *first = VAbstractTool::data.GeometricObject(firstPoint);
diff --git a/src/tools/drawTools/vtoolline.h b/src/tools/drawTools/vtoolline.h
index 4ca4ffcf9..7bf8d8367 100644
--- a/src/tools/drawTools/vtoolline.h
+++ b/src/tools/drawTools/vtoolline.h
@@ -51,8 +51,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolLine(VPattern *doc, VContainer *data, qint64 id, qint64 firstPoint,
- qint64 secondPoint, const QString &typeLine, const Tool::Sources &typeCreation,
+ VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint,
+ quint32 secondPoint, const QString &typeLine, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -78,7 +78,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, const QString &typeLine,
+ static void Create(const quint32 &_id, const quint32 &firstPoint, const quint32 &secondPoint, const QString &typeLine,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString TagName;
@@ -98,7 +98,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor.
@@ -152,11 +152,11 @@ private:
/**
* @brief firstPoint id first line point.
*/
- qint64 firstPoint;
+ quint32 firstPoint;
/**
* @brief secondPoint id second line point.
*/
- qint64 secondPoint;
+ quint32 secondPoint;
/**
* @brief RefreshGeometry refresh item on scene.
*/
diff --git a/src/tools/drawTools/vtoollineintersect.cpp b/src/tools/drawTools/vtoollineintersect.cpp
index 132d6fff2..8f1aef09a 100644
--- a/src/tools/drawTools/vtoollineintersect.cpp
+++ b/src/tools/drawTools/vtoollineintersect.cpp
@@ -31,9 +31,9 @@
const QString VToolLineIntersect::ToolType = QStringLiteral("lineIntersect");
-VToolLineIntersect::VToolLineIntersect(VPattern *doc, VContainer *data, const qint64 &id,
- const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2,
- const qint64 &p2Line2, const Tool::Sources &typeCreation,
+VToolLineIntersect::VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id,
+ const quint32 &p1Line1, const quint32 &p2Line1, const quint32 &p1Line2,
+ const quint32 &p2Line2, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2),
p2Line2(p2Line2)
@@ -67,17 +67,17 @@ void VToolLineIntersect::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
Q_CHECK_PTR(dialog);
DialogLineIntersect *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 p1Line1Id = dialogTool->getP1Line1();
- qint64 p2Line1Id = dialogTool->getP2Line1();
- qint64 p1Line2Id = dialogTool->getP1Line2();
- qint64 p2Line2Id = dialogTool->getP2Line2();
+ quint32 p1Line1Id = dialogTool->getP1Line1();
+ quint32 p2Line1Id = dialogTool->getP2Line1();
+ quint32 p1Line2Id = dialogTool->getP1Line2();
+ quint32 p2Line2Id = dialogTool->getP2Line2();
QString pointName = dialogTool->getPointName();
Create(0, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, pointName, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id,
- const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName,
+void VToolLineIntersect::Create(const quint32 _id, const quint32 &p1Line1Id, const quint32 &p2Line1Id,
+ const quint32 &p1Line2Id, const quint32 &p2Line2Id, const QString &pointName,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation)
@@ -93,7 +93,7 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const
QLineF::IntersectType intersect = line1.intersect(line2, &fPoint);
if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection)
{
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoollineintersect.h b/src/tools/drawTools/vtoollineintersect.h
index 14125de25..e0101aa71 100644
--- a/src/tools/drawTools/vtoollineintersect.h
+++ b/src/tools/drawTools/vtoollineintersect.h
@@ -50,8 +50,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolLineIntersect(VPattern *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1,
- const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2,
+ VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1,
+ const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p2Line2,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- 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,
+ static void Create(const quint32 _id, const quint32 &p1Line1Id, const quint32 &p2Line1Id, const quint32 &p1Line2Id,
+ const quint32 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -127,19 +127,19 @@ private:
/**
* @brief p1Line1 id first point first line.
*/
- qint64 p1Line1;
+ quint32 p1Line1;
/**
* @brief p2Line1 id second point first line.
*/
- qint64 p2Line1;
+ quint32 p2Line1;
/**
* @brief p1Line2 id first point second line.
*/
- qint64 p1Line2;
+ quint32 p1Line2;
/**
* @brief p2Line2 id second point second line.
*/
- qint64 p2Line2;
+ quint32 p2Line2;
};
#endif // VTOOLLINEINTERSECT_H
diff --git a/src/tools/drawTools/vtoollinepoint.cpp b/src/tools/drawTools/vtoollinepoint.cpp
index e3dfab958..9d72fe009 100644
--- a/src/tools/drawTools/vtoollinepoint.cpp
+++ b/src/tools/drawTools/vtoollinepoint.cpp
@@ -28,8 +28,8 @@
#include "vtoollinepoint.h"
-VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const qint64 &id,
- const QString &typeLine, const QString &formula, const qint64 &basePointId,
+VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id,
+ const QString &typeLine, const QString &formula, const quint32 &basePointId,
const qreal &angle, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formula(formula), angle(angle), basePointId(basePointId),
mainLine(0)
diff --git a/src/tools/drawTools/vtoollinepoint.h b/src/tools/drawTools/vtoollinepoint.h
index c15dd18b9..9f367a985 100644
--- a/src/tools/drawTools/vtoollinepoint.h
+++ b/src/tools/drawTools/vtoollinepoint.h
@@ -49,8 +49,8 @@ public:
* @param angle line angle.
* @param parent parent object.
*/
- VToolLinePoint(VPattern *doc, VContainer *data, const qint64 &id, const QString &typeLine,
- const QString &formula, const qint64 &basePointId, const qreal &angle,
+ VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const quint32 &basePointId, const qreal &angle,
QGraphicsItem * parent = 0);
public slots:
/**
@@ -75,7 +75,7 @@ protected:
/**
* @brief basePointId id base line point.
*/
- qint64 basePointId;
+ quint32 basePointId;
/**
* @brief mainLine line item.
*/
diff --git a/src/tools/drawTools/vtoolnormal.cpp b/src/tools/drawTools/vtoolnormal.cpp
index b34e84c12..88ea3ae81 100644
--- a/src/tools/drawTools/vtoolnormal.cpp
+++ b/src/tools/drawTools/vtoolnormal.cpp
@@ -32,9 +32,9 @@
const QString VToolNormal::ToolType = QStringLiteral("normal");
-VToolNormal::VToolNormal(VPattern *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)
+VToolNormal::VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &firstPointId,
+ const quint32 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent),
secondPointId(secondPointId)
{
@@ -69,8 +69,8 @@ void VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
DialogNormal *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
QString formula = dialogTool->getFormula();
- qint64 firstPointId = dialogTool->getFirstPointId();
- qint64 secondPointId = dialogTool->getSecondPointId();
+ quint32 firstPointId = dialogTool->getFirstPointId();
+ quint32 secondPointId = dialogTool->getSecondPointId();
QString typeLine = dialogTool->getTypeLine();
QString pointName = dialogTool->getPointName();
qreal angle = dialogTool->getAngle();
@@ -78,8 +78,8 @@ void VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
Document::FullParse, Tool::FromGui);
}
-void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
- const qint64 &secondPointId, const QString &typeLine, const QString &pointName,
+void VToolNormal::Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
+ const quint32 &secondPointId, const QString &typeLine, const QString &pointName,
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation)
@@ -93,7 +93,7 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64
{
QPointF fPoint = VToolNormal::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
toPixel(result), angle);
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolnormal.h b/src/tools/drawTools/vtoolnormal.h
index ae79635c9..8efeea75b 100644
--- a/src/tools/drawTools/vtoolnormal.h
+++ b/src/tools/drawTools/vtoolnormal.h
@@ -51,9 +51,9 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolNormal(VPattern *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,
+ VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const qreal &angle, const quint32 &firstPointId,
+ const quint32 &secondPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -84,8 +84,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId,
- const qint64 &secondPointId, const QString &typeLine, const QString &pointName,
+ static void Create(const quint32 _id, const QString &formula, const quint32 &firstPointId,
+ const quint32 &secondPointId, const QString &typeLine, const QString &pointName,
const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
@@ -141,7 +141,7 @@ private:
/**
* @brief secondPointId id second line point.
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // VTOOLNORMAL_H
diff --git a/src/tools/drawTools/vtoolpoint.cpp b/src/tools/drawTools/vtoolpoint.cpp
index c906561b1..87ceb5ced 100644
--- a/src/tools/drawTools/vtoolpoint.cpp
+++ b/src/tools/drawTools/vtoolpoint.cpp
@@ -30,7 +30,7 @@
const QString VToolPoint::TagName = QStringLiteral("point");
-VToolPoint::VToolPoint(VPattern *doc, VContainer *data, qint64 id, QGraphicsItem *parent):VDrawTool(doc, data, id),
+VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent):VDrawTool(doc, data, id),
QGraphicsEllipseItem(parent), radius(toPixel(2)), namePoint(0), lineName(0)
{
namePoint = new VGraphicsSimpleTextItem(this);
@@ -96,7 +96,7 @@ void VToolPoint::ChangedActivDraw(const QString &newName)
VDrawTool::ChangedActivDraw(newName);
}
-void VToolPoint::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VToolPoint::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
ShowItem(this, id, color, enable);
}
diff --git a/src/tools/drawTools/vtoolpoint.h b/src/tools/drawTools/vtoolpoint.h
index 22a48c9be..1a5f0223c 100644
--- a/src/tools/drawTools/vtoolpoint.h
+++ b/src/tools/drawTools/vtoolpoint.h
@@ -46,7 +46,7 @@ public:
* @param id object id in container.
* @param parent parent object.
*/
- VToolPoint(VPattern *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0);
+ VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = 0);
virtual ~VToolPoint(){}
static const QString TagName;
public slots:
@@ -66,7 +66,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor.
diff --git a/src/tools/drawTools/vtoolpointofcontact.cpp b/src/tools/drawTools/vtoolpointofcontact.cpp
index 261716c9a..21b944bd3 100644
--- a/src/tools/drawTools/vtoolpointofcontact.cpp
+++ b/src/tools/drawTools/vtoolpointofcontact.cpp
@@ -32,9 +32,9 @@
const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact");
-VToolPointOfContact::VToolPointOfContact(VPattern *doc, VContainer *data, const qint64 &id,
- const QString &radius, const qint64 ¢er,
- const qint64 &firstPointId, const qint64 &secondPointId,
+VToolPointOfContact::VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
+ const QString &radius, const quint32 ¢er,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem *parent)
: VToolPoint(doc, data, id, parent), arcRadius(radius), center(center), firstPointId(firstPointId),
secondPointId(secondPointId)
@@ -94,16 +94,16 @@ void VToolPointOfContact::Create(DialogTool *dialog, VMainGraphicsScene *scene,
DialogPointOfContact *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
QString radius = dialogTool->getRadius();
- qint64 center = dialogTool->getCenter();
- qint64 firstPointId = dialogTool->getFirstPoint();
- qint64 secondPointId = dialogTool->getSecondPoint();
+ quint32 center = dialogTool->getCenter();
+ quint32 firstPointId = dialogTool->getFirstPoint();
+ quint32 secondPointId = dialogTool->getSecondPoint();
QString pointName = dialogTool->getPointName();
Create(0, radius, center, firstPointId, secondPointId, pointName, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const qint64 ¢er,
- const qint64 &firstPointId, const qint64 &secondPointId,
+void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const quint32 ¢er,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
@@ -119,7 +119,7 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const
{
QPointF fPoint = VToolPointOfContact::FindPoint(toPixel(result), centerP->toQPointF(),
firstP->toQPointF(), secondP->toQPointF());
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolpointofcontact.h b/src/tools/drawTools/vtoolpointofcontact.h
index 6dd7b5482..45e28d64a 100644
--- a/src/tools/drawTools/vtoolpointofcontact.h
+++ b/src/tools/drawTools/vtoolpointofcontact.h
@@ -49,9 +49,9 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolPointOfContact(VPattern *doc, VContainer *data, const qint64 &id,
- const QString &arcRadius, const qint64 ¢er,
- const qint64 &firstPointId, const qint64 &secondPointId,
+ VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
+ const QString &arcRadius, const quint32 ¢er,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -91,8 +91,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &arcRadius, const qint64 ¢er,
- const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName,
+ static void Create(const quint32 _id, const QString &arcRadius, const quint32 ¢er,
+ const quint32 &firstPointId, const quint32 &secondPointId, const QString &pointName,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -141,15 +141,15 @@ private:
/**
* @brief center id center arc point.
*/
- qint64 center;
+ quint32 center;
/**
* @brief firstPointId id first line point.
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second line point.
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // VTOOLPOINTOFCONTACT_H
diff --git a/src/tools/drawTools/vtoolpointofintersection.cpp b/src/tools/drawTools/vtoolpointofintersection.cpp
index 5775196dc..1b1fbaac9 100644
--- a/src/tools/drawTools/vtoolpointofintersection.cpp
+++ b/src/tools/drawTools/vtoolpointofintersection.cpp
@@ -31,8 +31,8 @@
const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfIntersection");
-VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *data, const qint64 &id,
- const qint64 &firstPointId, const qint64 &secondPointId,
+VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId)
{
@@ -64,14 +64,14 @@ void VToolPointOfIntersection::Create(DialogTool *dialog, VMainGraphicsScene *sc
Q_CHECK_PTR(dialog);
DialogPointOfIntersection *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 firstPointId = dialogTool->getFirstPointId();
- qint64 secondPointId = dialogTool->getSecondPointId();
+ quint32 firstPointId = dialogTool->getFirstPointId();
+ quint32 secondPointId = dialogTool->getSecondPointId();
QString pointName = dialogTool->getPointName();
Create(0, pointName, firstPointId, secondPointId, 5, 10, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId,
- const qint64 &secondPointId, const qreal &mx, const qreal &my,
+void VToolPointOfIntersection::Create(const quint32 _id, const QString &pointName, const quint32 &firstPointId,
+ const quint32 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -79,7 +79,7 @@ void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName
const VPointF *secondPoint = data->GeometricObject(secondPointId);
QPointF point(firstPoint->x(), secondPoint->y());
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(point.x(), point.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolpointofintersection.h b/src/tools/drawTools/vtoolpointofintersection.h
index 1692c75e4..8d26f069e 100644
--- a/src/tools/drawTools/vtoolpointofintersection.h
+++ b/src/tools/drawTools/vtoolpointofintersection.h
@@ -48,8 +48,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolPointOfIntersection(VPattern *doc, VContainer *data, const qint64 &id,
- const qint64 &firstPointId, const qint64 &secondPointId,
+ VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id,
+ const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -77,8 +77,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId,
- const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
+ static void Create(const quint32 _id, const QString &pointName, const quint32 &firstPointId,
+ const quint32 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -119,11 +119,11 @@ private:
/**
* @brief firstPointId id first line point.
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second line point.
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // VTOOLPOINTOFINTERSECTION_H
diff --git a/src/tools/drawTools/vtoolshoulderpoint.cpp b/src/tools/drawTools/vtoolshoulderpoint.cpp
index 04ab02cd3..962298b69 100644
--- a/src/tools/drawTools/vtoolshoulderpoint.cpp
+++ b/src/tools/drawTools/vtoolshoulderpoint.cpp
@@ -32,9 +32,9 @@
const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder");
-VToolShoulderPoint::VToolShoulderPoint(VPattern *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,
+VToolShoulderPoint::VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id,
+ const QString &typeLine, const QString &formula, const quint32 &p1Line,
+ const quint32 &p2Line, const quint32 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent)
:VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder)
{
@@ -95,17 +95,17 @@ void VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphicsScene *scene, V
DialogShoulderPoint *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
QString formula = dialogTool->getFormula();
- qint64 p1Line = dialogTool->getP1Line();
- qint64 p2Line = dialogTool->getP2Line();
- qint64 pShoulder = dialogTool->getPShoulder();
+ quint32 p1Line = dialogTool->getP1Line();
+ quint32 p2Line = dialogTool->getP2Line();
+ quint32 pShoulder = dialogTool->getPShoulder();
QString typeLine = dialogTool->getTypeLine();
QString pointName = dialogTool->getPointName();
Create(0, formula, p1Line, p2Line, pShoulder, typeLine, pointName, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const qint64 &p1Line,
- const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine,
+void VToolShoulderPoint::Create(const quint32 _id, const QString &formula, const quint32 &p1Line,
+ const quint32 &p2Line, const quint32 &pShoulder, const QString &typeLine,
const QString &pointName, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
@@ -121,7 +121,7 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const
{
QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint->toQPointF(), secondPoint->toQPointF(),
shoulderPoint->toQPointF(), toPixel(result));
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(fPoint.x(), fPoint.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtoolshoulderpoint.h b/src/tools/drawTools/vtoolshoulderpoint.h
index 0566a994e..e7414f8f3 100644
--- a/src/tools/drawTools/vtoolshoulderpoint.h
+++ b/src/tools/drawTools/vtoolshoulderpoint.h
@@ -51,9 +51,9 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolShoulderPoint(VPattern *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,
+ VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
+ const QString &formula, const quint32 &p1Line, const quint32 &p2Line,
+ const quint32 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -94,8 +94,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- 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,
+ static void Create(const quint32 _id, const QString &formula, const quint32 &p1Line, const quint32 &p2Line,
+ const quint32 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx,
const qreal &my, VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
static const QString ToolType;
@@ -140,11 +140,11 @@ private:
/**
* @brief p2Line id second line point.
*/
- qint64 p2Line;
+ quint32 p2Line;
/**
* @brief pShoulder id shoulder line point.
*/
- qint64 pShoulder;
+ quint32 pShoulder;
};
#endif // VTOOLSHOULDERPOINT_H
diff --git a/src/tools/drawTools/vtoolsinglepoint.cpp b/src/tools/drawTools/vtoolsinglepoint.cpp
index f470b4d1f..5960111f1 100644
--- a/src/tools/drawTools/vtoolsinglepoint.cpp
+++ b/src/tools/drawTools/vtoolsinglepoint.cpp
@@ -31,7 +31,7 @@
const QString VToolSinglePoint::ToolType = QStringLiteral("single");
-VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent )
:VToolPoint(doc, data, id, parent)
{
diff --git a/src/tools/drawTools/vtoolsinglepoint.h b/src/tools/drawTools/vtoolsinglepoint.h
index 2e09e0353..c09751f46 100644
--- a/src/tools/drawTools/vtoolsinglepoint.h
+++ b/src/tools/drawTools/vtoolsinglepoint.h
@@ -47,7 +47,7 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolSinglePoint (VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+ VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
/**
* @brief setDialog set dialog when user want change tool option.
diff --git a/src/tools/drawTools/vtoolspline.cpp b/src/tools/drawTools/vtoolspline.cpp
index cada66ebe..c5795b2c0 100644
--- a/src/tools/drawTools/vtoolspline.cpp
+++ b/src/tools/drawTools/vtoolspline.cpp
@@ -33,7 +33,7 @@
const QString VToolSpline::TagName = QStringLiteral("spline");
const QString VToolSpline::ToolType = QStringLiteral("simple");
-VToolSpline::VToolSpline(VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+VToolSpline::VToolSpline(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector())
{
@@ -96,8 +96,8 @@ void VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
Q_CHECK_PTR(dialog);
DialogSpline *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 p1 = dialogTool->getP1();
- qint64 p4 = dialogTool->getP4();
+ quint32 p1 = dialogTool->getP1();
+ quint32 p4 = dialogTool->getP4();
qreal kAsm1 = dialogTool->getKAsm1();
qreal kAsm2 = dialogTool->getKAsm2();
qreal angle1 = dialogTool->getAngle1();
@@ -107,7 +107,7 @@ void VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
Tool::FromGui);
}
-void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
+void VToolSpline::Create(const quint32 _id, const quint32 &p1, const quint32 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
@@ -116,7 +116,7 @@ void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, c
VPointF point4 = *data->GeometricObject(p4);
VSpline *spline = new VSpline(point1, point4, angle1, angle2, kAsm1, kAsm2, kCurve);
Q_CHECK_PTR(spline);
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(spline);
@@ -355,7 +355,7 @@ void VToolSpline::ChangedActivDraw(const QString &newName)
VDrawTool::ChangedActivDraw(newName);
}
-void VToolSpline::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VToolSpline::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
ShowItem(this, id, color, enable);
}
diff --git a/src/tools/drawTools/vtoolspline.h b/src/tools/drawTools/vtoolspline.h
index ce15a1500..5b40d582f 100644
--- a/src/tools/drawTools/vtoolspline.h
+++ b/src/tools/drawTools/vtoolspline.h
@@ -49,7 +49,7 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolSpline (VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+ VToolSpline (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 );
/**
* @brief setDialog set dialog when user want change tool option.
@@ -79,7 +79,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1,
+ static void Create(const quint32 _id, const quint32 &p1, const quint32 &p4, const qreal &kAsm1,
const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
@@ -124,7 +124,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor.
diff --git a/src/tools/drawTools/vtoolsplinepath.cpp b/src/tools/drawTools/vtoolsplinepath.cpp
index 587854374..caa09ffb0 100644
--- a/src/tools/drawTools/vtoolsplinepath.cpp
+++ b/src/tools/drawTools/vtoolsplinepath.cpp
@@ -32,7 +32,7 @@
const QString VToolSplinePath::TagName = QStringLiteral("spline");
const QString VToolSplinePath::ToolType = QStringLiteral("path");
-VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+VToolSplinePath::VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem *parent)
:VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector())
{
@@ -98,11 +98,11 @@ void VToolSplinePath::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPat
Create(0, path, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolSplinePath::Create(const qint64 _id, VSplinePath *path, VMainGraphicsScene *scene,
+void VToolSplinePath::Create(const quint32 _id, VSplinePath *path, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation)
{
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(path);
@@ -209,7 +209,7 @@ void VToolSplinePath::ChangedActivDraw(const QString &newName)
VDrawTool::ChangedActivDraw(newName);
}
-void VToolSplinePath::ShowTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VToolSplinePath::ShowTool(quint32 id, Qt::GlobalColor color, bool enable)
{
ShowItem(this, id, color, enable);
}
diff --git a/src/tools/drawTools/vtoolsplinepath.h b/src/tools/drawTools/vtoolsplinepath.h
index 77398eba1..4374934e1 100644
--- a/src/tools/drawTools/vtoolsplinepath.h
+++ b/src/tools/drawTools/vtoolsplinepath.h
@@ -48,7 +48,7 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolSplinePath(VPattern *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation,
+ VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -72,7 +72,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, VSplinePath *path, VMainGraphicsScene *scene,
+ static void Create(const quint32 _id, VSplinePath *path, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
static const QString TagName;
@@ -116,7 +116,7 @@ public slots:
* @param color highlight color.
* @param enable enable or disable highlight.
*/
- virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
+ virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor.
diff --git a/src/tools/drawTools/vtooltriangle.cpp b/src/tools/drawTools/vtooltriangle.cpp
index 4dd50e717..8fd15aa2f 100644
--- a/src/tools/drawTools/vtooltriangle.cpp
+++ b/src/tools/drawTools/vtooltriangle.cpp
@@ -31,9 +31,9 @@
const QString VToolTriangle::ToolType = QStringLiteral("triangle");
-VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const qint64 &id,
- const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId,
- const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
+VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id,
+ const quint32 &axisP1Id, const quint32 &axisP2Id, const quint32 &firstPointId,
+ const quint32 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId),
secondPointId(secondPointId)
{
@@ -67,17 +67,17 @@ void VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *scene,
Q_CHECK_PTR(dialog);
DialogTriangle *dialogTool = qobject_cast(dialog);
Q_CHECK_PTR(dialogTool);
- qint64 axisP1Id = dialogTool->getAxisP1Id();
- qint64 axisP2Id = dialogTool->getAxisP2Id();
- qint64 firstPointId = dialogTool->getFirstPointId();
- qint64 secondPointId = dialogTool->getSecondPointId();
+ quint32 axisP1Id = dialogTool->getAxisP1Id();
+ quint32 axisP2Id = dialogTool->getAxisP2Id();
+ quint32 firstPointId = dialogTool->getFirstPointId();
+ quint32 secondPointId = dialogTool->getSecondPointId();
QString pointName = dialogTool->getPointName();
Create(0, pointName, axisP1Id, axisP2Id, firstPointId, secondPointId, 5, 10, scene, doc, data,
Document::FullParse, Tool::FromGui);
}
-void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id,
- const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
+void VToolTriangle::Create(const quint32 _id, const QString &pointName, const quint32 &axisP1Id,
+ const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId,
const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
@@ -88,7 +88,7 @@ void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qin
QPointF point = FindPoint(axisP1->toQPointF(), axisP2->toQPointF(), firstPoint->toQPointF(),
secondPoint->toQPointF());
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->AddGObject(new VPointF(point.x(), point.y(), pointName, mx, my));
diff --git a/src/tools/drawTools/vtooltriangle.h b/src/tools/drawTools/vtooltriangle.h
index 9d6c4fc2d..03913eed0 100644
--- a/src/tools/drawTools/vtooltriangle.h
+++ b/src/tools/drawTools/vtooltriangle.h
@@ -50,8 +50,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolTriangle(VPattern *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id,
- const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId,
+ VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id,
+ const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
@@ -81,8 +81,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- 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,
+ static void Create(const quint32 _id, const QString &pointName, const quint32 &axisP1Id, const quint32 &axisP2Id,
+ const quint32 &firstPointId, const quint32 &secondPointId, const qreal &mx, const qreal &my,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation);
/**
@@ -133,19 +133,19 @@ private:
/**
* @brief axisP1Id id first axis point.
*/
- qint64 axisP1Id;
+ quint32 axisP1Id;
/**
* @brief axisP2Id id second axis point.
*/
- qint64 axisP2Id;
+ quint32 axisP2Id;
/**
* @brief firstPointId id first triangle point, what lies on the hypotenuse.
*/
- qint64 firstPointId;
+ quint32 firstPointId;
/**
* @brief secondPointId id second triangle point, what lies on the hypotenuse.
*/
- qint64 secondPointId;
+ quint32 secondPointId;
};
#endif // VTOOLTRIANGLE_H
diff --git a/src/tools/nodeDetails/vabstractnode.cpp b/src/tools/nodeDetails/vabstractnode.cpp
index 43f39520c..ad3cb74a0 100644
--- a/src/tools/nodeDetails/vabstractnode.cpp
+++ b/src/tools/nodeDetails/vabstractnode.cpp
@@ -32,8 +32,8 @@
const QString VAbstractNode::AttrIdObject = QStringLiteral("idObject");
const QString VAbstractNode::AttrIdTool = QStringLiteral("idTool");
-VAbstractNode::VAbstractNode(VPattern *doc, VContainer *data, const qint64 &id, const qint64 &idNode,
- const qint64 &idTool, QObject *parent)
+VAbstractNode::VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode,
+ const quint32 &idTool, QObject *parent)
: VAbstractTool(doc, data, id, parent), idNode(idNode), idTool(idTool)
{
_referens = 0;
diff --git a/src/tools/nodeDetails/vabstractnode.h b/src/tools/nodeDetails/vabstractnode.h
index 181cfd165..8fc0ced14 100644
--- a/src/tools/nodeDetails/vabstractnode.h
+++ b/src/tools/nodeDetails/vabstractnode.h
@@ -46,8 +46,8 @@ public:
* @param id object id in containerNode.
* @param parent parent object.
*/
- VAbstractNode(VPattern *doc, VContainer *data, const qint64 &id, const qint64 &idNode,
- const qint64 &idTool, QObject *parent = 0);
+ VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode,
+ const quint32 &idTool, QObject *parent = 0);
virtual ~VAbstractNode() {}
static const QString AttrIdObject;
static const QString AttrIdTool;
@@ -56,11 +56,11 @@ protected:
/**
* @brief idNodenode id.
*/
- qint64 idNode;
+ quint32 idNode;
/**
* @brief idTool id tool.
*/
- qint64 idTool;
+ quint32 idTool;
/**
* @brief AddToModeling add tag to modeling tag current pattern peace.
* @param domElement tag.
diff --git a/src/tools/nodeDetails/vnodearc.cpp b/src/tools/nodeDetails/vnodearc.cpp
index fe2516375..8548e93f7 100644
--- a/src/tools/nodeDetails/vnodearc.cpp
+++ b/src/tools/nodeDetails/vnodearc.cpp
@@ -33,8 +33,8 @@
const QString VNodeArc::TagName = QStringLiteral("arc");
const QString VNodeArc::ToolType = QStringLiteral("modeling");
-VNodeArc::VNodeArc(VPattern *doc, VContainer *data, qint64 id, qint64 idArc, const Tool::Sources &typeCreation,
- const qint64 &idTool, QObject *qoParent, QGraphicsItem *parent)
+VNodeArc::VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Tool::Sources &typeCreation,
+ const quint32 &idTool, QObject *qoParent, QGraphicsItem *parent)
:VAbstractNode(doc, data, id, idArc, idTool, qoParent), QGraphicsPathItem(parent)
{
RefreshGeometry();
@@ -50,8 +50,8 @@ VNodeArc::VNodeArc(VPattern *doc, VContainer *data, qint64 id, qint64 idArc, con
}
}
-void VNodeArc::Create(VPattern *doc, VContainer *data, qint64 id, qint64 idArc, const Document::Documents &parse,
- const Tool::Sources &typeCreation, const qint64 &idTool, QObject *parent)
+void VNodeArc::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse,
+ const Tool::Sources &typeCreation, const quint32 &idTool, QObject *parent)
{
VAbstractTool::AddRecord(id, Tool::NodeArc, doc);
if (parse == Document::FullParse)
diff --git a/src/tools/nodeDetails/vnodearc.h b/src/tools/nodeDetails/vnodearc.h
index 6ab04e358..34ff14e4c 100644
--- a/src/tools/nodeDetails/vnodearc.h
+++ b/src/tools/nodeDetails/vnodearc.h
@@ -48,8 +48,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VNodeArc(VPattern *doc, VContainer *data, qint64 id, qint64 idArc,
- const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0,
+ VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc,
+ const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0,
QGraphicsItem * parent = 0);
/**
* @brief Create help create tool.
@@ -60,8 +60,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(VPattern *doc, VContainer *data, qint64 id, qint64 idArc, const Document::Documents &parse,
- const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *parent = 0);
+ static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse,
+ const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = 0);
static const QString TagName;
static const QString ToolType;
/**
diff --git a/src/tools/nodeDetails/vnodepoint.cpp b/src/tools/nodeDetails/vnodepoint.cpp
index a3d7ffd14..4a10d8508 100644
--- a/src/tools/nodeDetails/vnodepoint.cpp
+++ b/src/tools/nodeDetails/vnodepoint.cpp
@@ -33,8 +33,8 @@
const QString VNodePoint::TagName = QStringLiteral("point");
const QString VNodePoint::ToolType = QStringLiteral("modeling");
-VNodePoint::VNodePoint(VPattern *doc, VContainer *data, qint64 id, qint64 idPoint,
- const Tool::Sources &typeCreation, const qint64 &idTool, QObject *qoParent,
+VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
+ const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
QGraphicsItem *parent)
:VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(toPixel(1.5)),
namePoint(0), lineName(0)
@@ -58,8 +58,8 @@ VNodePoint::VNodePoint(VPattern *doc, VContainer *data, qint64 id, qint64 idPoin
}
}
-void VNodePoint::Create(VPattern *doc, VContainer *data, qint64 id, qint64 idPoint,
- const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool,
+void VNodePoint::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
+ const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool,
QObject *parent)
{
VAbstractTool::AddRecord(id, Tool::NodePoint, doc);
diff --git a/src/tools/nodeDetails/vnodepoint.h b/src/tools/nodeDetails/vnodepoint.h
index ea66884c7..cea90ffd3 100644
--- a/src/tools/nodeDetails/vnodepoint.h
+++ b/src/tools/nodeDetails/vnodepoint.h
@@ -48,8 +48,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VNodePoint(VPattern *doc, VContainer *data, qint64 id, qint64 idPoint,
- const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0,
+ VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
+ const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0,
QGraphicsItem * parent = 0 );
/**
* @brief Create help create tool.
@@ -60,8 +60,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(VPattern *doc, VContainer *data, qint64 id, qint64 idPoint,
- const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool = 0,
+ static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
+ const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool = 0,
QObject *parent = 0);
static const QString TagName;
static const QString ToolType;
diff --git a/src/tools/nodeDetails/vnodespline.cpp b/src/tools/nodeDetails/vnodespline.cpp
index 778cf3c62..13c04cf02 100644
--- a/src/tools/nodeDetails/vnodespline.cpp
+++ b/src/tools/nodeDetails/vnodespline.cpp
@@ -33,8 +33,8 @@
const QString VNodeSpline::TagName = QStringLiteral("spline");
const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline");
-VNodeSpline::VNodeSpline(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Tool::Sources &typeCreation, const qint64 &idTool, QObject *qoParent,
+VNodeSpline::VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
QGraphicsItem * parent)
:VAbstractNode(doc, data, id, idSpline, idTool, qoParent), QGraphicsPathItem(parent)
{
@@ -51,9 +51,9 @@ VNodeSpline::VNodeSpline(VPattern *doc, VContainer *data, qint64 id, qint64 idSp
}
}
-VNodeSpline *VNodeSpline::Create(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
+VNodeSpline *VNodeSpline::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
const Document::Documents &parse, const Tool::Sources &typeCreation,
- const qint64 &idTool, QObject *parent)
+ const quint32 &idTool, QObject *parent)
{
VAbstractTool::AddRecord(id, Tool::NodeSpline, doc);
VNodeSpline *spl = 0;
diff --git a/src/tools/nodeDetails/vnodespline.h b/src/tools/nodeDetails/vnodespline.h
index aebc2b3c4..a7b1b1729 100644
--- a/src/tools/nodeDetails/vnodespline.h
+++ b/src/tools/nodeDetails/vnodespline.h
@@ -48,8 +48,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VNodeSpline(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0,
+ VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0,
QGraphicsItem * parent = 0);
/**
* @brief Create help create tool.
@@ -61,9 +61,9 @@ public:
* @param typeCreation way we create this tool.
* @return
*/
- static VNodeSpline *Create(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
+ static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
const Document::Documents &parse, const Tool::Sources &typeCreation,
- const qint64 &idTool = 0, QObject *parent = 0);
+ const quint32 &idTool = 0, QObject *parent = 0);
static const QString TagName;
static const QString ToolType;
/**
diff --git a/src/tools/nodeDetails/vnodesplinepath.cpp b/src/tools/nodeDetails/vnodesplinepath.cpp
index db5effcfd..9f5000ef6 100644
--- a/src/tools/nodeDetails/vnodesplinepath.cpp
+++ b/src/tools/nodeDetails/vnodesplinepath.cpp
@@ -33,8 +33,8 @@
const QString VNodeSplinePath::TagName = QStringLiteral("spline");
const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath");
-VNodeSplinePath::VNodeSplinePath(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Tool::Sources &typeCreation, const qint64 &idTool, QObject *qoParent,
+VNodeSplinePath::VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
QGraphicsItem * parent)
:VAbstractNode(doc, data, id, idSpline, idTool, qoParent), QGraphicsPathItem(parent)
{
@@ -51,8 +51,8 @@ VNodeSplinePath::VNodeSplinePath(VPattern *doc, VContainer *data, qint64 id, qin
}
}
-void VNodeSplinePath::Create(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool,
+void VNodeSplinePath::Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool,
QObject *parent)
{
VAbstractTool::AddRecord(id, Tool::NodeSplinePath, doc);
diff --git a/src/tools/nodeDetails/vnodesplinepath.h b/src/tools/nodeDetails/vnodesplinepath.h
index 5f35b8607..248773d6f 100644
--- a/src/tools/nodeDetails/vnodesplinepath.h
+++ b/src/tools/nodeDetails/vnodesplinepath.h
@@ -48,8 +48,8 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VNodeSplinePath(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Tool::Sources &typeCreation, const qint64 &idTool = 0, QObject *qoParent = 0,
+ VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0,
QGraphicsItem * parent = 0);
/**
* @brief Create help create tool.
@@ -60,8 +60,8 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(VPattern *doc, VContainer *data, qint64 id, qint64 idSpline,
- const Document::Documents &parse, const Tool::Sources &typeCreation, const qint64 &idTool = 0,
+ static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
+ const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool = 0,
QObject *parent = 0);
static const QString TagName;
static const QString ToolType;
diff --git a/src/tools/vabstracttool.cpp b/src/tools/vabstracttool.cpp
index b1cc2a69c..7a1ede620 100644
--- a/src/tools/vabstracttool.cpp
+++ b/src/tools/vabstracttool.cpp
@@ -69,7 +69,7 @@ const QString VAbstractTool::TypeLineDotLine = QStringLiteral("dotLine");
const QString VAbstractTool::TypeLineDashDotLine = QStringLiteral("dashDotLine");
const QString VAbstractTool::TypeLineDashDotDotLine = QStringLiteral("dashDotDotLine");
-VAbstractTool::VAbstractTool(VPattern *doc, VContainer *data, qint64 id, QObject *parent)
+VAbstractTool::VAbstractTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent)
:VDataTool(data, parent), doc(doc), id(id), baseColor(Qt::black), currentColor(Qt::black), typeLine(TypeLineLine)
{
Q_CHECK_PTR(doc);
@@ -303,9 +303,9 @@ const QStringList VAbstractTool::Styles()
return styles;
}
-void VAbstractTool::AddRecord(const qint64 id, const Tool::Tools &toolType, VPattern *doc)
+void VAbstractTool::AddRecord(const quint32 id, const Tool::Tools &toolType, VPattern *doc)
{
- qint64 cursor = doc->getCursor();
+ quint32 cursor = doc->getCursor();
QVector *history = doc->getHistory();
if (cursor <= 0)
{
diff --git a/src/tools/vabstracttool.h b/src/tools/vabstracttool.h
index b866e14c0..13b170661 100644
--- a/src/tools/vabstracttool.h
+++ b/src/tools/vabstracttool.h
@@ -47,7 +47,7 @@ public:
* @param id object id in container.
* @param parent parent object.
*/
- VAbstractTool(VPattern *doc, VContainer *data, qint64 id, QObject *parent = 0);
+ VAbstractTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent = 0);
virtual ~VAbstractTool(){}
/**
* @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view.
@@ -93,7 +93,7 @@ public:
* @brief getId return object id.
* @return id.
*/
- inline qint64 getId() const {return id;}
+ inline quint32 getId() const {return id;}
/**
* @brief LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0.
* @param line line
@@ -153,7 +153,7 @@ public:
* @param toolType tool type
* @param doc dom document container
*/
- static void AddRecord(const qint64 id, const Tool::Tools &toolType, VPattern *doc);
+ static void AddRecord(const quint32 id, const Tool::Tools &toolType, VPattern *doc);
public slots:
/**
* @brief FullUpdateFromFile update tool data form file.
@@ -169,7 +169,7 @@ signals:
* @param id object id in container.
* @param type type of scene object.
*/
- void ChoosedTool(qint64 id, Scene::Scenes type);
+ void ChoosedTool(quint32 id, Scene::Scenes type);
/**
* @brief FullUpdateTree emit if need reparse pattern file.
*/
@@ -182,7 +182,7 @@ protected:
/**
* @brief id object id.
*/
- const qint64 id;
+ const quint32 id;
/**
* @brief baseColor base color for tool.
*/
diff --git a/src/tools/vdatatool.h b/src/tools/vdatatool.h
index 34fbdd5b7..6f6c5a6c3 100644
--- a/src/tools/vdatatool.h
+++ b/src/tools/vdatatool.h
@@ -66,7 +66,7 @@ public:
* @brief referens return count of referens.
* @return count count of referens.
*/
- virtual inline qint64 referens() const {return _referens;}
+ virtual inline quint32 referens() const {return _referens;}
/**
* @brief incrementReferens increment referens.
*/
@@ -83,7 +83,7 @@ protected:
/**
* @brief _referens keep count tools what use this tool. If value more than 1 you can't delete tool.
*/
- qint64 _referens;
+ quint32 _referens;
};
#endif // VDATATOOL_H
diff --git a/src/tools/vtooldetail.cpp b/src/tools/vtooldetail.cpp
index 278e2713a..a07ca47f4 100644
--- a/src/tools/vtooldetail.cpp
+++ b/src/tools/vtooldetail.cpp
@@ -40,7 +40,7 @@ const QString VToolDetail::AttrNodeType = QStringLiteral("nodeType");
const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour");
const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling");
-VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation,
+VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem *parent)
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialog(0), sceneDetails(scene)
{
@@ -102,7 +102,7 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
VDetail det;
for (ptrdiff_t i = 0; i< detail.CountNode(); ++i)
{
- qint64 id = 0;
+ quint32 id = 0;
switch (detail[i].getTypeTool())
{
case (Tool::NodePoint):
@@ -140,10 +140,10 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern
Create(0, det, scene, doc, data, Document::FullParse, Tool::FromGui);
}
-void VToolDetail::Create(const qint64 &_id, const VDetail &newDetail, VMainGraphicsScene *scene, VPattern *doc,
+void VToolDetail::Create(const quint32 &_id, const VDetail &newDetail, VMainGraphicsScene *scene, VPattern *doc,
VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation)
{
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui || typeCreation == Tool::FromTool)
{
id = data->AddDetail(newDetail);
@@ -162,7 +162,7 @@ void VToolDetail::Create(const qint64 &_id, const VDetail &newDetail, VMainGraph
VToolDetail *detail = new VToolDetail(doc, data, id, typeCreation, scene);
scene->addItem(detail);
connect(detail, &VToolDetail::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem);
- QHash* tools = doc->getTools();
+ QHash* tools = doc->getTools();
tools->insert(id, detail);
}
}
@@ -198,8 +198,8 @@ void VToolDetail::FullUpdateFromGui(int result)
AddNode(domElement, det[i]);
}
VDetail detail = VAbstractTool::data.GetDetail(id);
- QList list = detail.Missing(det);
- QHash* tools = doc->getTools();
+ QList list = detail.Missing(det);
+ QHash* tools = doc->getTools();
if (list.size()>0)
{
for (qint32 i = 0; i < list.size(); ++i)
@@ -404,7 +404,7 @@ template
//cppcheck-suppress unusedFunction
void VToolDetail::InitTool(VMainGraphicsScene *scene, const VNodeDetail &node)
{
- QHash* tools = doc->getTools();
+ QHash* tools = doc->getTools();
Q_CHECK_PTR(tools);
Tool *tool = qobject_cast(tools->value(node.getId()));
Q_CHECK_PTR(tool);
diff --git a/src/tools/vtooldetail.h b/src/tools/vtooldetail.h
index 5983c8db7..9d6f856e6 100644
--- a/src/tools/vtooldetail.h
+++ b/src/tools/vtooldetail.h
@@ -49,7 +49,7 @@ public:
* @param scene pointer to scene.
* @param parent parent object
*/
- VToolDetail(VPattern *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation,
+ VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem * parent = 0);
~VToolDetail();
/**
@@ -63,7 +63,7 @@ public:
* @param id id parent object.
* @return id for new object.
*/
- static qint64 CreateNode(VContainer *data, const qint64 &id)
+ static quint32 CreateNode(VContainer *data, const quint32 &id)
{
//We can't use exist object. Need create new.
T *node = new T(*data->GeometricObject(id));
@@ -90,7 +90,7 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 &_id, const VDetail &newDetail, VMainGraphicsScene *scene,
+ static void Create(const quint32 &_id, const VDetail &newDetail, VMainGraphicsScene *scene,
VPattern *doc, VContainer *data, const Document::Documents &parse,
const Tool::Sources &typeCreation);
static const QString TagName;
diff --git a/src/tools/vtooluniondetails.cpp b/src/tools/vtooluniondetails.cpp
index 9ecde2a06..092e08f85 100644
--- a/src/tools/vtooluniondetails.cpp
+++ b/src/tools/vtooluniondetails.cpp
@@ -41,8 +41,8 @@ const QString VToolUnionDetails::AttrNodeType = QStringLiteral("nodeType");
const QString VToolUnionDetails::NodeTypeContour = QStringLiteral("Contour");
const QString VToolUnionDetails::NodeTypeModeling = QStringLiteral("Modeling");
-VToolUnionDetails::VToolUnionDetails(VPattern *doc, VContainer *data, const qint64 &id, const VDetail &d1,
- const VDetail &d2, const ptrdiff_t &indexD1, const ptrdiff_t &indexD2,
+VToolUnionDetails::VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1,
+ const VDetail &d2, const quint32 &indexD1, const quint32 &indexD2,
const Tool::Sources &typeCreation, QObject *parent)
:VAbstractTool(doc, data, id, parent), d1(d1), d2(d2), indexD1(indexD1), indexD2(indexD2)
{
@@ -57,10 +57,10 @@ VToolUnionDetails::VToolUnionDetails(VPattern *doc, VContainer *data, const qint
}
void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer *data, VDetail &newDetail,
- const VDetail &det, const ptrdiff_t &i, const qint64 &idTool, const qreal &dx,
- const qreal &dy, const qint64 &pRotate, const qreal &angle)
+ const VDetail &det, const ptrdiff_t &i, const quint32 &idTool, const qreal &dx,
+ const qreal &dy, const quint32 &pRotate, const qreal &angle)
{
- qint64 id = 0, idObject = 0;
+ quint32 id = 0, idObject = 0;
switch (det.at(i).getTypeTool())
{
case (Tool::NodePoint):
@@ -106,7 +106,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
QLineF l1(center->toQPointF(), p1.toQPointF());
QLineF l2(center->toQPointF(), p2.toQPointF());
center->setMode(Draw::Modeling);
- qint64 idCenter = data->AddGObject(center);
+ quint32 idCenter = data->AddGObject(center);
Q_UNUSED(idCenter);
VArc *arc1 = new VArc(*center, arc->GetRadius(), arc->GetFormulaRadius(),
l1.angle(), QString().setNum(l1.angle()), l2.angle(),
@@ -137,7 +137,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
VPointF *p1 = new VPointF(spline->GetP1());
Q_CHECK_PTR(p1);
BiasRotatePoint(p1, dx, dy, data->GeometricObject(pRotate)->toQPointF(), angle);
- qint64 idP1 = data->AddGObject(p1);
+ quint32 idP1 = data->AddGObject(p1);
VPointF p2 = VPointF(spline->GetP2());
BiasRotatePoint(&p2, dx, dy, data->GeometricObject(pRotate)->toQPointF(), angle);
@@ -148,7 +148,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
VPointF *p4 = new VPointF(spline->GetP4());
Q_CHECK_PTR(p4);
BiasRotatePoint(p4, dx, dy, data->GeometricObject(pRotate)->toQPointF(), angle);
- qint64 idP4 = data->AddGObject(p4);
+ quint32 idP4 = data->AddGObject(p4);
VSpline *spl = new VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline->GetKcurve(), 0,
Draw::Modeling);
@@ -186,7 +186,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
Q_CHECK_PTR(p1);
BiasRotatePoint(p1, dx, dy, data->GeometricObject(pRotate)->toQPointF(),
angle);
- qint64 idP1 = data->AddGObject(p1);
+ quint32 idP1 = data->AddGObject(p1);
--k;
VPointF p2 = VPointF(spline.GetP2());
@@ -201,7 +201,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
Q_CHECK_PTR(p4);
BiasRotatePoint(p4, dx, dy, data->GeometricObject(pRotate)->toQPointF(),
angle);
- qint64 idP4 = data->AddGObject(p4);
+ quint32 idP4 = data->AddGObject(p4);
--k;
VSpline spl = VSpline(*p1, p2.toQPointF(), p3.toQPointF(), *p4, spline.GetKcurve());
@@ -235,8 +235,8 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer
newDetail.append(VNodeDetail(id, det.at(i).getTypeTool(), NodeDetail::Contour));
}
-void VToolUnionDetails::UpdatePoints(const qint64 &idDetail, VContainer *data, const VDetail &det, const ptrdiff_t &i,
- qint64 &idCount, const qreal &dx, const qreal &dy, const qint64 &pRotate,
+void VToolUnionDetails::UpdatePoints(const quint32 &idDetail, VContainer *data, const VDetail &det, const ptrdiff_t &i,
+ quint32 &idCount, const qreal &dx, const qreal &dy, const quint32 &pRotate,
const qreal &angle)
{
switch (det.at(i).getTypeTool())
@@ -415,13 +415,13 @@ void VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsScene *scene, VP
Tool::FromGui);
}
-void VToolUnionDetails::Create(const qint64 _id, const VDetail &d1, const VDetail &d2, const qint64 &d1id,
- const qint64 &d2id, const ptrdiff_t &indexD1, const ptrdiff_t &indexD2,
+void VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id,
+ const quint32 &d2id, const quint32 &indexD1, const quint32 &indexD2,
VMainGraphicsScene *scene, VPattern *doc, VContainer *data,
const Document::Documents &parse, const Tool::Sources &typeCreation)
{
VToolUnionDetails *unionDetails = 0;
- qint64 id = _id;
+ quint32 id = _id;
if (typeCreation == Tool::FromGui)
{
id = data->getNextId();
@@ -438,7 +438,7 @@ void VToolUnionDetails::Create(const qint64 _id, const VDetail &d1, const VDetai
{
//Scene doesn't show this tool, so doc will destroy this object.
unionDetails = new VToolUnionDetails(doc, data, id, d1, d2, indexD1, indexD2, typeCreation, doc);
- QHash* tools = doc->getTools();
+ QHash* tools = doc->getTools();
tools->insert(id, unionDetails);
for (ptrdiff_t i = 0; i < d1.CountNode(); ++i)
{
@@ -528,7 +528,7 @@ void VToolUnionDetails::Create(const qint64 _id, const VDetail &d1, const VDetai
newDetail.setName("Detail");
VToolDetail::Create(0, newDetail, scene, doc, data, parse, Tool::FromTool);
- QHash* tools = doc->getTools();
+ QHash* tools = doc->getTools();
VToolDetail *toolDet = qobject_cast(tools->value(d1id));
toolDet->Remove();
@@ -540,7 +540,7 @@ void VToolUnionDetails::Create(const qint64 _id, const VDetail &d1, const VDetai
{
VDetail uD1 = d1.RemoveEdge(indexD1);
VDetail uD2 = d2.RemoveEdge(indexD2);
- qint64 idCount = 0;
+ quint32 idCount = 0;
qint32 j = 0, i = 0;
qint32 nD1 = uD1.CountNode();
qint32 nD2 = uD2.CountNode();
@@ -635,7 +635,7 @@ QVector VToolUnionDetails::GetDetailFromFile(VPattern *doc, const QDomE
{
if (element.tagName() == VToolUnionDetails::TagNode)
{
- qint64 id = doc->GetParametrLongLong(element, VToolDetail::AttrIdObject, "0");
+ quint32 id = doc->GetParametrUInt(element, VToolDetail::AttrIdObject, "0");
qreal mx = toPixel(doc->GetParametrDouble(element, VAbstractTool::AttrMx, "0.0"));
qreal my = toPixel(doc->GetParametrDouble(element, VAbstractTool::AttrMy, "0.0"));
Tool::Tools tool;
diff --git a/src/tools/vtooluniondetails.h b/src/tools/vtooluniondetails.h
index d8d507b01..aae979e7b 100644
--- a/src/tools/vtooluniondetails.h
+++ b/src/tools/vtooluniondetails.h
@@ -51,9 +51,9 @@ public:
* @param typeCreation way we create this tool.
* @param parent parent object.
*/
- VToolUnionDetails(VPattern *doc, VContainer *data, const qint64 &id, const VDetail &d1, const VDetail &d2,
- const ptrdiff_t &indexD1, const ptrdiff_t &indexD2,
- const Tool::Sources &typeCreation, QObject *parent = 0);
+ VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2,
+ const quint32 &indexD1, const quint32 &indexD2, const Tool::Sources &typeCreation,
+ QObject *parent = 0);
/**
* @brief setDialog set dialog when user want change tool option.
*/
@@ -80,10 +80,9 @@ public:
* @param parse parser file mode.
* @param typeCreation way we create this tool.
*/
- static void Create(const qint64 _id, const VDetail &d1, const VDetail &d2, const qint64 &d1id, const qint64 &d2id,
- const ptrdiff_t &indexD1, const ptrdiff_t &indexD2, VMainGraphicsScene *scene,
- VPattern *doc, VContainer *data, const Document::Documents &parse,
- const Tool::Sources &typeCreation);
+ static void Create(const quint32 _id, const VDetail &d1, const VDetail &d2, const quint32 &d1id, const quint32 &d2id,
+ const quint32 &indexD1, const quint32 &indexD2, VMainGraphicsScene *scene, VPattern *doc,
+ VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation);
/**
* @brief GetDetailFromFile parse detail from file.
* @param doc dom document container.
@@ -116,8 +115,8 @@ public:
* @param angle angle rotation.
*/
static void AddToNewDetail(QObject *tool, VPattern *doc, VContainer *data, VDetail &newDetail,
- const VDetail &det, const ptrdiff_t &i, const qint64 &idTool, const qreal &dx = 0,
- const qreal &dy = 0, const qint64 &pRotate = 0, const qreal &angle = 0);
+ const VDetail &det, const ptrdiff_t &i, const quint32 &idTool, const qreal &dx = 0,
+ const qreal &dy = 0, const quint32 &pRotate = 0, const qreal &angle = 0);
/**
* @brief UpdatePoints update data for united details.
* @param idDetail id united detail.
@@ -130,8 +129,8 @@ public:
* @param pRotate point rotation.
* @param angle angle rotation.
*/
- static void UpdatePoints(const qint64 &idDetail, VContainer *data, const VDetail &det, const ptrdiff_t &i,
- qint64 &idCount, const qreal &dx = 0, const qreal &dy = 0, const qint64 &pRotate = 0,
+ static void UpdatePoints(const quint32 &idDetail, VContainer *data, const VDetail &det, const ptrdiff_t &i,
+ quint32 &idCount, const qreal &dx = 0, const qreal &dy = 0, const quint32 &pRotate = 0,
const qreal &angle = 0);
/**
* @brief BiasRotatePoint bias and rotate point.
@@ -170,11 +169,11 @@ private:
/**
* @brief indexD1 index edge in first detail.
*/
- ptrdiff_t indexD1;
+ quint32 indexD1;
/**
* @brief indexD2 index edge in second detail.
*/
- ptrdiff_t indexD2;
+ quint32 indexD2;
/**
* @brief AddDetail add detail to xml file.
* @param domElement tag in xml tree.
diff --git a/src/widgets/vmaingraphicsscene.cpp b/src/widgets/vmaingraphicsscene.cpp
index e2bd07775..7b1b9320d 100644
--- a/src/widgets/vmaingraphicsscene.cpp
+++ b/src/widgets/vmaingraphicsscene.cpp
@@ -62,7 +62,7 @@ void VMainGraphicsScene::setTransform(const QTransform &transform)
_transform = transform;
}
-void VMainGraphicsScene::ChoosedItem(qint64 id, const Scene::Scenes &type)
+void VMainGraphicsScene::ChoosedItem(quint32 id, const Scene::Scenes &type)
{
emit ChoosedObject(id, type);
}
diff --git a/src/widgets/vmaingraphicsscene.h b/src/widgets/vmaingraphicsscene.h
index d8f1cd9c2..49b134cf8 100644
--- a/src/widgets/vmaingraphicsscene.h
+++ b/src/widgets/vmaingraphicsscene.h
@@ -85,7 +85,7 @@ public slots:
* @param id object id.
* @param type object scene type.
*/
- void ChoosedItem(qint64 id, const Scene::Scenes &type);
+ void ChoosedItem(quint32 id, const Scene::Scenes &type);
/**
* @brief SetFactor set current scale factor of scene.
* @param factor scene scale factor. scene scale factor.
@@ -118,7 +118,7 @@ signals:
* @param id object id.
* @param type object scene type.
*/
- void ChoosedObject(qint64 id, Scene::Scenes type);
+ void ChoosedObject(quint32 id, Scene::Scenes type);
/**
* @brief NewFactor send new scale factor.
* @param factor scene scale factor.
diff --git a/src/widgets/vsimplearc.cpp b/src/widgets/vsimplearc.cpp
index b9151da3e..f6cf369eb 100644
--- a/src/widgets/vsimplearc.cpp
+++ b/src/widgets/vsimplearc.cpp
@@ -28,7 +28,7 @@
#include "vsimplearc.h"
-VSimpleArc::VSimpleArc(qint64 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
+VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)
{
if (factor == 0)
diff --git a/src/widgets/vsimplearc.h b/src/widgets/vsimplearc.h
index 408d12f6e..32665a254 100644
--- a/src/widgets/vsimplearc.h
+++ b/src/widgets/vsimplearc.h
@@ -55,13 +55,13 @@ public:
* @param factor scale factor.
* @param parent parent object.
*/
- VSimpleArc(qint64 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0);
+ VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0);
signals:
/**
* @brief Choosed send id when clicked.
* @param id arc id.
*/
- void Choosed(qint64 id);
+ void Choosed(quint32 id);
protected:
/**
* @brief mouseReleaseEvent handle mouse release events.
@@ -83,7 +83,7 @@ private:
/**
* @brief id arc id.
*/
- qint64 id;
+ quint32 id;
/**
* @brief factor scale factor.
*/
diff --git a/src/widgets/vsimplespline.cpp b/src/widgets/vsimplespline.cpp
index c77be792a..3e5d2d063 100644
--- a/src/widgets/vsimplespline.cpp
+++ b/src/widgets/vsimplespline.cpp
@@ -29,7 +29,7 @@
#include "vsimplespline.h"
#include "../options.h"
-VSimpleSpline::VSimpleSpline(qint64 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
+VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)
{
if (factor == 0)
diff --git a/src/widgets/vsimplespline.h b/src/widgets/vsimplespline.h
index d6c8ae2cc..4853c1cbe 100644
--- a/src/widgets/vsimplespline.h
+++ b/src/widgets/vsimplespline.h
@@ -55,13 +55,13 @@ public:
* @param currentColor current color.
* @param parent parent object.
*/
- VSimpleSpline(qint64 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0);
+ VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0);
signals:
/**
* @brief Choosed send id when clicked.
* @param id spline id.
*/
- void Choosed(qint64 id);
+ void Choosed(quint32 id);
protected:
/**
* @brief mouseReleaseEvent handle mouse release events.
@@ -83,7 +83,7 @@ private:
/**
* @brief id spline id.
*/
- qint64 id;
+ quint32 id;
/**
* @brief factor scale factor.
*/
diff --git a/src/widgets/vsimplesplinepath.cpp b/src/widgets/vsimplesplinepath.cpp
index 1488fb1d8..5be43d00d 100644
--- a/src/widgets/vsimplesplinepath.cpp
+++ b/src/widgets/vsimplesplinepath.cpp
@@ -28,7 +28,7 @@
#include "vsimplesplinepath.h"
-VSimpleSplinePath::VSimpleSplinePath(VPattern *doc, VContainer *data, qint64 id, qreal *factor)
+VSimpleSplinePath::VSimpleSplinePath(VPattern *doc, VContainer *data, quint32 id, qreal *factor)
:VAbstractTool(doc, data, id), factor(factor)
{
}
diff --git a/src/widgets/vsimplesplinepath.h b/src/widgets/vsimplesplinepath.h
index ae7af4fa7..6cb9df94b 100644
--- a/src/widgets/vsimplesplinepath.h
+++ b/src/widgets/vsimplesplinepath.h
@@ -47,7 +47,7 @@ public:
* @param id spline path id.
* @param factor scale factor.
*/
- VSimpleSplinePath(VPattern *doc, VContainer *data, qint64 id, qreal *factor);
+ VSimpleSplinePath(VPattern *doc, VContainer *data, quint32 id, qreal *factor);
protected:
/**
* @brief mouseReleaseEvent handle mouse release events.
diff --git a/src/xml/vdomdocument.cpp b/src/xml/vdomdocument.cpp
index 97155f9a5..041330daf 100644
--- a/src/xml/vdomdocument.cpp
+++ b/src/xml/vdomdocument.cpp
@@ -100,17 +100,16 @@ bool VDomDocument::find(const QDomElement &node, const QString& id)
return false;
}
-qint64 VDomDocument::GetParametrLongLong(const QDomElement &domElement, const QString &name,
- const QString &defValue) const
+quint32 VDomDocument::GetParametrUInt(const QDomElement &domElement, const QString &name, const QString &defValue) const
{
Q_ASSERT_X(name.isEmpty() == false, Q_FUNC_INFO, "name of parametr is empty");
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
bool ok = false;
const QString parametr = GetParametrString(domElement, name, defValue);
- const qint64 id = parametr.toLongLong(&ok);
+ const quint32 id = parametr.toUInt(&ok);
if (ok == false)
{
- throw VExceptionConversionError(tr("Can't convert toLongLong parameter"), name);
+ throw VExceptionConversionError(tr("Can't convert toUInt parameter"), name);
}
return id;
}
diff --git a/src/xml/vdomdocument.h b/src/xml/vdomdocument.h
index de30543de..2b510dd66 100644
--- a/src/xml/vdomdocument.h
+++ b/src/xml/vdomdocument.h
@@ -83,7 +83,7 @@ public:
* @param name attribute name.
* @return long long value.
*/
- qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name,
+ quint32 GetParametrUInt(const QDomElement& domElement, const QString &name,
const QString &defValue) const;
/**
* @brief GetParametrString return string value of attribute.
diff --git a/src/xml/vpattern.cpp b/src/xml/vpattern.cpp
index 9b152c98b..ae0cd3314 100644
--- a/src/xml/vpattern.cpp
+++ b/src/xml/vpattern.cpp
@@ -49,7 +49,7 @@ const QString VPattern::TagDraw = QStringLiteral("draw");
const QString VPattern::AttrName = QStringLiteral("name");
VPattern::VPattern(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode, QObject *parent)
- : QObject(parent), VDomDocument(data), nameActivDraw(QString()), tools(QHash()),
+ : QObject(parent), VDomDocument(data), nameActivDraw(QString()), tools(QHash()),
history(QVector()), cursor(0), comboBoxDraws(comboBoxDraws), mode(mode), patternModified(false)
{
}
@@ -202,7 +202,7 @@ void VPattern::Parse(const Document::Documents &parse, VMainGraphicsScene *scene
}
}
-VDataTool *VPattern::getTool(const qint64 &id)
+VDataTool *VPattern::getTool(const quint32 &id)
{
if (tools.contains(id))
{
@@ -216,7 +216,7 @@ VDataTool *VPattern::getTool(const qint64 &id)
return 0;
}
-void VPattern::setCursor(const qint64 &value)
+void VPattern::setCursor(const quint32 &value)
{
cursor = value;
emit ChangedCursor(cursor);
@@ -230,7 +230,7 @@ void VPattern::setCurrentData()
if (nameActivDraw != nameDraw)
{
nameActivDraw = nameDraw;
- qint64 id = 0;
+ quint32 id = 0;
if (history.size() == 0)
{
return;
@@ -261,14 +261,14 @@ void VPattern::setCurrentData()
}
}
-void VPattern::AddTool(const qint64 &id, VDataTool *tool)
+void VPattern::AddTool(const quint32 &id, VDataTool *tool)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
Q_CHECK_PTR(tool);
tools.insert(id, tool);
}
-void VPattern::UpdateToolData(const qint64 &id, VContainer *data)
+void VPattern::UpdateToolData(const quint32 &id, VContainer *data)
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
Q_CHECK_PTR(data);
@@ -277,7 +277,7 @@ void VPattern::UpdateToolData(const qint64 &id, VContainer *data)
tool->VDataTool::setData(data);
}
-void VPattern::IncrementReferens(qint64 id) const
+void VPattern::IncrementReferens(quint32 id) const
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
VDataTool *tool = tools.value(id);
@@ -285,7 +285,7 @@ void VPattern::IncrementReferens(qint64 id) const
tool->incrementReferens();
}
-void VPattern::DecrementReferens(qint64 id) const
+void VPattern::DecrementReferens(quint32 id) const
{
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
VDataTool *tool = tools.value(id);
@@ -295,11 +295,11 @@ void VPattern::DecrementReferens(qint64 id) const
void VPattern::TestUniqueId() const
{
- QVector vector;
+ QVector vector;
CollectId(documentElement(), vector);
}
-qint64 VPattern::SPointActiveDraw()
+quint32 VPattern::SPointActiveDraw()
{
QDomElement calcElement;
if (GetActivNodeElement(TagCalculation, calcElement))
@@ -411,7 +411,7 @@ void VPattern::haveLiteChange()
emit patternChanged();
}
-void VPattern::ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable)
+void VPattern::ShowHistoryTool(quint32 id, Qt::GlobalColor color, bool enable)
{
emit ShowTool(id, color, enable);
}
@@ -504,13 +504,13 @@ void VPattern::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomEle
try
{
VDetail detail;
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
detail.setName(GetParametrString(domElement, VAbstractTool::AttrName, ""));
detail.setMx(toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "0.0")));
detail.setMy(toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "0.0")));
- detail.setSeamAllowance(GetParametrLongLong(domElement, VToolDetail::AttrSupplement, "1"));
+ detail.setSeamAllowance(GetParametrUInt(domElement, VToolDetail::AttrSupplement, "1"));
detail.setWidth(GetParametrDouble(domElement, VToolDetail::AttrWidth, "10.0"));
- detail.setClosed(GetParametrLongLong(domElement, VToolDetail::AttrClosed, "1"));
+ detail.setClosed(GetParametrUInt(domElement, VToolDetail::AttrClosed, "1"));
const QDomNodeList nodeList = domElement.childNodes();
const qint32 num = nodeList.size();
@@ -521,7 +521,7 @@ void VPattern::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomEle
{
if (element.tagName() == VToolDetail::TagNode)
{
- const qint64 id = GetParametrLongLong(element, VToolDetail::AttrIdObject, "0");
+ const quint32 id = GetParametrUInt(element, VToolDetail::AttrIdObject, "0");
const qreal mx = toPixel(GetParametrDouble(element, VAbstractTool::AttrMx, "0.0"));
const qreal my = toPixel(GetParametrDouble(element, VAbstractTool::AttrMy, "0.0"));
const NodeDetail::NodeDetails nodeType = NodeDetail::Contour;
@@ -600,7 +600,7 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
VToolSinglePoint *spoint = 0;
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "A");
const qreal x = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrX, "10.0"));
const qreal y = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrY, "10.0"));
@@ -636,14 +636,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 1: //VToolEndLine::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
- const qint64 basePointId = GetParametrLongLong(domElement, VAbstractTool::AttrBasePoint, "0");
+ const quint32 basePointId = GetParametrUInt(domElement, VAbstractTool::AttrBasePoint, "0");
const qreal angle = GetParametrDouble(domElement, VAbstractTool::AttrAngle, "0.0");
VToolEndLine::Create(id, name, typeLine, formula, angle, basePointId,
@@ -659,15 +659,15 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 2: //VToolAlongLine::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
VToolAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, scene, this,
data, parse, Tool::FromFile);
@@ -682,16 +682,16 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 3: //VToolShoulderPoint::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
- const qint64 p1Line = GetParametrLongLong(domElement, VAbstractTool::AttrP1Line, "0");
- const qint64 p2Line = GetParametrLongLong(domElement, VAbstractTool::AttrP2Line, "0");
- const qint64 pShoulder = GetParametrLongLong(domElement, VAbstractTool::AttrPShoulder, "0");
+ const quint32 p1Line = GetParametrUInt(domElement, VAbstractTool::AttrP1Line, "0");
+ const quint32 p2Line = GetParametrUInt(domElement, VAbstractTool::AttrP2Line, "0");
+ const quint32 pShoulder = GetParametrUInt(domElement, VAbstractTool::AttrPShoulder, "0");
VToolShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, scene, this,
data, parse, Tool::FromFile);
@@ -706,15 +706,15 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 4: //VToolNormal::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
const qreal angle = GetParametrDouble(domElement, VAbstractTool::AttrAngle, "0.0");
VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name,
@@ -730,16 +730,16 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 5: //VToolBisector::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "100.0");
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
- const qint64 thirdPointId = GetParametrLongLong(domElement, VAbstractTool::AttrThirdPoint, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 thirdPointId = GetParametrUInt(domElement, VAbstractTool::AttrThirdPoint, "0");
VToolBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId,
typeLine, name, mx, my, scene, this, data, parse, Tool::FromFile);
@@ -754,14 +754,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 6: //VToolLineIntersect::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
- const qint64 p1Line1Id = GetParametrLongLong(domElement, VAbstractTool::AttrP1Line1, "0");
- const qint64 p2Line1Id = GetParametrLongLong(domElement, VAbstractTool::AttrP2Line1, "0");
- const qint64 p1Line2Id = GetParametrLongLong(domElement, VAbstractTool::AttrP1Line2, "0");
- const qint64 p2Line2Id = GetParametrLongLong(domElement, VAbstractTool::AttrP2Line2, "0");
+ const quint32 p1Line1Id = GetParametrUInt(domElement, VAbstractTool::AttrP1Line1, "0");
+ const quint32 p2Line1Id = GetParametrUInt(domElement, VAbstractTool::AttrP2Line1, "0");
+ const quint32 p1Line2Id = GetParametrUInt(domElement, VAbstractTool::AttrP1Line2, "0");
+ const quint32 p2Line2Id = GetParametrUInt(domElement, VAbstractTool::AttrP2Line2, "0");
VToolLineIntersect::Create(id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, name,
mx, my, scene, this, data, parse, Tool::FromFile);
@@ -776,14 +776,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 7: //VToolPointOfContact::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString radius = GetParametrString(domElement, VAbstractTool::AttrRadius, "0");
- const qint64 center = GetParametrLongLong(domElement, VAbstractTool::AttrCenter, "0");
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 center = GetParametrUInt(domElement, VAbstractTool::AttrCenter, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name,
mx, my, scene, this,data, parse, Tool::FromFile);
@@ -798,9 +798,9 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 8: //VNodePoint::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 idObject = GetParametrLongLong(domElement, VAbstractNode::AttrIdObject, "0");
- const qint64 idTool = GetParametrLongLong(domElement, VAbstractNode::AttrIdTool, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 idObject = GetParametrUInt(domElement, VAbstractNode::AttrIdObject, "0");
+ const quint32 idTool = GetParametrUInt(domElement, VAbstractNode::AttrIdTool, "0");
const VPointF *point = data->GeometricObject(idObject );
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
@@ -818,15 +818,15 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 9: //VToolHeight::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine,
VAbstractTool::TypeLineLine);
- const qint64 basePointId = GetParametrLongLong(domElement, VAbstractTool::AttrBasePoint, "0");
- const qint64 p1LineId = GetParametrLongLong(domElement, VAbstractTool::AttrP1Line, "0");
- const qint64 p2LineId = GetParametrLongLong(domElement, VAbstractTool::AttrP2Line, "0");
+ const quint32 basePointId = GetParametrUInt(domElement, VAbstractTool::AttrBasePoint, "0");
+ const quint32 p1LineId = GetParametrUInt(domElement, VAbstractTool::AttrP1Line, "0");
+ const quint32 p2LineId = GetParametrUInt(domElement, VAbstractTool::AttrP2Line, "0");
VToolHeight::Create(id, name, typeLine, basePointId, p1LineId, p2LineId,
mx, my, scene, this, data, parse, Tool::FromFile);
@@ -841,14 +841,14 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 10: //VToolTriangle::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
- const qint64 axisP1Id = GetParametrLongLong(domElement, VAbstractTool::AttrAxisP1, "0");
- const qint64 axisP2Id = GetParametrLongLong(domElement, VAbstractTool::AttrAxisP2, "0");
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 axisP1Id = GetParametrUInt(domElement, VAbstractTool::AttrAxisP1, "0");
+ const quint32 axisP2Id = GetParametrUInt(domElement, VAbstractTool::AttrAxisP2, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
VToolTriangle::Create(id, name, axisP1Id, axisP2Id, firstPointId, secondPointId, mx, my, scene, this,
data, parse, Tool::FromFile);
@@ -863,12 +863,12 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 11: //VToolPointOfIntersection::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
- const qint64 firstPointId = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPointId = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 firstPointId = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPointId = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
VToolPointOfIntersection::Create(id, name, firstPointId, secondPointId,
mx, my, scene, this, data, parse,Tool::FromFile);
@@ -883,12 +883,12 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 12: //VToolCutSpline::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
- const qint64 splineId = GetParametrLongLong(domElement, VToolCutSpline::AttrSpline, "0");
+ const quint32 splineId = GetParametrUInt(domElement, VToolCutSpline::AttrSpline, "0");
VToolCutSpline::Create(id, name, formula, splineId, mx, my, scene, this, data, parse, Tool::FromFile);
}
@@ -902,12 +902,12 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 13: //VToolCutSplinePath::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
- const qint64 splinePathId = GetParametrLongLong(domElement, VToolCutSplinePath::AttrSplinePath, "0");
+ const quint32 splinePathId = GetParametrUInt(domElement, VToolCutSplinePath::AttrSplinePath, "0");
VToolCutSplinePath::Create(id, name, formula, splinePathId, mx, my,
scene, this, data, parse, Tool::FromFile);
@@ -922,12 +922,12 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, const QDomElement &d
case 14: //VToolCutArc::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const QString name = GetParametrString(domElement, VAbstractTool::AttrName, "");
const qreal mx = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMx, "10.0"));
const qreal my = toPixel(GetParametrDouble(domElement, VAbstractTool::AttrMy, "15.0"));
const QString formula = GetParametrString(domElement, VAbstractTool::AttrLength, "0");
- const qint64 arcId = GetParametrLongLong(domElement, VToolCutArc::AttrArc, "0");
+ const quint32 arcId = GetParametrUInt(domElement, VToolCutArc::AttrArc, "0");
VToolCutArc::Create(id, name, formula, arcId, mx, my, scene, this, data, parse, Tool::FromFile);
}
@@ -950,9 +950,9 @@ void VPattern::ParseLineElement(VMainGraphicsScene *scene, const QDomElement &do
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 firstPoint = GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0");
- const qint64 secondPoint = GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 firstPoint = GetParametrUInt(domElement, VAbstractTool::AttrFirstPoint, "0");
+ const quint32 secondPoint = GetParametrUInt(domElement, VAbstractTool::AttrSecondPoint, "0");
const QString typeLine = GetParametrString(domElement, VAbstractTool::AttrTypeLine, VAbstractTool::TypeLineLine);
VToolLine::Create(id, firstPoint, secondPoint, typeLine, scene, this, data, parse, Tool::FromFile);
@@ -978,9 +978,9 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
case 0: //VToolSpline::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 point1 = GetParametrLongLong(domElement, VAbstractTool::AttrPoint1, "0");
- const qint64 point4 = GetParametrLongLong(domElement, VAbstractTool::AttrPoint4, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 point1 = GetParametrUInt(domElement, VAbstractTool::AttrPoint1, "0");
+ const quint32 point4 = GetParametrUInt(domElement, VAbstractTool::AttrPoint4, "0");
const qreal angle1 = GetParametrDouble(domElement, VAbstractTool::AttrAngle1, "270.0");
const qreal angle2 = GetParametrDouble(domElement, VAbstractTool::AttrAngle2, "90.0");
const qreal kAsm1 = GetParametrDouble(domElement, VAbstractTool::AttrKAsm1, "1.0");
@@ -1000,7 +1000,7 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
case 1: //VToolSplinePath::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
+ const quint32 id = GetParametrId(domElement);
const qreal kCurve = GetParametrDouble(domElement, VAbstractTool::AttrKCurve, "1.0");
VSplinePath *path = new VSplinePath(kCurve);
Q_CHECK_PTR(path);
@@ -1017,7 +1017,7 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
const qreal kAsm1 = GetParametrDouble(element, VAbstractTool::AttrKAsm1, "1.0");
const qreal angle = GetParametrDouble(element, VAbstractTool::AttrAngle, "0");
const qreal kAsm2 = GetParametrDouble(element, VAbstractTool::AttrKAsm2, "1.0");
- const qint64 pSpline = GetParametrLongLong(element, VAbstractTool::AttrPSpline, "0");
+ const quint32 pSpline = GetParametrUInt(element, VAbstractTool::AttrPSpline, "0");
const VPointF p = *data->GeometricObject(pSpline);
QLineF line(0, 0, 100, 0);
@@ -1045,9 +1045,9 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
case 2: //VNodeSpline::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 idObject = GetParametrLongLong(domElement, VAbstractNode::AttrIdObject, "0");
- const qint64 idTool = GetParametrLongLong(domElement, VAbstractNode::AttrIdTool, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 idObject = GetParametrUInt(domElement, VAbstractNode::AttrIdObject, "0");
+ const quint32 idTool = GetParametrUInt(domElement, VAbstractNode::AttrIdTool, "0");
VSpline *spl = new VSpline(*data->GeometricObject(idObject));
Q_CHECK_PTR(spl);
spl->setIdObject(idObject);
@@ -1065,9 +1065,9 @@ void VPattern::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &
case 3: //VNodeSplinePath::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 idObject = GetParametrLongLong(domElement, VAbstractNode::AttrIdObject, "0");
- const qint64 idTool = GetParametrLongLong(domElement, VAbstractNode::AttrIdTool, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 idObject = GetParametrUInt(domElement, VAbstractNode::AttrIdObject, "0");
+ const quint32 idTool = GetParametrUInt(domElement, VAbstractNode::AttrIdTool, "0");
VSplinePath *path = new VSplinePath(*data->GeometricObject(idObject));
Q_CHECK_PTR(path);
path->setIdObject(idObject);
@@ -1102,8 +1102,8 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
case 0: //VToolArc::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 center = GetParametrLongLong(domElement, VAbstractTool::AttrCenter, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 center = GetParametrUInt(domElement, VAbstractTool::AttrCenter, "0");
const QString radius = GetParametrString(domElement, VAbstractTool::AttrRadius, "10");
const QString f1 = GetParametrString(domElement, VAbstractTool::AttrAngle1, "180");
const QString f2 = GetParametrString(domElement, VAbstractTool::AttrAngle2, "270");
@@ -1120,9 +1120,9 @@ void VPattern::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &dom
case 1: //VNodeArc::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 idObject = GetParametrLongLong(domElement, VAbstractNode::AttrIdObject, "0");
- const qint64 idTool = GetParametrLongLong(domElement, VAbstractNode::AttrIdTool, "0");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 idObject = GetParametrUInt(domElement, VAbstractNode::AttrIdObject, "0");
+ const quint32 idTool = GetParametrUInt(domElement, VAbstractNode::AttrIdTool, "0");
VArc *arc = new VArc(*data->GeometricObject(idObject));
Q_CHECK_PTR(arc);
arc->setIdObject(idObject);
@@ -1157,9 +1157,9 @@ void VPattern::ParseToolsElement(VMainGraphicsScene *scene, const QDomElement &d
case 0: //VToolUnionDetails::ToolType
try
{
- const qint64 id = GetParametrId(domElement);
- const qint64 indexD1 = GetParametrLongLong(domElement, VToolUnionDetails::AttrIndexD1, "-1");
- const qint64 indexD2 = GetParametrLongLong(domElement, VToolUnionDetails::AttrIndexD2, "-1");
+ const quint32 id = GetParametrId(domElement);
+ const quint32 indexD1 = GetParametrUInt(domElement, VToolUnionDetails::AttrIndexD1, "-1");
+ const quint32 indexD2 = GetParametrUInt(domElement, VToolUnionDetails::AttrIndexD2, "-1");
const QVector vector = VToolUnionDetails::GetDetailFromFile(this, domElement);
@@ -1191,7 +1191,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node)
{
if (domElement.tagName() == "increment")
{
- qint64 id = GetParametrId(domElement);
+ quint32 id = GetParametrId(domElement);
QString name = GetParametrString(domElement, "name", "");
qreal base = GetParametrDouble(domElement, "base", "0");
qreal ksize = GetParametrDouble(domElement, "ksize", "0");
@@ -1206,10 +1206,10 @@ void VPattern::ParseIncrementsElement(const QDomNode &node)
}
}
-qint64 VPattern::GetParametrId(const QDomElement &domElement) const
+quint32 VPattern::GetParametrId(const QDomElement &domElement) const
{
Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null");
- const qint64 id = GetParametrLongLong(domElement, "id", "0");
+ const quint32 id = GetParametrUInt(domElement, "id", "0");
if (id <= 0)
{
throw VExceptionWrongParameterId(tr("Got wrong parameter id. Need only id > 0."), domElement);
@@ -1217,11 +1217,11 @@ qint64 VPattern::GetParametrId(const QDomElement &domElement) const
return id;
}
-void VPattern::CollectId(const QDomElement &node, QVector