Use quint32 instead unsigned int.
--HG-- branch : develop
This commit is contained in:
parent
7102071b19
commit
d1f18dc9a0
|
@ -136,25 +136,25 @@ void DialogLayoutSettings::SetPaperWidth(int value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int DialogLayoutSettings::GetShift() const
|
quint32 DialogLayoutSettings::GetShift() const
|
||||||
{
|
{
|
||||||
return static_cast<quint32>(qFloor(UnitConvertor(ui->doubleSpinBoxShift->value(), oldLayoutUnit, Unit::Px)));
|
return static_cast<quint32>(qFloor(UnitConvertor(ui->doubleSpinBoxShift->value(), oldLayoutUnit, Unit::Px)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLayoutSettings::SetShift(unsigned int value)
|
void DialogLayoutSettings::SetShift(quint32 value)
|
||||||
{
|
{
|
||||||
ui->doubleSpinBoxShift->setValue(UnitConvertor(value, Unit::Px, LayoutUnit()));
|
ui->doubleSpinBoxShift->setValue(UnitConvertor(value, Unit::Px, LayoutUnit()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int DialogLayoutSettings::GetLayoutWidth() const
|
quint32 DialogLayoutSettings::GetLayoutWidth() const
|
||||||
{
|
{
|
||||||
return static_cast<quint32>(qFloor(UnitConvertor(ui->doubleSpinBoxLayoutWidth->value(), oldLayoutUnit, Unit::Px)));
|
return static_cast<quint32>(qFloor(UnitConvertor(ui->doubleSpinBoxLayoutWidth->value(), oldLayoutUnit, Unit::Px)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogLayoutSettings::SetLayoutWidth(unsigned int value)
|
void DialogLayoutSettings::SetLayoutWidth(quint32 value)
|
||||||
{
|
{
|
||||||
ui->doubleSpinBoxLayoutWidth->setValue(UnitConvertor(value, Unit::Px, LayoutUnit()));
|
ui->doubleSpinBoxLayoutWidth->setValue(UnitConvertor(value, Unit::Px, LayoutUnit()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,11 +68,11 @@ public:
|
||||||
int GetPaperWidth() const;
|
int GetPaperWidth() const;
|
||||||
void SetPaperWidth(int value);
|
void SetPaperWidth(int value);
|
||||||
|
|
||||||
unsigned int GetShift() const;
|
quint32 GetShift() const;
|
||||||
void SetShift(unsigned int value);
|
void SetShift(quint32 value);
|
||||||
|
|
||||||
unsigned int GetLayoutWidth() const;
|
quint32 GetLayoutWidth() const;
|
||||||
void SetLayoutWidth(unsigned int value);
|
void SetLayoutWidth(quint32 value);
|
||||||
|
|
||||||
Cases GetGroup() const;
|
Cases GetGroup() const;
|
||||||
void SetGroup(const Cases &value);
|
void SetGroup(const Cases &value);
|
||||||
|
|
|
@ -827,7 +827,7 @@ void VPattern::ParseCurrentPP()
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString VPattern::GetLabelBase(unsigned int index) const
|
QString VPattern::GetLabelBase(quint32 index) const
|
||||||
{
|
{
|
||||||
const QStringList list = VApplication::LabelLanguages();
|
const QStringList list = VApplication::LabelLanguages();
|
||||||
const QString def = QStringLiteral("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z");
|
const QString def = QStringLiteral("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z");
|
||||||
|
@ -889,7 +889,7 @@ QString VPattern::GetLabelBase(unsigned int index) const
|
||||||
}
|
}
|
||||||
|
|
||||||
QString base;
|
QString base;
|
||||||
const int count = qFloor(index/static_cast<unsigned int>(alphabet.size()));
|
const int count = qFloor(index/static_cast<quint32>(alphabet.size()));
|
||||||
const int number = static_cast<int>(index) - alphabet.size() * count;
|
const int number = static_cast<int>(index) - alphabet.size() * count;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
do
|
do
|
||||||
|
@ -2390,7 +2390,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
name = GetLabelBase(static_cast<unsigned int>(drawList.size() + i));
|
name = GetLabelBase(static_cast<quint32>(drawList.size() + i));
|
||||||
if (data->IsUnique(name))
|
if (data->IsUnique(name))
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
|
@ -2424,7 +2424,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString labelBase = GetLabelBase(static_cast<unsigned int>(index));
|
QString labelBase = GetLabelBase(static_cast<quint32>(index));
|
||||||
|
|
||||||
qint32 num = 1;
|
qint32 num = 1;
|
||||||
QString name;
|
QString name;
|
||||||
|
|
|
@ -123,7 +123,7 @@ private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
QRectF ToolBoundingRect(const QRectF &rec, const quint32 &id) const;
|
QRectF ToolBoundingRect(const QRectF &rec, const quint32 &id) const;
|
||||||
void ParseCurrentPP();
|
void ParseCurrentPP();
|
||||||
QString GetLabelBase(unsigned int index)const;
|
QString GetLabelBase(quint32 index)const;
|
||||||
|
|
||||||
void ParseToolBasePoint(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse);
|
void ParseToolBasePoint(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse);
|
||||||
void ParseToolEndLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse);
|
void ParseToolEndLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse);
|
||||||
|
|
|
@ -413,12 +413,12 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
{
|
{
|
||||||
if (a_iArgc>=0)
|
if (a_iArgc>=0)
|
||||||
{
|
{
|
||||||
m_iStackPos = m_iStackPos - static_cast<unsigned int>(a_iArgc) + 1;
|
m_iStackPos = m_iStackPos - static_cast<quint32>(a_iArgc) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// function with unlimited number of arguments
|
// function with unlimited number of arguments
|
||||||
m_iStackPos = static_cast<unsigned int>(static_cast<int>(m_iStackPos) + a_iArgc + 1);
|
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) + a_iArgc + 1);
|
||||||
}
|
}
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
*/
|
*/
|
||||||
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
|
void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
{
|
{
|
||||||
m_iStackPos = static_cast<unsigned int>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
||||||
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos);
|
||||||
|
|
||||||
SToken tok;
|
SToken tok;
|
||||||
|
@ -458,7 +458,7 @@ void QmuParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
|
||||||
*/
|
*/
|
||||||
void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
|
void QmuParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
|
||||||
{
|
{
|
||||||
m_iStackPos = static_cast<unsigned int>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
m_iStackPos = static_cast<quint32>(static_cast<int>(m_iStackPos) - a_iArgc + 1);
|
||||||
|
|
||||||
SToken tok;
|
SToken tok;
|
||||||
tok.Cmd = cmFUNC_STR;
|
tok.Cmd = cmFUNC_STR;
|
||||||
|
|
|
@ -41,7 +41,7 @@ class DXFLIB_EXPORT DL_CreationAdapter : public DL_CreationInterface
|
||||||
public:
|
public:
|
||||||
DL_CreationAdapter() {}
|
DL_CreationAdapter() {}
|
||||||
virtual ~DL_CreationAdapter();
|
virtual ~DL_CreationAdapter();
|
||||||
virtual void processCodeValuePair(unsigned int, const std::string&) {}
|
virtual void processCodeValuePair(quint32, const std::string&) {}
|
||||||
virtual void endSection() {}
|
virtual void endSection() {}
|
||||||
virtual void addLayer(const DL_LayerData&) {}
|
virtual void addLayer(const DL_LayerData&) {}
|
||||||
virtual void addLinetype(const DL_LinetypeData&) {}
|
virtual void addLinetype(const DL_LinetypeData&) {}
|
||||||
|
@ -128,7 +128,7 @@ public:
|
||||||
virtual void setVariableString(const char*, const char*, int) {}
|
virtual void setVariableString(const char*, const char*, int) {}
|
||||||
virtual void setVariableInt(const char*, int, int) {}
|
virtual void setVariableInt(const char*, int, int) {}
|
||||||
virtual void setVariableDouble(const char*, double, int) {}
|
virtual void setVariableDouble(const char*, double, int) {}
|
||||||
virtual void processCodeValuePair(unsigned int, char*) {}
|
virtual void processCodeValuePair(quint32, char*) {}
|
||||||
virtual void addComment(const char*) {}
|
virtual void addComment(const char*) {}
|
||||||
virtual void addMTextChunk(const char*) {}
|
virtual void addMTextChunk(const char*) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
* Called for every code / value tuple of the DXF file. The complete DXF file
|
* Called for every code / value tuple of the DXF file. The complete DXF file
|
||||||
* contents can be handled by the implemetation of this function.
|
* contents can be handled by the implemetation of this function.
|
||||||
*/
|
*/
|
||||||
virtual void processCodeValuePair(unsigned int groupCode, const std::string& groupValue) = 0;
|
virtual void processCodeValuePair(quint32 groupCode, const std::string& groupValue) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a section (entity, table entry, etc.) is finished.
|
* Called when a section (entity, table entry, etc.) is finished.
|
||||||
|
@ -327,7 +327,7 @@ public:
|
||||||
virtual void setVariableString(const char* key, const char* value, int code) = 0;
|
virtual void setVariableString(const char* key, const char* value, int code) = 0;
|
||||||
virtual void setVariableInt(const char* key, int value, int code) = 0;
|
virtual void setVariableInt(const char* key, int value, int code) = 0;
|
||||||
virtual void setVariableDouble(const char* key, double value, int code) = 0;
|
virtual void setVariableDouble(const char* key, double value, int code) = 0;
|
||||||
virtual void processCodeValuePair(unsigned int groupCode, char* groupValue) = 0;
|
virtual void processCodeValuePair(quint32 groupCode, char* groupValue) = 0;
|
||||||
virtual void addComment(const char* comment) = 0;
|
virtual void addComment(const char* comment) = 0;
|
||||||
virtual void addMTextChunk(const char* text) = 0;
|
virtual void addMTextChunk(const char* text) = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -194,7 +194,7 @@ bool DL_Dxf::readDxfGroups(FILE *fp, DL_CreationInterface* creationInterface)
|
||||||
if (DL_Dxf::getStrippedLine(groupCodeTmp, DL_DXF_MAXLINE, fp) &&
|
if (DL_Dxf::getStrippedLine(groupCodeTmp, DL_DXF_MAXLINE, fp) &&
|
||||||
DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, fp) )
|
DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, fp) )
|
||||||
{
|
{
|
||||||
groupCode = static_cast<unsigned int>(toInt(groupCodeTmp));
|
groupCode = static_cast<quint32>(toInt(groupCodeTmp));
|
||||||
|
|
||||||
creationInterface->processCodeValuePair(groupCode, groupValue);
|
creationInterface->processCodeValuePair(groupCode, groupValue);
|
||||||
processDXFGroup(creationInterface, static_cast<int>(groupCode), groupValue);
|
processDXFGroup(creationInterface, static_cast<int>(groupCode), groupValue);
|
||||||
|
@ -216,7 +216,7 @@ bool DL_Dxf::readDxfGroups(std::stringstream& stream,
|
||||||
DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, stream) )
|
DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, stream) )
|
||||||
{
|
{
|
||||||
|
|
||||||
groupCode = static_cast<unsigned int>(toInt(groupCodeTmp));
|
groupCode = static_cast<quint32>(toInt(groupCodeTmp));
|
||||||
processDXFGroup(creationInterface, static_cast<int>(groupCode), groupValue);
|
processDXFGroup(creationInterface, static_cast<int>(groupCode), groupValue);
|
||||||
}
|
}
|
||||||
return !stream.eof();
|
return !stream.eof();
|
||||||
|
@ -241,7 +241,7 @@ bool DL_Dxf::readDxfGroups(std::stringstream& stream,
|
||||||
* @todo Is it a problem if line is blank (i.e., newline only)?
|
* @todo Is it a problem if line is blank (i.e., newline only)?
|
||||||
* Then, when function returns, (s==NULL).
|
* Then, when function returns, (s==NULL).
|
||||||
*/
|
*/
|
||||||
bool DL_Dxf::getStrippedLine(std::string& s, unsigned int size, FILE *fp)
|
bool DL_Dxf::getStrippedLine(std::string& s, quint32 size, FILE *fp)
|
||||||
{
|
{
|
||||||
if (!feof(fp))
|
if (!feof(fp))
|
||||||
{
|
{
|
||||||
|
@ -280,7 +280,7 @@ bool DL_Dxf::getStrippedLine(std::string& s, unsigned int size, FILE *fp)
|
||||||
/**
|
/**
|
||||||
* Same as above but for stringstreams.
|
* Same as above but for stringstreams.
|
||||||
*/
|
*/
|
||||||
bool DL_Dxf::getStrippedLine(std::string &s, unsigned int size,
|
bool DL_Dxf::getStrippedLine(std::string &s, quint32 size,
|
||||||
std::stringstream& stream)
|
std::stringstream& stream)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1649,7 +1649,7 @@ bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/)
|
||||||
{
|
{
|
||||||
if (vertexIndex>=0 && vertexIndex<maxVertices)
|
if (vertexIndex>=0 && vertexIndex<maxVertices)
|
||||||
{
|
{
|
||||||
vertices[4*static_cast<unsigned int>(vertexIndex) + (groupCode/10-1)] = toReal(groupValue);
|
vertices[4*static_cast<quint32>(vertexIndex) + (groupCode/10-1)] = toReal(groupValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (groupCode==42 && vertexIndex<maxVertices)
|
else if (groupCode==42 && vertexIndex<maxVertices)
|
||||||
|
@ -1762,7 +1762,7 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/)
|
||||||
|
|
||||||
if (controlPointIndex>=0 && controlPointIndex<maxControlPoints)
|
if (controlPointIndex>=0 && controlPointIndex<maxControlPoints)
|
||||||
{
|
{
|
||||||
controlPoints[3*static_cast<unsigned int>(controlPointIndex) + (groupCode/10-1)] = toReal(groupValue);
|
controlPoints[3*static_cast<quint32>(controlPointIndex) + (groupCode/10-1)] = toReal(groupValue);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1777,7 +1777,7 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/)
|
||||||
|
|
||||||
if (fitPointIndex>=0 && fitPointIndex<maxFitPoints)
|
if (fitPointIndex>=0 && fitPointIndex<maxFitPoints)
|
||||||
{
|
{
|
||||||
fitPoints[3*static_cast<unsigned int>(fitPointIndex) + ((groupCode-1)/10-1)] = toReal(groupValue);
|
fitPoints[3*static_cast<quint32>(fitPointIndex) + ((groupCode-1)/10-1)] = toReal(groupValue);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1843,7 +1843,7 @@ bool DL_Dxf::handleLeaderData(DL_CreationInterface* /*creationInterface*/)
|
||||||
if (leaderVertexIndex>=0 &&
|
if (leaderVertexIndex>=0 &&
|
||||||
leaderVertexIndex<maxLeaderVertices)
|
leaderVertexIndex<maxLeaderVertices)
|
||||||
{
|
{
|
||||||
leaderVertices[3*static_cast<unsigned int>(leaderVertexIndex) + (groupCode/10-1)]
|
leaderVertices[3*static_cast<quint32>(leaderVertexIndex) + (groupCode/10-1)]
|
||||||
= toReal(groupValue);
|
= toReal(groupValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2180,10 +2180,10 @@ void DL_Dxf::addHatch(DL_CreationInterface* creationInterface)
|
||||||
|
|
||||||
creationInterface->addHatch(hd);
|
creationInterface->addHatch(hd);
|
||||||
|
|
||||||
for (unsigned int i=0; i<hatchEdges.size(); i++)
|
for (quint32 i=0; i<hatchEdges.size(); i++)
|
||||||
{
|
{
|
||||||
creationInterface->addHatchLoop(DL_HatchLoopData(static_cast<int>(hatchEdges[i].size())));
|
creationInterface->addHatchLoop(DL_HatchLoopData(static_cast<int>(hatchEdges[i].size())));
|
||||||
for (unsigned int k=0; k<hatchEdges[i].size(); k++)
|
for (quint32 k=0; k<hatchEdges[i].size(); k++)
|
||||||
{
|
{
|
||||||
creationInterface->addHatchEdge(DL_HatchEdgeData(hatchEdges[i][k]));
|
creationInterface->addHatchEdge(DL_HatchEdgeData(hatchEdges[i][k]));
|
||||||
}
|
}
|
||||||
|
@ -2378,7 +2378,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
|
||||||
switch (groupCode)
|
switch (groupCode)
|
||||||
{
|
{
|
||||||
case 94:
|
case 94:
|
||||||
hatchEdge.degree = static_cast<unsigned int>(toInt(groupValue));
|
hatchEdge.degree = static_cast<quint32>(toInt(groupValue));
|
||||||
return true;
|
return true;
|
||||||
case 73:
|
case 73:
|
||||||
hatchEdge.rational = toBool(groupValue);
|
hatchEdge.rational = toBool(groupValue);
|
||||||
|
@ -2387,13 +2387,13 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
|
||||||
hatchEdge.periodic = toBool(groupValue);
|
hatchEdge.periodic = toBool(groupValue);
|
||||||
return true;
|
return true;
|
||||||
case 95:
|
case 95:
|
||||||
hatchEdge.nKnots = static_cast<unsigned int>(toInt(groupValue));
|
hatchEdge.nKnots = static_cast<quint32>(toInt(groupValue));
|
||||||
return true;
|
return true;
|
||||||
case 96:
|
case 96:
|
||||||
hatchEdge.nControl = static_cast<unsigned int>(toInt(groupValue));
|
hatchEdge.nControl = static_cast<quint32>(toInt(groupValue));
|
||||||
return true;
|
return true;
|
||||||
case 97:
|
case 97:
|
||||||
hatchEdge.nFit = static_cast<unsigned int>(toInt(groupValue));
|
hatchEdge.nFit = static_cast<quint32>(toInt(groupValue));
|
||||||
return true;
|
return true;
|
||||||
case 40:
|
case 40:
|
||||||
if (hatchEdge.knots.size() < hatchEdge.nKnots)
|
if (hatchEdge.knots.size() < hatchEdge.nKnots)
|
||||||
|
@ -3962,23 +3962,23 @@ void DL_Dxf::writeHatchEdge(DL_WriterA& dw,
|
||||||
dw.dxfBool(74, data.periodic);
|
dw.dxfBool(74, data.periodic);
|
||||||
dw.dxfInt(95, static_cast<int>(data.nKnots));
|
dw.dxfInt(95, static_cast<int>(data.nKnots));
|
||||||
dw.dxfInt(96, static_cast<int>(data.nControl));
|
dw.dxfInt(96, static_cast<int>(data.nControl));
|
||||||
for (unsigned int i=0; i<data.knots.size(); i++)
|
for (quint32 i=0; i<data.knots.size(); i++)
|
||||||
{
|
{
|
||||||
dw.dxfReal(40, data.knots[i]);
|
dw.dxfReal(40, data.knots[i]);
|
||||||
}
|
}
|
||||||
for (unsigned int i=0; i<data.controlPoints.size(); i++)
|
for (quint32 i=0; i<data.controlPoints.size(); i++)
|
||||||
{
|
{
|
||||||
dw.dxfReal(10, data.controlPoints[i][0]);
|
dw.dxfReal(10, data.controlPoints[i][0]);
|
||||||
dw.dxfReal(20, data.controlPoints[i][1]);
|
dw.dxfReal(20, data.controlPoints[i][1]);
|
||||||
}
|
}
|
||||||
for (unsigned int i=0; i<data.weights.size(); i++)
|
for (quint32 i=0; i<data.weights.size(); i++)
|
||||||
{
|
{
|
||||||
dw.dxfReal(42, data.weights[i]);
|
dw.dxfReal(42, data.weights[i]);
|
||||||
}
|
}
|
||||||
if (data.nFit>0)
|
if (data.nFit>0)
|
||||||
{
|
{
|
||||||
dw.dxfInt(97, static_cast<int>(data.nFit));
|
dw.dxfInt(97, static_cast<int>(data.nFit));
|
||||||
for (unsigned int i=0; i<data.fitPoints.size(); i++)
|
for (quint32 i=0; i<data.fitPoints.size(); i++)
|
||||||
{
|
{
|
||||||
dw.dxfReal(11, data.fitPoints[i][0]);
|
dw.dxfReal(11, data.fitPoints[i][0]);
|
||||||
dw.dxfReal(21, data.fitPoints[i][1]);
|
dw.dxfReal(21, data.fitPoints[i][1]);
|
||||||
|
|
|
@ -125,14 +125,14 @@ public:
|
||||||
DL_CreationInterface* creationInterface);
|
DL_CreationInterface* creationInterface);
|
||||||
bool readDxfGroups(FILE* fp,
|
bool readDxfGroups(FILE* fp,
|
||||||
DL_CreationInterface* creationInterface);
|
DL_CreationInterface* creationInterface);
|
||||||
static bool getStrippedLine(std::string& s, unsigned int size,
|
static bool getStrippedLine(std::string& s, quint32 size,
|
||||||
FILE* stream);
|
FILE* stream);
|
||||||
|
|
||||||
bool readDxfGroups(std::stringstream& stream,
|
bool readDxfGroups(std::stringstream& stream,
|
||||||
DL_CreationInterface* creationInterface);
|
DL_CreationInterface* creationInterface);
|
||||||
bool in(std::stringstream &stream,
|
bool in(std::stringstream &stream,
|
||||||
DL_CreationInterface* creationInterface);
|
DL_CreationInterface* creationInterface);
|
||||||
static bool getStrippedLine(std::string& s, unsigned int size,
|
static bool getStrippedLine(std::string& s, quint32 size,
|
||||||
std::stringstream& stream);
|
std::stringstream& stream);
|
||||||
|
|
||||||
static bool stripWhiteSpace(char** s);
|
static bool stripWhiteSpace(char** s);
|
||||||
|
@ -496,7 +496,7 @@ private:
|
||||||
// Only the useful part of the group code
|
// Only the useful part of the group code
|
||||||
std::string groupCodeTmp;
|
std::string groupCodeTmp;
|
||||||
// ...same as integer
|
// ...same as integer
|
||||||
unsigned int groupCode;
|
quint32 groupCode;
|
||||||
// Only the useful part of the group value
|
// Only the useful part of the group value
|
||||||
std::string groupValue;
|
std::string groupValue;
|
||||||
// Current entity type
|
// Current entity type
|
||||||
|
|
|
@ -390,20 +390,20 @@ struct DXFLIB_EXPORT DL_PolylineData
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags)
|
DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags)
|
||||||
: number(static_cast<unsigned int>(pNumber)),
|
: number(static_cast<quint32>(pNumber)),
|
||||||
m(static_cast<unsigned int>(pMVerteces)),
|
m(static_cast<quint32>(pMVerteces)),
|
||||||
n(static_cast<unsigned int>(pNVerteces)), flags(pFlags)
|
n(static_cast<quint32>(pNVerteces)), flags(pFlags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Number of vertices in this polyline. */
|
/*! Number of vertices in this polyline. */
|
||||||
unsigned int number;
|
quint32 number;
|
||||||
|
|
||||||
/*! Number of vertices in m direction if polyline is a polygon mesh. */
|
/*! Number of vertices in m direction if polyline is a polygon mesh. */
|
||||||
unsigned int m;
|
quint32 m;
|
||||||
|
|
||||||
/*! Number of vertices in n direction if polyline is a polygon mesh. */
|
/*! Number of vertices in n direction if polyline is a polygon mesh. */
|
||||||
unsigned int n;
|
quint32 n;
|
||||||
|
|
||||||
/*! Flags */
|
/*! Flags */
|
||||||
int flags;
|
int flags;
|
||||||
|
@ -520,10 +520,10 @@ struct DXFLIB_EXPORT DL_SplineData
|
||||||
int nControl,
|
int nControl,
|
||||||
int nFit,
|
int nFit,
|
||||||
int flags) :
|
int flags) :
|
||||||
degree(static_cast<unsigned int>(degree)),
|
degree(static_cast<quint32>(degree)),
|
||||||
nKnots(static_cast<unsigned int>(nKnots)),
|
nKnots(static_cast<quint32>(nKnots)),
|
||||||
nControl(static_cast<unsigned int>(nControl)),
|
nControl(static_cast<quint32>(nControl)),
|
||||||
nFit(static_cast<unsigned int>(nFit)),
|
nFit(static_cast<quint32>(nFit)),
|
||||||
flags(flags),
|
flags(flags),
|
||||||
tangentStartX(0.0),
|
tangentStartX(0.0),
|
||||||
tangentStartY(0.0),
|
tangentStartY(0.0),
|
||||||
|
@ -535,16 +535,16 @@ struct DXFLIB_EXPORT DL_SplineData
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Degree of the spline curve. */
|
/*! Degree of the spline curve. */
|
||||||
unsigned int degree;
|
quint32 degree;
|
||||||
|
|
||||||
/*! Number of knots. */
|
/*! Number of knots. */
|
||||||
unsigned int nKnots;
|
quint32 nKnots;
|
||||||
|
|
||||||
/*! Number of control points. */
|
/*! Number of control points. */
|
||||||
unsigned int nControl;
|
quint32 nControl;
|
||||||
|
|
||||||
/*! Number of fit points. */
|
/*! Number of fit points. */
|
||||||
unsigned int nFit;
|
quint32 nFit;
|
||||||
|
|
||||||
/*! Flags */
|
/*! Flags */
|
||||||
int flags;
|
int flags;
|
||||||
|
@ -1550,12 +1550,12 @@ struct DXFLIB_EXPORT DL_HatchEdgeData
|
||||||
* Constructor for a spline edge.
|
* Constructor for a spline edge.
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData(unsigned int degree,
|
DL_HatchEdgeData(quint32 degree,
|
||||||
bool rational,
|
bool rational,
|
||||||
bool periodic,
|
bool periodic,
|
||||||
unsigned int nKnots,
|
quint32 nKnots,
|
||||||
unsigned int nControl,
|
quint32 nControl,
|
||||||
unsigned int nFit,
|
quint32 nFit,
|
||||||
const std::vector<double>& knots,
|
const std::vector<double>& knots,
|
||||||
const std::vector<std::vector<double> >& controlPoints,
|
const std::vector<std::vector<double> >& controlPoints,
|
||||||
const std::vector<std::vector<double> >& fitPoints,
|
const std::vector<std::vector<double> >& fitPoints,
|
||||||
|
@ -1629,15 +1629,15 @@ struct DXFLIB_EXPORT DL_HatchEdgeData
|
||||||
|
|
||||||
|
|
||||||
/*! Spline degree */
|
/*! Spline degree */
|
||||||
unsigned int degree;
|
quint32 degree;
|
||||||
bool rational;
|
bool rational;
|
||||||
bool periodic;
|
bool periodic;
|
||||||
/*! Number of knots. */
|
/*! Number of knots. */
|
||||||
unsigned int nKnots;
|
quint32 nKnots;
|
||||||
/*! Number of control points. */
|
/*! Number of control points. */
|
||||||
unsigned int nControl;
|
quint32 nControl;
|
||||||
/*! Number of fit points. */
|
/*! Number of fit points. */
|
||||||
unsigned int nFit;
|
quint32 nFit;
|
||||||
|
|
||||||
std::vector<std::vector<double> > controlPoints;
|
std::vector<std::vector<double> > controlPoints;
|
||||||
std::vector<double> knots;
|
std::vector<double> knots;
|
||||||
|
|
|
@ -71,7 +71,7 @@ void DL_WriterA::dxfReal(int gc, double value) const
|
||||||
// Cut away those zeros at the end:
|
// Cut away those zeros at the end:
|
||||||
bool dot = false;
|
bool dot = false;
|
||||||
int end = -1;
|
int end = -1;
|
||||||
for (unsigned int i=0; i<strlen(str); ++i)
|
for (quint32 i=0; i<strlen(str); ++i)
|
||||||
{
|
{
|
||||||
if (str[i]=='.')
|
if (str[i]=='.')
|
||||||
{
|
{
|
||||||
|
|
|
@ -253,7 +253,7 @@ void VMeasurements::ReadMeasurements() const
|
||||||
qreal ksize = GetParametrDouble(dom, AttrSizeIncrease, "0");
|
qreal ksize = GetParametrDouble(dom, AttrSizeIncrease, "0");
|
||||||
qreal kheight = GetParametrDouble(dom, AttrHeightIncrease, "0");
|
qreal kheight = GetParametrDouble(dom, AttrHeightIncrease, "0");
|
||||||
|
|
||||||
tempMeash = new VMeasurement(static_cast<unsigned int>(i), name, BaseSize(), BaseHeight(), base, ksize,
|
tempMeash = new VMeasurement(static_cast<quint32>(i), name, BaseSize(), BaseHeight(), base, ksize,
|
||||||
kheight);
|
kheight);
|
||||||
|
|
||||||
base = UnitConvertor(base, MUnit(), *data->GetPatternUnit());
|
base = UnitConvertor(base, MUnit(), *data->GetPatternUnit());
|
||||||
|
@ -263,7 +263,7 @@ void VMeasurements::ReadMeasurements() const
|
||||||
const qreal baseSize = UnitConvertor(BaseSize(), MUnit(), *data->GetPatternUnit());
|
const qreal baseSize = UnitConvertor(BaseSize(), MUnit(), *data->GetPatternUnit());
|
||||||
const qreal baseHeight = UnitConvertor(BaseHeight(), MUnit(), *data->GetPatternUnit());
|
const qreal baseHeight = UnitConvertor(BaseHeight(), MUnit(), *data->GetPatternUnit());
|
||||||
|
|
||||||
meash = new VMeasurement(static_cast<unsigned int>(i), name, baseSize, baseHeight, base, ksize, kheight,
|
meash = new VMeasurement(static_cast<quint32>(i), name, baseSize, baseHeight, base, ksize, kheight,
|
||||||
fullName, description);
|
fullName, description);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -272,10 +272,10 @@ void VMeasurements::ReadMeasurements() const
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
qreal value = EvalFormula(tempData, formula, &ok);
|
qreal value = EvalFormula(tempData, formula, &ok);
|
||||||
|
|
||||||
tempMeash = new VMeasurement(tempData, static_cast<unsigned int>(i), name, value, formula, ok);
|
tempMeash = new VMeasurement(tempData, static_cast<quint32>(i), name, value, formula, ok);
|
||||||
|
|
||||||
value = UnitConvertor(value, MUnit(), *data->GetPatternUnit());
|
value = UnitConvertor(value, MUnit(), *data->GetPatternUnit());
|
||||||
meash = new VMeasurement(data, static_cast<unsigned int>(i), name, value, formula, ok, fullName,
|
meash = new VMeasurement(data, static_cast<quint32>(i), name, value, formula, ok, fullName,
|
||||||
description);
|
description);
|
||||||
}
|
}
|
||||||
tempData->AddVariable(name, tempMeash);
|
tempData->AddVariable(name, tempMeash);
|
||||||
|
|
|
@ -82,13 +82,13 @@ QVector<QPointF> VContour::GetContour() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VContour::GetShift() const
|
quint32 VContour::GetShift() const
|
||||||
{
|
{
|
||||||
return d->shift;
|
return d->shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VContour::SetShift(unsigned int shift)
|
void VContour::SetShift(quint32 shift)
|
||||||
{
|
{
|
||||||
d->shift = shift;
|
d->shift = shift;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ public:
|
||||||
void SetContour(const QVector<QPointF> &contour);
|
void SetContour(const QVector<QPointF> &contour);
|
||||||
QVector<QPointF> GetContour() const;
|
QVector<QPointF> GetContour() const;
|
||||||
|
|
||||||
unsigned int GetShift() const;
|
quint32 GetShift() const;
|
||||||
void SetShift(unsigned int shift);
|
void SetShift(quint32 shift);
|
||||||
|
|
||||||
int GetHeight() const;
|
int GetHeight() const;
|
||||||
void SetHeight(int height);
|
void SetHeight(int height);
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
/** @brief paperWidth width of paper in pixels*/
|
/** @brief paperWidth width of paper in pixels*/
|
||||||
int paperWidth;
|
int paperWidth;
|
||||||
|
|
||||||
unsigned int shift;
|
quint32 shift;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef Q_CC_GNU
|
#ifdef Q_CC_GNU
|
||||||
|
|
|
@ -268,13 +268,13 @@ void VLayoutGenerator::SetPaperWidth(int value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VLayoutGenerator::GetShift() const
|
quint32 VLayoutGenerator::GetShift() const
|
||||||
{
|
{
|
||||||
return shift;
|
return shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VLayoutGenerator::SetShift(unsigned int shift)
|
void VLayoutGenerator::SetShift(quint32 shift)
|
||||||
{
|
{
|
||||||
this->shift = shift;
|
this->shift = shift;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,8 @@ public:
|
||||||
int GetPaperWidth() const;
|
int GetPaperWidth() const;
|
||||||
void SetPaperWidth(int value);
|
void SetPaperWidth(int value);
|
||||||
|
|
||||||
unsigned int GetShift() const;
|
quint32 GetShift() const;
|
||||||
void SetShift(unsigned int shift);
|
void SetShift(quint32 shift);
|
||||||
|
|
||||||
void Generate();
|
void Generate();
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ private:
|
||||||
int paperWidth;
|
int paperWidth;
|
||||||
volatile bool stopGeneration;
|
volatile bool stopGeneration;
|
||||||
LayoutErrors state;
|
LayoutErrors state;
|
||||||
unsigned int shift;
|
quint32 shift;
|
||||||
bool rotate;
|
bool rotate;
|
||||||
int rotationIncrease;
|
int rotationIncrease;
|
||||||
bool autoCrop;
|
bool autoCrop;
|
||||||
|
|
|
@ -107,13 +107,13 @@ void VLayoutPaper::SetLayoutWidth(qreal width)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VLayoutPaper::GetShift() const
|
quint32 VLayoutPaper::GetShift() const
|
||||||
{
|
{
|
||||||
return d->globalContour.GetShift();
|
return d->globalContour.GetShift();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VLayoutPaper::SetShift(unsigned int shift)
|
void VLayoutPaper::SetShift(quint32 shift)
|
||||||
{
|
{
|
||||||
d->globalContour.SetShift(shift);
|
d->globalContour.SetShift(shift);
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ bool VLayoutPaper::AddToSheet(const VLayoutDetail &detail, volatile bool &stop)
|
||||||
threads.append(thread);
|
threads.append(thread);
|
||||||
thread_pool->start(thread);
|
thread_pool->start(thread);
|
||||||
|
|
||||||
d->frame = d->frame + 3 + static_cast<unsigned int>(360/d->rotationIncrease*2);
|
d->frame = d->frame + 3 + static_cast<quint32>(360/d->rotationIncrease*2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ public:
|
||||||
qreal GetLayoutWidth() const;
|
qreal GetLayoutWidth() const;
|
||||||
void SetLayoutWidth(qreal width);
|
void SetLayoutWidth(qreal width);
|
||||||
|
|
||||||
unsigned int GetShift() const;
|
quint32 GetShift() const;
|
||||||
void SetShift(unsigned int shift);
|
void SetShift(quint32 shift);
|
||||||
|
|
||||||
bool GetRotate() const;
|
bool GetRotate() const;
|
||||||
void SetRotate(bool value);
|
void SetRotate(bool value);
|
||||||
|
|
|
@ -608,7 +608,7 @@ void VPosition::RotateEdges(VLayoutDetail &detail, const QLineF &globalEdge, int
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPosition::AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ, unsigned int shift)
|
void VPosition::AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ, quint32 shift)
|
||||||
{
|
{
|
||||||
int processedEdges = 0;
|
int processedEdges = 0;
|
||||||
const int nD = detail.EdgesCount();
|
const int nD = detail.EdgesCount();
|
||||||
|
@ -639,7 +639,7 @@ QPolygonF VPosition::GlobalPolygon() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QVector<QPointF> VPosition::CutEdge(const QLineF &edge, unsigned int shift)
|
QVector<QPointF> VPosition::CutEdge(const QLineF &edge, quint32 shift)
|
||||||
{
|
{
|
||||||
QVector<QPointF> points;
|
QVector<QPointF> points;
|
||||||
if (shift == 0)
|
if (shift == 0)
|
||||||
|
|
|
@ -126,8 +126,8 @@ private:
|
||||||
static QPainterPath DrawContour(const QVector<QPointF> &points);
|
static QPainterPath DrawContour(const QVector<QPointF> &points);
|
||||||
static QPainterPath DrawDetails(const QVector<VLayoutDetail> &details);
|
static QPainterPath DrawDetails(const QVector<VLayoutDetail> &details);
|
||||||
|
|
||||||
static void AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ, unsigned int shift);
|
static void AppendWhole(QVector<QPointF> &contour, const VLayoutDetail &detail, int detJ, quint32 shift);
|
||||||
static QVector<QPointF> CutEdge(const QLineF &edge, unsigned int shift);
|
static QVector<QPointF> CutEdge(const QLineF &edge, quint32 shift);
|
||||||
|
|
||||||
void Rotate(int increase);
|
void Rotate(int increase);
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VPoster::VPoster(const QPrinter *printer)
|
VPoster::VPoster(const QPrinter *printer)
|
||||||
:printer(printer), allowence(static_cast<unsigned int>(qRound(10./25.4*printer->resolution())))//1 cm
|
:printer(printer), allowence(static_cast<quint32>(qRound(10./25.4*printer->resolution())))//1 cm
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
QVector<QImage> Generate(const QImage &image, int page, int sheets = 1) const;
|
QVector<QImage> Generate(const QImage &image, int page, int sheets = 1) const;
|
||||||
private:
|
private:
|
||||||
const QPrinter *printer;
|
const QPrinter *printer;
|
||||||
unsigned int allowence;
|
quint32 allowence;
|
||||||
|
|
||||||
int CountRows(int height) const;
|
int CountRows(int height) const;
|
||||||
int CountColomns(int width) const;
|
int CountColomns(int width) const;
|
||||||
|
|
|
@ -295,11 +295,11 @@ void VSettings::SetLayoutPaperWidth(int value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VSettings::GetLayoutShift() const
|
quint32 VSettings::GetLayoutShift() const
|
||||||
{
|
{
|
||||||
const unsigned int def = GetDefLayoutShift();
|
const quint32 def = GetDefLayoutShift();
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
const unsigned int shift = value(SettingLayoutShift, def).toUInt(&ok);
|
const quint32 shift = value(SettingLayoutShift, def).toUInt(&ok);
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
return shift;
|
return shift;
|
||||||
|
@ -311,23 +311,23 @@ unsigned int VSettings::GetLayoutShift() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VSettings::GetDefLayoutShift()
|
quint32 VSettings::GetDefLayoutShift()
|
||||||
{
|
{
|
||||||
return static_cast<unsigned int>(UnitConvertor(50, Unit::Mm, Unit::Px));
|
return static_cast<quint32>(UnitConvertor(50, Unit::Mm, Unit::Px));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VSettings::SetLayoutShift(unsigned int value)
|
void VSettings::SetLayoutShift(quint32 value)
|
||||||
{
|
{
|
||||||
setValue(SettingLayoutShift, value);
|
setValue(SettingLayoutShift, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VSettings::GetLayoutWidth() const
|
quint32 VSettings::GetLayoutWidth() const
|
||||||
{
|
{
|
||||||
const unsigned int def = GetDefLayoutWidth();
|
const quint32 def = GetDefLayoutWidth();
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
const unsigned int lWidth = value(SettingLayoutWidth, def).toUInt(&ok);
|
const quint32 lWidth = value(SettingLayoutWidth, def).toUInt(&ok);
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
return lWidth;
|
return lWidth;
|
||||||
|
@ -339,13 +339,13 @@ unsigned int VSettings::GetLayoutWidth() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
unsigned int VSettings::GetDefLayoutWidth()
|
quint32 VSettings::GetDefLayoutWidth()
|
||||||
{
|
{
|
||||||
return static_cast<unsigned int>(UnitConvertor(2.5, Unit::Mm, Unit::Px));
|
return static_cast<quint32>(UnitConvertor(2.5, Unit::Mm, Unit::Px));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VSettings::SetLayoutWidth(unsigned int value)
|
void VSettings::SetLayoutWidth(quint32 value)
|
||||||
{
|
{
|
||||||
setValue(SettingLayoutWidth, value);
|
setValue(SettingLayoutWidth, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,13 +89,13 @@ public:
|
||||||
int GetLayoutPaperWidth() const;
|
int GetLayoutPaperWidth() const;
|
||||||
void SetLayoutPaperWidth(int value);
|
void SetLayoutPaperWidth(int value);
|
||||||
|
|
||||||
unsigned int GetLayoutShift() const;
|
quint32 GetLayoutShift() const;
|
||||||
static unsigned int GetDefLayoutShift();
|
static quint32 GetDefLayoutShift();
|
||||||
void SetLayoutShift(unsigned int value);
|
void SetLayoutShift(quint32 value);
|
||||||
|
|
||||||
unsigned int GetLayoutWidth() const;
|
quint32 GetLayoutWidth() const;
|
||||||
static unsigned int GetDefLayoutWidth();
|
static quint32 GetDefLayoutWidth();
|
||||||
void SetLayoutWidth(unsigned int value);
|
void SetLayoutWidth(quint32 value);
|
||||||
|
|
||||||
Cases GetLayoutGroup() const;
|
Cases GetLayoutGroup() const;
|
||||||
static Cases GetDefLayoutGroup();
|
static Cases GetDefLayoutGroup();
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct point2d_s
|
||||||
{
|
{
|
||||||
real x, y; /* point coordinates */
|
real x, y; /* point coordinates */
|
||||||
halfedge_t* he; /* point halfedge */
|
halfedge_t* he; /* point halfedge */
|
||||||
unsigned int idx; /* point index in input buffer */
|
quint32 idx; /* point index in input buffer */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct face_s
|
struct face_s
|
||||||
|
@ -87,7 +87,7 @@ struct face_s
|
||||||
point2d_t* p[3];
|
point2d_t* p[3];
|
||||||
*/
|
*/
|
||||||
halfedge_t* he; /* a pointing half edge */
|
halfedge_t* he; /* a pointing half edge */
|
||||||
unsigned int num_verts; /* number of vertices on this face */
|
quint32 num_verts; /* number of vertices on this face */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct halfedge_s
|
struct halfedge_s
|
||||||
|
@ -105,9 +105,9 @@ struct delaunay_s
|
||||||
halfedge_t* leftmost_he; /* left most halfedge */
|
halfedge_t* leftmost_he; /* left most halfedge */
|
||||||
point2d_t** points; /* pointer to points */
|
point2d_t** points; /* pointer to points */
|
||||||
face_t* faces; /* faces of delaunay */
|
face_t* faces; /* faces of delaunay */
|
||||||
unsigned int num_faces; /* face count */
|
quint32 num_faces; /* face count */
|
||||||
unsigned int start_point; /* start point index */
|
quint32 start_point; /* start point index */
|
||||||
unsigned int end_point; /* end point index */
|
quint32 end_point; /* end point index */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ static void halfedge_free( halfedge_t* d )
|
||||||
*/
|
*/
|
||||||
void del_free_halfedges( delaunay_t *del )
|
void del_free_halfedges( delaunay_t *del )
|
||||||
{
|
{
|
||||||
unsigned int i;
|
quint32 i;
|
||||||
halfedge_t *d, *sig;
|
halfedge_t *d, *sig;
|
||||||
|
|
||||||
/* if there is nothing to do */
|
/* if there is nothing to do */
|
||||||
|
@ -980,7 +980,7 @@ static void build_halfedge_face( delaunay_t *del, halfedge_t *d )
|
||||||
*/
|
*/
|
||||||
void del_build_faces( delaunay_t *del )
|
void del_build_faces( delaunay_t *del )
|
||||||
{
|
{
|
||||||
unsigned int i;
|
quint32 i;
|
||||||
halfedge_t *curr;
|
halfedge_t *curr;
|
||||||
|
|
||||||
del->num_faces = 0;
|
del->num_faces = 0;
|
||||||
|
@ -1002,11 +1002,11 @@ void del_build_faces( delaunay_t *del )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points) {
|
delaunay2d_t* delaunay2d_from(del_point2d_t *points, quint32 num_points) {
|
||||||
delaunay2d_t* res = NULL;
|
delaunay2d_t* res = NULL;
|
||||||
delaunay_t del;
|
delaunay_t del;
|
||||||
unsigned int i;
|
quint32 i;
|
||||||
unsigned int* faces = NULL;
|
quint32* faces = NULL;
|
||||||
|
|
||||||
del.num_faces = 0; //Warning using uninitialized value
|
del.num_faces = 0; //Warning using uninitialized value
|
||||||
|
|
||||||
|
@ -1031,8 +1031,8 @@ delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points) {
|
||||||
qsort(del.points, num_points, sizeof(point2d_t*), cmp_points);
|
qsort(del.points, num_points, sizeof(point2d_t*), cmp_points);
|
||||||
|
|
||||||
if( num_points >= 3 ) {
|
if( num_points >= 3 ) {
|
||||||
unsigned int fbuff_size = 0;
|
quint32 fbuff_size = 0;
|
||||||
unsigned int j = 0;
|
quint32 j = 0;
|
||||||
|
|
||||||
del_divide_and_conquer( &del, 0, num_points - 1 );
|
del_divide_and_conquer( &del, 0, num_points - 1 );
|
||||||
del_build_faces( &del );
|
del_build_faces( &del );
|
||||||
|
@ -1040,7 +1040,7 @@ delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points) {
|
||||||
for( i = 0; i < del.num_faces; i++ )
|
for( i = 0; i < del.num_faces; i++ )
|
||||||
fbuff_size += del.faces[i].num_verts + 1;
|
fbuff_size += del.faces[i].num_verts + 1;
|
||||||
|
|
||||||
faces = (unsigned int*)malloc(sizeof(unsigned int) * fbuff_size);
|
faces = (quint32*)malloc(sizeof(quint32) * fbuff_size);
|
||||||
|
|
||||||
for( i = 0; i < del.num_faces; i++ )
|
for( i = 0; i < del.num_faces; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,16 +53,16 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/** input points count */
|
/** input points count */
|
||||||
unsigned int num_points;
|
quint32 num_points;
|
||||||
|
|
||||||
/** the input points */
|
/** the input points */
|
||||||
del_point2d_t* points;
|
del_point2d_t* points;
|
||||||
|
|
||||||
/** number of returned faces */
|
/** number of returned faces */
|
||||||
unsigned int num_faces;
|
quint32 num_faces;
|
||||||
|
|
||||||
/** the triangles given as a sequence: num verts, verts indices, num verts, verts indices first face is the external face */
|
/** the triangles given as a sequence: num verts, verts indices, num verts, verts indices first face is the external face */
|
||||||
unsigned int* faces;
|
quint32* faces;
|
||||||
} delaunay2d_t;
|
} delaunay2d_t;
|
||||||
|
|
||||||
typedef int (*incircle_predicate_t)(del_point2d_t* p0, del_point2d_t* p1, del_point2d_t* p2, del_point2d_t* p3);
|
typedef int (*incircle_predicate_t)(del_point2d_t* p0, del_point2d_t* p1, del_point2d_t* p2, del_point2d_t* p3);
|
||||||
|
@ -74,7 +74,7 @@ typedef int (*incircle_predicate_t)(del_point2d_t* p0, del_point2d_t* p1, del_p
|
||||||
* @param num_points number of given point
|
* @param num_points number of given point
|
||||||
* @return: the number of created faces
|
* @return: the number of created faces
|
||||||
*/
|
*/
|
||||||
delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points);
|
delaunay2d_t* delaunay2d_from(del_point2d_t *points, quint32 num_points);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* release a delaunay2d object
|
* release a delaunay2d object
|
||||||
|
|
|
@ -157,7 +157,7 @@ void VObjEngine::drawPath(const QPainterPath &path)
|
||||||
++planeCount;
|
++planeCount;
|
||||||
*stream << "o Plane." << QString("%1").arg(planeCount, 3, 10, QLatin1Char('0')) << endl;
|
*stream << "o Plane." << QString("%1").arg(planeCount, 3, 10, QLatin1Char('0')) << endl;
|
||||||
|
|
||||||
unsigned int num_points = 0;
|
quint32 num_points = 0;
|
||||||
|
|
||||||
for (int i=0; i < polygon.count(); i++)
|
for (int i=0; i < polygon.count(); i++)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ void VObjEngine::drawPath(const QPainterPath &path)
|
||||||
QPointF pf[MAX_POINTS];
|
QPointF pf[MAX_POINTS];
|
||||||
bool skipFace=false;//Need skip first face
|
bool skipFace=false;//Need skip first face
|
||||||
|
|
||||||
for (unsigned int i = 0; i < res->num_faces; i++ )
|
for (quint32 i = 0; i < res->num_faces; i++ )
|
||||||
{
|
{
|
||||||
if (offset == 0)
|
if (offset == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,10 +65,10 @@ public:
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(VObjEngine)
|
Q_DISABLE_COPY(VObjEngine)
|
||||||
QSharedPointer<QTextStream> stream;
|
QSharedPointer<QTextStream> stream;
|
||||||
unsigned int globalPointsCount;
|
quint32 globalPointsCount;
|
||||||
QSharedPointer<QIODevice> outputDevice;
|
QSharedPointer<QIODevice> outputDevice;
|
||||||
del_point2d_t points[MAX_POINTS];
|
del_point2d_t points[MAX_POINTS];
|
||||||
unsigned int planeCount;
|
quint32 planeCount;
|
||||||
QSize size;
|
QSize size;
|
||||||
int resolution;
|
int resolution;
|
||||||
QMatrix matrix;
|
QMatrix matrix;
|
||||||
|
|
|
@ -78,10 +78,10 @@ void VColorPropertyEditor::SetColor(const QColor& color_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap VColorPropertyEditor::GetColorPixmap(const QColor& color, unsigned int size)
|
QPixmap VColorPropertyEditor::GetColorPixmap(const QColor& color, quint32 size)
|
||||||
{
|
{
|
||||||
QImage tmpImgage(static_cast<int>(size), static_cast<int>(size), QImage::Format_ARGB32_Premultiplied);
|
QImage tmpImgage(static_cast<int>(size), static_cast<int>(size), QImage::Format_ARGB32_Premultiplied);
|
||||||
tmpImgage.fill(static_cast<unsigned int>(color.rgb()));
|
tmpImgage.fill(static_cast<quint32>(color.rgb()));
|
||||||
return QPixmap::fromImage(tmpImgage);
|
return QPixmap::fromImage(tmpImgage);
|
||||||
// todo: support alpha channel
|
// todo: support alpha channel
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
//! \param color The color to fill the image with
|
//! \param color The color to fill the image with
|
||||||
//! \size The size of the generated pixmap
|
//! \size The size of the generated pixmap
|
||||||
//! \return Returns a QPixmap
|
//! \return Returns a QPixmap
|
||||||
static QPixmap GetColorPixmap(const QColor& color, unsigned int size = 16);
|
static QPixmap GetColorPixmap(const QColor& color, quint32 size = 16);
|
||||||
|
|
||||||
//! A helper function to convert a color into a string.
|
//! A helper function to convert a color into a string.
|
||||||
//! \param color The color to fill the image with
|
//! \param color The color to fill the image with
|
||||||
|
|
|
@ -120,9 +120,9 @@ void VisToolSplinePath::setMode(const Mode &value)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QGraphicsEllipseItem *VisToolSplinePath::getPoint(unsigned int i)
|
QGraphicsEllipseItem *VisToolSplinePath::getPoint(quint32 i)
|
||||||
{
|
{
|
||||||
if (static_cast<unsigned int>(points.size() - 1) >= i && points.isEmpty() == false)
|
if (static_cast<quint32>(points.size() - 1) >= i && points.isEmpty() == false)
|
||||||
{
|
{
|
||||||
return points.at(static_cast<int>(i));
|
return points.at(static_cast<int>(i));
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ protected:
|
||||||
VSplinePath path;
|
VSplinePath path;
|
||||||
Mode mode;
|
Mode mode;
|
||||||
|
|
||||||
QGraphicsEllipseItem * getPoint(unsigned int i);
|
QGraphicsEllipseItem * getPoint(quint32 i);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VISTOOLSPLINEPATH_H
|
#endif // VISTOOLSPLINEPATH_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user