Use for id quint32 type instead qint64.

--HG--
branch : feature
This commit is contained in:
dismine 2014-02-25 16:40:24 +02:00
parent de0200ca2a
commit e184fcc6a7
140 changed files with 948 additions and 950 deletions

View File

@ -13,7 +13,7 @@
<xs:element name="increment" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="ksize" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="kgrowth" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
@ -32,51 +32,51 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="x" type="xs:double"></xs:attribute>
<xs:attribute name="y" type="xs:double"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:long"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:long"></xs:attribute>
<xs:attribute name="thirdPoint" type="xs:long"></xs:attribute>
<xs:attribute name="basePoint" type="xs:long"></xs:attribute>
<xs:attribute name="pShoulder" type="xs:long"></xs:attribute>
<xs:attribute name="p1Line" type="xs:long"></xs:attribute>
<xs:attribute name="p2Line" type="xs:long"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="thirdPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="basePoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="pShoulder" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="length" type="xs:string"></xs:attribute>
<xs:attribute name="angle" type="xs:double"></xs:attribute>
<xs:attribute name="typeLine" type="xs:string"></xs:attribute>
<xs:attribute name="splinePath" type="xs:long"></xs:attribute>
<xs:attribute name="spline" type="xs:long"></xs:attribute>
<xs:attribute name="p1Line1" type="xs:long"></xs:attribute>
<xs:attribute name="p1Line2" type="xs:long"></xs:attribute>
<xs:attribute name="p2Line1" type="xs:long"></xs:attribute>
<xs:attribute name="p2Line2" type="xs:long"></xs:attribute>
<xs:attribute name="center" type="xs:long"></xs:attribute>
<xs:attribute name="splinePath" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="spline" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p1Line2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="p2Line2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="radius" type="xs:string"></xs:attribute>
<xs:attribute name="axisP1" type="xs:long"></xs:attribute>
<xs:attribute name="axisP2" type="xs:long"></xs:attribute>
<xs:attribute name="arc" type="xs:long"></xs:attribute>
<xs:attribute name="axisP1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="axisP2" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="arc" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="line" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:long"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:long"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="firstPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="secondPoint" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeLine" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="angle1" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="angle2" type="xs:string"></xs:attribute>
<xs:attribute name="radius" type="xs:string"></xs:attribute>
<xs:attribute name="center" type="xs:long"></xs:attribute>
<xs:attribute name="center" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
@ -86,21 +86,21 @@
<xs:element name="pathPoint" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="kAsm2" type="xs:string"></xs:attribute>
<xs:attribute name="pSpline" type="xs:long"></xs:attribute>
<xs:attribute name="pSpline" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="angle" type="xs:string"></xs:attribute>
<xs:attribute name="kAsm1" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="kCurve" type="xs:double"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="kAsm1" type="xs:double"></xs:attribute>
<xs:attribute name="kAsm2" type="xs:double"></xs:attribute>
<xs:attribute name="angle1" type="xs:double"></xs:attribute>
<xs:attribute name="angle2" type="xs:double"></xs:attribute>
<xs:attribute name="point1" type="xs:long"></xs:attribute>
<xs:attribute name="point4" type="xs:long"></xs:attribute>
<xs:attribute name="point1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="point4" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
@ -113,31 +113,31 @@
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:string"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="my" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="spline" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
<xs:attribute name="idTool" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="tools" minOccurs="0" maxOccurs="unbounded">
@ -149,9 +149,9 @@
<xs:element name="node" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="nodeType" type="xs:string"></xs:attribute>
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
<xs:attribute name="mx" type="xs:long"></xs:attribute>
<xs:attribute name="my" type="xs:long"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="my" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
@ -159,10 +159,10 @@
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="indexD1" type="xs:long"></xs:attribute>
<xs:attribute name="indexD2" type="xs:long"></xs:attribute>
<xs:attribute name="indexD1" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="indexD2" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
@ -178,20 +178,20 @@
<xs:element name="node" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="nodeType" type="xs:string"></xs:attribute>
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
<xs:attribute name="mx" type="xs:long"></xs:attribute>
<xs:attribute name="my" type="xs:long"></xs:attribute>
<xs:attribute name="idObject" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="my" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
<xs:attribute name="supplement" type="xs:long"></xs:attribute>
<xs:attribute name="id" type="xs:unsignedInt" use="required"></xs:attribute>
<xs:attribute name="supplement" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="mx" type="xs:double"></xs:attribute>
<xs:attribute name="my" type="xs:double"></xs:attribute>
<xs:attribute name="width" type="xs:long"></xs:attribute>
<xs:attribute name="width" type="xs:unsignedInt"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="closed" type="xs:long"></xs:attribute>
<xs:attribute name="closed" type="xs:unsignedInt"></xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>

View File

@ -31,13 +31,13 @@
#include <QDebug>
#include <QtAlgorithms>
qint64 VContainer::_id = 0;
quint32 VContainer::_id = 0;
VContainer::VContainer()
:base(QHash<QString, qint32>()), gObjects(QHash<qint64, VGObject *>()),
:base(QHash<QString, qint32>()), gObjects(QHash<quint32, VGObject *>()),
standardTable(QHash<QString, VStandardTableRow>()), incrementTable(QHash<QString, VIncrementTableRow>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<qint64, VDetail>())
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>())
{
SetSize(500);
SetGrowth(1760);
@ -51,10 +51,10 @@ VContainer &VContainer::operator =(const VContainer &data)
}
VContainer::VContainer(const VContainer &data)
:base(QHash<QString, qint32>()), gObjects(QHash<qint64, VGObject *>()),
:base(QHash<QString, qint32>()), gObjects(QHash<quint32, VGObject *>()),
standardTable(QHash<QString, VStandardTableRow>()), incrementTable(QHash<QString, VIncrementTableRow>()),
lengthLines(QHash<QString, qreal>()), lineAngles(QHash<QString, qreal>()), lengthSplines(QHash<QString, qreal>()),
lengthArcs(QHash<QString, qreal>()), details(QHash<qint64, VDetail>())
lengthArcs(QHash<QString, qreal>()), details(QHash<quint32, VDetail>())
{
setData(data);
}
@ -71,9 +71,9 @@ void VContainer::setData(const VContainer &data)
qDeleteAll(gObjects);
gObjects.clear();
const QHash<qint64, VGObject*> *obj = data.DataGObjects();
const QHash<quint32, VGObject*> *obj = data.DataGObjects();
Q_CHECK_PTR(obj);
QHashIterator<qint64, VGObject*> i(*obj);
QHashIterator<quint32, VGObject*> 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 <typename val>
void VContainer::UpdateObject(QHash<qint64, val> &obj, const qint64 &id, val point)
void VContainer::UpdateObject(QHash<quint32, val> &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<const VArc *>(id);
lengthArcs[arc->name()] = toMM(arc->GetLength());
@ -292,7 +292,7 @@ void VContainer::ClearCalculationGObjects()
{
if (gObjects.size()>0)
{
QHashIterator<qint64, VGObject*> i(gObjects);
QHashIterator<quint32, VGObject*> 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<const VPointF *>(firstPointId);
@ -358,16 +358,16 @@ void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId
}
template <typename key, typename val>
qint64 VContainer::AddObject(QHash<key, val> &obj, val value)
quint32 VContainer::AddObject(QHash<key, val> &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<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(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<const VPointF *>(firstPoint);
const VPointF *second = GeometricObject<const VPointF *>(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;

View File

@ -62,7 +62,7 @@ public:
VContainer(const VContainer &data);
~VContainer();
template <typename T>
void CopyGObject(const VContainer &data, const qint64 &id)
void CopyGObject(const VContainer &data, const quint32 &id)
{
T *obj = new T(*data.GeometricObject<const T *>(id));
Q_CHECK_PTR(obj);
@ -74,7 +74,7 @@ public:
*/
void setData(const VContainer &data);
template <typename T>
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<qint64, VGObject*> *DataGObjects() const {return &gObjects;}
inline const QHash<quint32, VGObject*> *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<qint64, VDetail> *DataDetails() const {return &details;}
inline const QHash<quint32, VDetail> *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<qint64, VGObject*> gObjects;
QHash<quint32, VGObject*> gObjects;
/**
* @brief standardTable container of standard table rows
*/
@ -419,7 +419,7 @@ private:
/**
* @brief details container of details
*/
QHash<qint64, VDetail> details;
QHash<quint32, VDetail> details;
template <typename key, typename val>
/**
* @brief GetObject return object from container
@ -445,7 +445,7 @@ private:
* @param id id of existing object
* @param point object
*/
void UpdateObject(QHash<qint64, val > &obj, const qint64 &id, val point);
void UpdateObject(QHash<quint32, val > &obj, const quint32 &id, val point);
template <typename key, typename val>
/**
* @brief AddObject add object to container
@ -453,7 +453,7 @@ private:
* @param value object
* @return id of object in container
*/
static qint64 AddObject(QHash<key, val> &obj, val value);
static quint32 AddObject(QHash<key, val> &obj, val value);
};
#endif // VCONTAINER_H

View File

@ -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){}

View File

@ -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
*/

View File

@ -63,7 +63,7 @@ DialogHistory::~DialogHistory()
void DialogHistory::DialogAccepted()
{
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
qint64 id = qvariant_cast<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(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<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(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<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, false);
cursorToolRecordRow = row;
item = ui->tableWidget->item(cursorToolRecordRow, 0);
id = qvariant_cast<qint64>(item->data(Qt::UserRole));
id = qvariant_cast<quint32>(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<qint64>(item->data(Qt::UserRole));
quint32 rId = qvariant_cast<quint32>(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<const VPointF *>(basePointId)->name();
QString toolIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(firstPointId)->name();
QString secondPointIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(basePointId)->name();
QString secondPointIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(basePointId)->name();
QString secondPointIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(firstPointId)->name();
QString basePointIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(p1Line1)->name();
QString p2Line1Name = data->GeometricObject<const VPointF *>(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<const VPointF *>(firstPointId)->name();
QString centerName = data->GeometricObject<const VPointF *>(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<const VPointF *>(basePointId)->name();
QString p1LineIdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(axisP1Id)->name();
QString axisP2IdName = data->GeometricObject<const VPointF *>(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<const VPointF *>(firstPointId)->name();
QString secondPointIdName = data->GeometricObject<const VPointF *>(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<const VArc *>(arcId);
QString arcCenterName = data->GeometricObject<const VArc *>(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<const VSpline *>(splineId);
QString toolIdName = data->GeometricObject<const VPointF *>(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<const VSplinePath *>(splinePathId);
QVector<VSplinePoint> 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<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(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<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(item->data(Qt::UserRole));
emit ShowHistoryTool(id, Qt::green, false);
DialogTool::closeEvent(event);
}

View File

@ -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

View File

@ -110,7 +110,7 @@ void DialogIncrements::FillIncrementTable()
{
const QHash<QString, VIncrementTableRow> *incrementTable = data->DataIncrementTable();
QHashIterator<QString, VIncrementTableRow> i(*incrementTable);
QMap<qint64, QString> map;
QMap<quint32, QString> map;
//Sorting QHash by id
while (i.hasNext())
{
@ -120,7 +120,7 @@ void DialogIncrements::FillIncrementTable()
}
qint32 currentRow = -1;
QMapIterator<qint64, QString> iMap(map);
QMapIterator<quint32, QString> 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<qint64>(item->data(Qt::UserRole));
quint32 id = qvariant_cast<quint32>(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<qint64>(item->data(Qt::UserRole));
id = qvariant_cast<quint32>(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<qint64>(itemName->data(Qt::UserRole));
id = qvariant_cast<quint32>(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<qint64>(itemName->data(Qt::UserRole));
id = qvariant_cast<quint32>(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<qint64>(itemName->data(Qt::UserRole));
id = qvariant_cast<quint32>(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<qint64>(itemName->data(Qt::UserRole));
id = qvariant_cast<quint32>(itemName->data(Qt::UserRole));
domElement = doc->elementById(QString().setNum(id));
if (domElement.isElement())
{

View File

@ -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);
};

View File

@ -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);
}

View File

@ -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

View File

@ -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)
{

View File

@ -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
*/

View File

@ -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);
}

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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;

View File

@ -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);
};

View File

@ -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);
}

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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<const VPointF *>(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<const VPointF *>(value);
@ -84,14 +84,14 @@ void DialogLine::setFirstPoint(const qint64 &value)
void DialogLine::DialogAccepted()
{
qint32 index = ui->comboBoxFirstPoint->currentIndex();
firstPoint = qvariant_cast<qint64>(ui->comboBoxFirstPoint->itemData(index));
firstPoint = qvariant_cast<quint32>(ui->comboBoxFirstPoint->itemData(index));
index = ui->comboBoxSecondPoint->currentIndex();
secondPoint = qvariant_cast<qint64>(ui->comboBoxSecondPoint->itemData(index));
secondPoint = qvariant_cast<quint32>(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)
{

View File

@ -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
*/

View File

@ -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<qint64>(ui->comboBoxP1Line1->itemData(index));
p1Line1 = qvariant_cast<quint32>(ui->comboBoxP1Line1->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P2Line1Changed(int index)
{
p2Line1 = qvariant_cast<qint64>(ui->comboBoxP2Line1->itemData(index));
p2Line1 = qvariant_cast<quint32>(ui->comboBoxP2Line1->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P1Line2Changed(int index)
{
p1Line2 = qvariant_cast<qint64>(ui->comboBoxP1Line2->itemData(index));
p1Line2 = qvariant_cast<quint32>(ui->comboBoxP1Line2->itemData(index));
flagPoint = CheckIntersecion();
CheckState();
}
void DialogLineIntersect::P2Line2Changed(int index)
{
p2Line2 = qvariant_cast<qint64>(ui->comboBoxP2Line2->itemData(index));
p2Line2 = qvariant_cast<quint32>(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);

View File

@ -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
*/

View File

@ -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);
}

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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<qint64>(ui->comboBoxP1->itemData(index));
quint32 p1Id = qvariant_cast<quint32>(ui->comboBoxP1->itemData(index));
QPointF p1 = data->GeometricObject<const VPointF *>(p1Id)->toQPointF();
QPointF p4 = data->GeometricObject<const VPointF *>(id)->toQPointF();
@ -139,19 +139,19 @@ void DialogSpline::setAngle1(const qreal &value)
ui->spinBoxAngle1->setValue(static_cast<qint32>(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;
}

View File

@ -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
*/

View File

@ -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<qint64>(ui->comboBoxPoint->itemData(index));
quint32 id = qvariant_cast<quint32>(ui->comboBoxPoint->itemData(index));
qint32 row = ui->listWidget->currentRow();
QListWidgetItem *item = ui->listWidget->item( row );
VSplinePoint p = qvariant_cast<VSplinePoint>(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<const VPointF *>(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<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &DialogSplinePath::currentPointChanged);

View File

@ -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
*/

View File

@ -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<qint64, VGObject*> *objs = data->DataGObjects();
QHashIterator<qint64, VGObject*> i(*objs);
QMap<QString, qint64> list;
const QHash<quint32, VGObject*> *objs = data->DataGObjects();
QHashIterator<quint32, VGObject*> i(*objs);
QMap<QString, quint32> 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<qint64, VGObject *> *objs = data->DataGObjects();
QHashIterator<qint64, VGObject*> i(*objs);
QMap<QString, qint64> list;
const QHash<quint32, VGObject *> *objs = data->DataGObjects();
QHashIterator<quint32, VGObject*> i(*objs);
QMap<QString, quint32> 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<qint64, VGObject *> *objs = data->DataGObjects();
QHashIterator<qint64, VGObject*> i(*objs);
QMap<QString, qint64> list;
const QHash<quint32, VGObject *> *objs = data->DataGObjects();
QHashIterator<quint32, VGObject*> i(*objs);
QMap<QString, quint32> 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<qint64, VGObject *> *objs = data->DataGObjects();
QHashIterator<qint64, VGObject *> i(*objs);
QMap<QString, qint64> list;
const QHash<quint32, VGObject *> *objs = data->DataGObjects();
QHashIterator<quint32, VGObject *> i(*objs);
QMap<QString, quint32> 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<qint64>(box->itemData(index));
return qvariant_cast<quint32>(box->itemData(index));
}
else
{
@ -383,12 +383,12 @@ qint64 DialogTool::getCurrentObjectId(QComboBox *box) const
}
}
void DialogTool::FillList(QComboBox *box, const QMap<QString, qint64> &list) const
void DialogTool::FillList(QComboBox *box, const QMap<QString, quint32> &list) const
{
Q_CHECK_PTR(box);
box->clear();
QMapIterator<QString, qint64> iter(list);
QMapIterator<QString, quint32> 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);

View File

@ -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<QString, qint64> &list)const;
void FillList(QComboBox *box, const QMap<QString, quint32> &list)const;
};
#endif // DIALOGTOOL_H

View File

@ -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);

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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
*/

View File

@ -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);

View File

@ -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.

View File

@ -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<VNodeDetail> 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<VNodeDetail> 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<qint64> VDetail::Missing(const VDetail &det) const
QList<quint32> VDetail::Missing(const VDetail &det) const
{
QList<qint64> list;
QList<quint32> list;
if (nodes.size() == det.CountNode())
{
return list;
@ -268,7 +268,7 @@ QVector<VNodeDetail> VDetail::listNodePoint() const
return list;
}
ptrdiff_t VDetail::indexOfNode(const QVector<VNodeDetail> &list, const qint64 &id)
ptrdiff_t VDetail::indexOfNode(const QVector<VNodeDetail> &list, const quint32 &id)
{
for (ptrdiff_t i = 0; i < list.size(); ++i)
{

View File

@ -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<qint64> Missing(const VDetail &det) const;
QList<quint32> 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<VNodeDetail> &list, const qint64 &id);
static ptrdiff_t indexOfNode(const QVector<VNodeDetail> &list, const quint32 &id);
};
#endif // VDETAIL_H

View File

@ -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);

View File

@ -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.

View File

@ -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;
}

View File

@ -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
*/

View File

@ -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)

View File

@ -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
*/

View File

@ -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;

View File

@ -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

View File

@ -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)
{

View File

@ -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.

View File

@ -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<VSplinePoint>()), kCurve(kCurve), maxCountPoints(0)
{
}

View File

@ -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.

View File

@ -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<qint64, VDataTool*>* tools = doc->getTools();
QHash<quint32, VDataTool*>* 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<const VPointF *>(id);
@ -1084,8 +1084,8 @@ void MainWindow::ActionLayout(bool checked)
Q_UNUSED(checked);
hide();
QVector<VItem*> listDetails;
const QHash<qint64, VDetail> *details = pattern->DataDetails();
QHashIterator<qint64, VDetail> idetail(*details);
const QHash<quint32, VDetail> *details = pattern->DataDetails();
QHashIterator<quint32, VDetail> idetail(*details);
while (idetail.hasNext())
{
idetail.next();

View File

@ -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);

View File

@ -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)

View File

@ -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<DialogAlongLine*>(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));

View File

@ -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

View File

@ -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<DialogArc*>(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 &center, const QString &radius, const QString &f1,
void VToolArc::Create(const quint32 _id, const quint32 &center, 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 &center, const QString &rad
VPointF c = *data->GeometricObject<const VPointF *>(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);
}

View File

@ -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 &center, const QString &radius, const QString &f1,
static void Create(const quint32 _id, const quint32 &center, 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.

View File

@ -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<DialogBisector*>(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));

View File

@ -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

View File

@ -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<const VArc *>(arcid);
QPainterPath path;

View File

@ -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

View File

@ -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<const VSpline *>(splid);
QPainterPath path;

View File

@ -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

View File

@ -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<const VSplinePath *>(splPathid);
QPainterPath path;

View File

@ -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

View File

@ -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));

View File

@ -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;

View File

@ -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<const VPointF *>(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));

View File

@ -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

View File

@ -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<DialogLine*>(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<const VPointF *>(firstPoint);

View File

@ -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.
*/

View File

@ -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<DialogLineIntersect*>(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));

View File

@ -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

View File

@ -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)

View File

@ -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.
*/

View File

@ -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<DialogNormal*>(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));

View File

@ -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

View File

@ -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);
}

View File

@ -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.

View File

@ -32,9 +32,9 @@
const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact");
VToolPointOfContact::VToolPointOfContact(VPattern *doc, VContainer *data, const qint64 &id,
const QString &radius, const qint64 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
VToolPointOfContact::VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
const QString &radius, const quint32 &center,
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<DialogPointOfContact*>(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 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
void VToolPointOfContact::Create(const quint32 _id, const QString &radius, const quint32 &center,
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));

View File

@ -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 &center,
const qint64 &firstPointId, const qint64 &secondPointId,
VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
const QString &arcRadius, const quint32 &center,
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 &center,
const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName,
static void Create(const quint32 _id, const QString &arcRadius, const quint32 &center,
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

View File

@ -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<DialogPointOfIntersection*>(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<const VPointF *>(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));

View File

@ -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

View File

@ -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<DialogShoulderPoint*>(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));

Some files were not shown because too many files have changed in this diff Show More