diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index d99d6f449..91a4802d4 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -136,25 +136,25 @@ void DialogLayoutSettings::SetPaperWidth(int value) } //--------------------------------------------------------------------------------------------------------------------- -unsigned int DialogLayoutSettings::GetShift() const +quint32 DialogLayoutSettings::GetShift() const { return static_cast(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())); } //--------------------------------------------------------------------------------------------------------------------- -unsigned int DialogLayoutSettings::GetLayoutWidth() const +quint32 DialogLayoutSettings::GetLayoutWidth() const { return static_cast(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())); } diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index 17b54b2e2..6130fe281 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -68,11 +68,11 @@ public: int GetPaperWidth() const; void SetPaperWidth(int value); - unsigned int GetShift() const; - void SetShift(unsigned int value); + quint32 GetShift() const; + void SetShift(quint32 value); - unsigned int GetLayoutWidth() const; - void SetLayoutWidth(unsigned int value); + quint32 GetLayoutWidth() const; + void SetLayoutWidth(quint32 value); Cases GetGroup() const; void SetGroup(const Cases &value); diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 8743240f7..19f7f9731 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -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 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; - const int count = qFloor(index/static_cast(alphabet.size())); + const int count = qFloor(index/static_cast(alphabet.size())); const int number = static_cast(index) - alphabet.size() * count; int i = 0; do @@ -2390,7 +2390,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa int i = 0; for (;;) { - name = GetLabelBase(static_cast(drawList.size() + i)); + name = GetLabelBase(static_cast(drawList.size() + i)); if (data->IsUnique(name)) { return name; @@ -2424,7 +2424,7 @@ QString VPattern::GenerateLabel(const LabelType &type, const QString &reservedNa } } - QString labelBase = GetLabelBase(static_cast(index)); + QString labelBase = GetLabelBase(static_cast(index)); qint32 num = 1; QString name; diff --git a/src/app/valentina/xml/vpattern.h b/src/app/valentina/xml/vpattern.h index 42eae0771..dc72b5ce9 100644 --- a/src/app/valentina/xml/vpattern.h +++ b/src/app/valentina/xml/vpattern.h @@ -123,7 +123,7 @@ private: template QRectF ToolBoundingRect(const QRectF &rec, const quint32 &id) const; void ParseCurrentPP(); - QString GetLabelBase(unsigned int index)const; + QString GetLabelBase(quint32 index)const; void ParseToolBasePoint(VMainGraphicsScene *scene, const QDomElement &domElement, const Document &parse); void ParseToolEndLine(VMainGraphicsScene *scene, QDomElement &domElement, const Document &parse); diff --git a/src/libs/qmuparser/qmuparserbytecode.cpp b/src/libs/qmuparser/qmuparserbytecode.cpp index ff10024e0..c8f93947c 100644 --- a/src/libs/qmuparser/qmuparserbytecode.cpp +++ b/src/libs/qmuparser/qmuparserbytecode.cpp @@ -413,12 +413,12 @@ void QmuParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc) { if (a_iArgc>=0) { - m_iStackPos = m_iStackPos - static_cast(a_iArgc) + 1; + m_iStackPos = m_iStackPos - static_cast(a_iArgc) + 1; } else { // function with unlimited number of arguments - m_iStackPos = static_cast(static_cast(m_iStackPos) + a_iArgc + 1); + m_iStackPos = static_cast(static_cast(m_iStackPos) + a_iArgc + 1); } 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) { - m_iStackPos = static_cast(static_cast(m_iStackPos) - a_iArgc + 1); + m_iStackPos = static_cast(static_cast(m_iStackPos) - a_iArgc + 1); m_iMaxStackSize = qMax(m_iMaxStackSize, m_iStackPos); 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) { - m_iStackPos = static_cast(static_cast(m_iStackPos) - a_iArgc + 1); + m_iStackPos = static_cast(static_cast(m_iStackPos) - a_iArgc + 1); SToken tok; tok.Cmd = cmFUNC_STR; diff --git a/src/libs/vdxf/dxflib/dl_creationadapter.h b/src/libs/vdxf/dxflib/dl_creationadapter.h index 3724303d0..f3d892a0e 100644 --- a/src/libs/vdxf/dxflib/dl_creationadapter.h +++ b/src/libs/vdxf/dxflib/dl_creationadapter.h @@ -41,7 +41,7 @@ class DXFLIB_EXPORT DL_CreationAdapter : public DL_CreationInterface public: 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 addLayer(const DL_LayerData&) {} virtual void addLinetype(const DL_LinetypeData&) {} @@ -128,7 +128,7 @@ public: virtual void setVariableString(const char*, const char*, int) {} virtual void setVariableInt(const char*, int, 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 addMTextChunk(const char*) {} #endif diff --git a/src/libs/vdxf/dxflib/dl_creationinterface.h b/src/libs/vdxf/dxflib/dl_creationinterface.h index 72f506b18..f60548995 100644 --- a/src/libs/vdxf/dxflib/dl_creationinterface.h +++ b/src/libs/vdxf/dxflib/dl_creationinterface.h @@ -57,7 +57,7 @@ public: * Called for every code / value tuple of the DXF file. The complete DXF file * 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. @@ -327,7 +327,7 @@ public: 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 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 addMTextChunk(const char* text) = 0; #endif diff --git a/src/libs/vdxf/dxflib/dl_dxf.cpp b/src/libs/vdxf/dxflib/dl_dxf.cpp index d31bc0c98..4840aaaf3 100644 --- a/src/libs/vdxf/dxflib/dl_dxf.cpp +++ b/src/libs/vdxf/dxflib/dl_dxf.cpp @@ -194,7 +194,7 @@ bool DL_Dxf::readDxfGroups(FILE *fp, DL_CreationInterface* creationInterface) if (DL_Dxf::getStrippedLine(groupCodeTmp, DL_DXF_MAXLINE, fp) && DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, fp) ) { - groupCode = static_cast(toInt(groupCodeTmp)); + groupCode = static_cast(toInt(groupCodeTmp)); creationInterface->processCodeValuePair(groupCode, groupValue); processDXFGroup(creationInterface, static_cast(groupCode), groupValue); @@ -216,7 +216,7 @@ bool DL_Dxf::readDxfGroups(std::stringstream& stream, DL_Dxf::getStrippedLine(groupValue, DL_DXF_MAXLINE, stream) ) { - groupCode = static_cast(toInt(groupCodeTmp)); + groupCode = static_cast(toInt(groupCodeTmp)); processDXFGroup(creationInterface, static_cast(groupCode), groupValue); } 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)? * 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)) { @@ -280,7 +280,7 @@ bool DL_Dxf::getStrippedLine(std::string& s, unsigned int size, FILE *fp) /** * 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) { @@ -1649,7 +1649,7 @@ bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/) { if (vertexIndex>=0 && vertexIndex(vertexIndex) + (groupCode/10-1)] = toReal(groupValue); + vertices[4*static_cast(vertexIndex) + (groupCode/10-1)] = toReal(groupValue); } } else if (groupCode==42 && vertexIndex=0 && controlPointIndex(controlPointIndex) + (groupCode/10-1)] = toReal(groupValue); + controlPoints[3*static_cast(controlPointIndex) + (groupCode/10-1)] = toReal(groupValue); } return true; } @@ -1777,7 +1777,7 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/) if (fitPointIndex>=0 && fitPointIndex(fitPointIndex) + ((groupCode-1)/10-1)] = toReal(groupValue); + fitPoints[3*static_cast(fitPointIndex) + ((groupCode-1)/10-1)] = toReal(groupValue); } return true; } @@ -1843,7 +1843,7 @@ bool DL_Dxf::handleLeaderData(DL_CreationInterface* /*creationInterface*/) if (leaderVertexIndex>=0 && leaderVertexIndex(leaderVertexIndex) + (groupCode/10-1)] + leaderVertices[3*static_cast(leaderVertexIndex) + (groupCode/10-1)] = toReal(groupValue); } } @@ -2180,10 +2180,10 @@ void DL_Dxf::addHatch(DL_CreationInterface* creationInterface) creationInterface->addHatch(hd); - for (unsigned int i=0; iaddHatchLoop(DL_HatchLoopData(static_cast(hatchEdges[i].size()))); - for (unsigned int k=0; kaddHatchEdge(DL_HatchEdgeData(hatchEdges[i][k])); } @@ -2378,7 +2378,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface) switch (groupCode) { case 94: - hatchEdge.degree = static_cast(toInt(groupValue)); + hatchEdge.degree = static_cast(toInt(groupValue)); return true; case 73: hatchEdge.rational = toBool(groupValue); @@ -2387,13 +2387,13 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface) hatchEdge.periodic = toBool(groupValue); return true; case 95: - hatchEdge.nKnots = static_cast(toInt(groupValue)); + hatchEdge.nKnots = static_cast(toInt(groupValue)); return true; case 96: - hatchEdge.nControl = static_cast(toInt(groupValue)); + hatchEdge.nControl = static_cast(toInt(groupValue)); return true; case 97: - hatchEdge.nFit = static_cast(toInt(groupValue)); + hatchEdge.nFit = static_cast(toInt(groupValue)); return true; case 40: if (hatchEdge.knots.size() < hatchEdge.nKnots) @@ -3962,23 +3962,23 @@ void DL_Dxf::writeHatchEdge(DL_WriterA& dw, dw.dxfBool(74, data.periodic); dw.dxfInt(95, static_cast(data.nKnots)); dw.dxfInt(96, static_cast(data.nControl)); - for (unsigned int i=0; i0) { dw.dxfInt(97, static_cast(data.nFit)); - for (unsigned int i=0; i(pNumber)), - m(static_cast(pMVerteces)), - n(static_cast(pNVerteces)), flags(pFlags) + : number(static_cast(pNumber)), + m(static_cast(pMVerteces)), + n(static_cast(pNVerteces)), flags(pFlags) { } /*! Number of vertices in this polyline. */ - unsigned int number; + quint32 number; /*! 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. */ - unsigned int n; + quint32 n; /*! Flags */ int flags; @@ -520,10 +520,10 @@ struct DXFLIB_EXPORT DL_SplineData int nControl, int nFit, int flags) : - degree(static_cast(degree)), - nKnots(static_cast(nKnots)), - nControl(static_cast(nControl)), - nFit(static_cast(nFit)), + degree(static_cast(degree)), + nKnots(static_cast(nKnots)), + nControl(static_cast(nControl)), + nFit(static_cast(nFit)), flags(flags), tangentStartX(0.0), tangentStartY(0.0), @@ -535,16 +535,16 @@ struct DXFLIB_EXPORT DL_SplineData } /*! Degree of the spline curve. */ - unsigned int degree; + quint32 degree; /*! Number of knots. */ - unsigned int nKnots; + quint32 nKnots; /*! Number of control points. */ - unsigned int nControl; + quint32 nControl; /*! Number of fit points. */ - unsigned int nFit; + quint32 nFit; /*! Flags */ int flags; @@ -1550,12 +1550,12 @@ struct DXFLIB_EXPORT DL_HatchEdgeData * Constructor for a spline edge. * Parameters: see member variables. */ - DL_HatchEdgeData(unsigned int degree, + DL_HatchEdgeData(quint32 degree, bool rational, bool periodic, - unsigned int nKnots, - unsigned int nControl, - unsigned int nFit, + quint32 nKnots, + quint32 nControl, + quint32 nFit, const std::vector& knots, const std::vector >& controlPoints, const std::vector >& fitPoints, @@ -1629,15 +1629,15 @@ struct DXFLIB_EXPORT DL_HatchEdgeData /*! Spline degree */ - unsigned int degree; + quint32 degree; bool rational; bool periodic; /*! Number of knots. */ - unsigned int nKnots; + quint32 nKnots; /*! Number of control points. */ - unsigned int nControl; + quint32 nControl; /*! Number of fit points. */ - unsigned int nFit; + quint32 nFit; std::vector > controlPoints; std::vector knots; diff --git a/src/libs/vdxf/dxflib/dl_writer_ascii.cpp b/src/libs/vdxf/dxflib/dl_writer_ascii.cpp index a2365b05f..295934b50 100644 --- a/src/libs/vdxf/dxflib/dl_writer_ascii.cpp +++ b/src/libs/vdxf/dxflib/dl_writer_ascii.cpp @@ -71,7 +71,7 @@ void DL_WriterA::dxfReal(int gc, double value) const // Cut away those zeros at the end: bool dot = false; int end = -1; - for (unsigned int i=0; i(i), name, BaseSize(), BaseHeight(), base, ksize, + tempMeash = new VMeasurement(static_cast(i), name, BaseSize(), BaseHeight(), base, ksize, kheight); base = UnitConvertor(base, MUnit(), *data->GetPatternUnit()); @@ -263,7 +263,7 @@ void VMeasurements::ReadMeasurements() const const qreal baseSize = UnitConvertor(BaseSize(), MUnit(), *data->GetPatternUnit()); const qreal baseHeight = UnitConvertor(BaseHeight(), MUnit(), *data->GetPatternUnit()); - meash = new VMeasurement(static_cast(i), name, baseSize, baseHeight, base, ksize, kheight, + meash = new VMeasurement(static_cast(i), name, baseSize, baseHeight, base, ksize, kheight, fullName, description); } else @@ -272,10 +272,10 @@ void VMeasurements::ReadMeasurements() const bool ok = false; qreal value = EvalFormula(tempData, formula, &ok); - tempMeash = new VMeasurement(tempData, static_cast(i), name, value, formula, ok); + tempMeash = new VMeasurement(tempData, static_cast(i), name, value, formula, ok); value = UnitConvertor(value, MUnit(), *data->GetPatternUnit()); - meash = new VMeasurement(data, static_cast(i), name, value, formula, ok, fullName, + meash = new VMeasurement(data, static_cast(i), name, value, formula, ok, fullName, description); } tempData->AddVariable(name, tempMeash); diff --git a/src/libs/vlayout/vcontour.cpp b/src/libs/vlayout/vcontour.cpp index 1a666544c..5aa02211c 100644 --- a/src/libs/vlayout/vcontour.cpp +++ b/src/libs/vlayout/vcontour.cpp @@ -82,13 +82,13 @@ QVector VContour::GetContour() const } //--------------------------------------------------------------------------------------------------------------------- -unsigned int VContour::GetShift() const +quint32 VContour::GetShift() const { return d->shift; } //--------------------------------------------------------------------------------------------------------------------- -void VContour::SetShift(unsigned int shift) +void VContour::SetShift(quint32 shift) { d->shift = shift; } diff --git a/src/libs/vlayout/vcontour.h b/src/libs/vlayout/vcontour.h index f521e7521..5a6aaa6f7 100644 --- a/src/libs/vlayout/vcontour.h +++ b/src/libs/vlayout/vcontour.h @@ -52,8 +52,8 @@ public: void SetContour(const QVector &contour); QVector GetContour() const; - unsigned int GetShift() const; - void SetShift(unsigned int shift); + quint32 GetShift() const; + void SetShift(quint32 shift); int GetHeight() const; void SetHeight(int height); diff --git a/src/libs/vlayout/vcontour_p.h b/src/libs/vlayout/vcontour_p.h index c0d4f1710..6d4f8d262 100644 --- a/src/libs/vlayout/vcontour_p.h +++ b/src/libs/vlayout/vcontour_p.h @@ -64,7 +64,7 @@ public: /** @brief paperWidth width of paper in pixels*/ int paperWidth; - unsigned int shift; + quint32 shift; }; #ifdef Q_CC_GNU diff --git a/src/libs/vlayout/vlayoutgenerator.cpp b/src/libs/vlayout/vlayoutgenerator.cpp index a070596df..25f7f8da3 100644 --- a/src/libs/vlayout/vlayoutgenerator.cpp +++ b/src/libs/vlayout/vlayoutgenerator.cpp @@ -268,13 +268,13 @@ void VLayoutGenerator::SetPaperWidth(int value) } //--------------------------------------------------------------------------------------------------------------------- -unsigned int VLayoutGenerator::GetShift() const +quint32 VLayoutGenerator::GetShift() const { return shift; } //--------------------------------------------------------------------------------------------------------------------- -void VLayoutGenerator::SetShift(unsigned int shift) +void VLayoutGenerator::SetShift(quint32 shift) { this->shift = shift; } diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h index b2797298a..3332582e7 100644 --- a/src/libs/vlayout/vlayoutgenerator.h +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -58,8 +58,8 @@ public: int GetPaperWidth() const; void SetPaperWidth(int value); - unsigned int GetShift() const; - void SetShift(unsigned int shift); + quint32 GetShift() const; + void SetShift(quint32 shift); void Generate(); @@ -100,7 +100,7 @@ private: int paperWidth; volatile bool stopGeneration; LayoutErrors state; - unsigned int shift; + quint32 shift; bool rotate; int rotationIncrease; bool autoCrop; diff --git a/src/libs/vlayout/vlayoutpaper.cpp b/src/libs/vlayout/vlayoutpaper.cpp index 41c159e41..12d0d453f 100644 --- a/src/libs/vlayout/vlayoutpaper.cpp +++ b/src/libs/vlayout/vlayoutpaper.cpp @@ -107,13 +107,13 @@ void VLayoutPaper::SetLayoutWidth(qreal width) } //--------------------------------------------------------------------------------------------------------------------- -unsigned int VLayoutPaper::GetShift() const +quint32 VLayoutPaper::GetShift() const { return d->globalContour.GetShift(); } //--------------------------------------------------------------------------------------------------------------------- -void VLayoutPaper::SetShift(unsigned int shift) +void VLayoutPaper::SetShift(quint32 shift) { d->globalContour.SetShift(shift); } @@ -216,7 +216,7 @@ bool VLayoutPaper::AddToSheet(const VLayoutDetail &detail, volatile bool &stop) threads.append(thread); thread_pool->start(thread); - d->frame = d->frame + 3 + static_cast(360/d->rotationIncrease*2); + d->frame = d->frame + 3 + static_cast(360/d->rotationIncrease*2); } } diff --git a/src/libs/vlayout/vlayoutpaper.h b/src/libs/vlayout/vlayoutpaper.h index f8f1cab8f..ce1888d88 100644 --- a/src/libs/vlayout/vlayoutpaper.h +++ b/src/libs/vlayout/vlayoutpaper.h @@ -56,8 +56,8 @@ public: qreal GetLayoutWidth() const; void SetLayoutWidth(qreal width); - unsigned int GetShift() const; - void SetShift(unsigned int shift); + quint32 GetShift() const; + void SetShift(quint32 shift); bool GetRotate() const; void SetRotate(bool value); diff --git a/src/libs/vlayout/vposition.cpp b/src/libs/vlayout/vposition.cpp index 3afedeb75..12ac7b6e2 100644 --- a/src/libs/vlayout/vposition.cpp +++ b/src/libs/vlayout/vposition.cpp @@ -608,7 +608,7 @@ void VPosition::RotateEdges(VLayoutDetail &detail, const QLineF &globalEdge, int } //--------------------------------------------------------------------------------------------------------------------- -void VPosition::AppendWhole(QVector &contour, const VLayoutDetail &detail, int detJ, unsigned int shift) +void VPosition::AppendWhole(QVector &contour, const VLayoutDetail &detail, int detJ, quint32 shift) { int processedEdges = 0; const int nD = detail.EdgesCount(); @@ -639,7 +639,7 @@ QPolygonF VPosition::GlobalPolygon() const } //--------------------------------------------------------------------------------------------------------------------- -QVector VPosition::CutEdge(const QLineF &edge, unsigned int shift) +QVector VPosition::CutEdge(const QLineF &edge, quint32 shift) { QVector points; if (shift == 0) diff --git a/src/libs/vlayout/vposition.h b/src/libs/vlayout/vposition.h index 2e82210c7..b7417e7f1 100644 --- a/src/libs/vlayout/vposition.h +++ b/src/libs/vlayout/vposition.h @@ -126,8 +126,8 @@ private: static QPainterPath DrawContour(const QVector &points); static QPainterPath DrawDetails(const QVector &details); - static void AppendWhole(QVector &contour, const VLayoutDetail &detail, int detJ, unsigned int shift); - static QVector CutEdge(const QLineF &edge, unsigned int shift); + static void AppendWhole(QVector &contour, const VLayoutDetail &detail, int detJ, quint32 shift); + static QVector CutEdge(const QLineF &edge, quint32 shift); void Rotate(int increase); }; diff --git a/src/libs/vlayout/vposter.cpp b/src/libs/vlayout/vposter.cpp index 78b63b8cd..111bcc48d 100644 --- a/src/libs/vlayout/vposter.cpp +++ b/src/libs/vlayout/vposter.cpp @@ -40,7 +40,7 @@ //--------------------------------------------------------------------------------------------------------------------- VPoster::VPoster(const QPrinter *printer) - :printer(printer), allowence(static_cast(qRound(10./25.4*printer->resolution())))//1 cm + :printer(printer), allowence(static_cast(qRound(10./25.4*printer->resolution())))//1 cm { } diff --git a/src/libs/vlayout/vposter.h b/src/libs/vlayout/vposter.h index 8b30ab5ba..339e942d7 100644 --- a/src/libs/vlayout/vposter.h +++ b/src/libs/vlayout/vposter.h @@ -44,7 +44,7 @@ public: QVector Generate(const QImage &image, int page, int sheets = 1) const; private: const QPrinter *printer; - unsigned int allowence; + quint32 allowence; int CountRows(int height) const; int CountColomns(int width) const; diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 03078c8a5..3429974f8 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -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; - const unsigned int shift = value(SettingLayoutShift, def).toUInt(&ok); + const quint32 shift = value(SettingLayoutShift, def).toUInt(&ok); if (ok) { return shift; @@ -311,23 +311,23 @@ unsigned int VSettings::GetLayoutShift() const } //--------------------------------------------------------------------------------------------------------------------- -unsigned int VSettings::GetDefLayoutShift() +quint32 VSettings::GetDefLayoutShift() { - return static_cast(UnitConvertor(50, Unit::Mm, Unit::Px)); + return static_cast(UnitConvertor(50, Unit::Mm, Unit::Px)); } //--------------------------------------------------------------------------------------------------------------------- -void VSettings::SetLayoutShift(unsigned int value) +void VSettings::SetLayoutShift(quint32 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; - const unsigned int lWidth = value(SettingLayoutWidth, def).toUInt(&ok); + const quint32 lWidth = value(SettingLayoutWidth, def).toUInt(&ok); if (ok) { return lWidth; @@ -339,13 +339,13 @@ unsigned int VSettings::GetLayoutWidth() const } //--------------------------------------------------------------------------------------------------------------------- -unsigned int VSettings::GetDefLayoutWidth() +quint32 VSettings::GetDefLayoutWidth() { - return static_cast(UnitConvertor(2.5, Unit::Mm, Unit::Px)); + return static_cast(UnitConvertor(2.5, Unit::Mm, Unit::Px)); } //--------------------------------------------------------------------------------------------------------------------- -void VSettings::SetLayoutWidth(unsigned int value) +void VSettings::SetLayoutWidth(quint32 value) { setValue(SettingLayoutWidth, value); } diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 12da5c4ab..e5a04d3bb 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -89,13 +89,13 @@ public: int GetLayoutPaperWidth() const; void SetLayoutPaperWidth(int value); - unsigned int GetLayoutShift() const; - static unsigned int GetDefLayoutShift(); - void SetLayoutShift(unsigned int value); + quint32 GetLayoutShift() const; + static quint32 GetDefLayoutShift(); + void SetLayoutShift(quint32 value); - unsigned int GetLayoutWidth() const; - static unsigned int GetDefLayoutWidth(); - void SetLayoutWidth(unsigned int value); + quint32 GetLayoutWidth() const; + static quint32 GetDefLayoutWidth(); + void SetLayoutWidth(quint32 value); Cases GetLayoutGroup() const; static Cases GetDefLayoutGroup(); diff --git a/src/libs/vobj/delaunay.cpp b/src/libs/vobj/delaunay.cpp index 47029c742..5a37936d8 100644 --- a/src/libs/vobj/delaunay.cpp +++ b/src/libs/vobj/delaunay.cpp @@ -77,7 +77,7 @@ struct point2d_s { real x, y; /* point coordinates */ halfedge_t* he; /* point halfedge */ - unsigned int idx; /* point index in input buffer */ + quint32 idx; /* point index in input buffer */ }; struct face_s @@ -87,7 +87,7 @@ struct face_s point2d_t* p[3]; */ 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 @@ -105,9 +105,9 @@ struct delaunay_s halfedge_t* leftmost_he; /* left most halfedge */ point2d_t** points; /* pointer to points */ face_t* faces; /* faces of delaunay */ - unsigned int num_faces; /* face count */ - unsigned int start_point; /* start point index */ - unsigned int end_point; /* end point index */ + quint32 num_faces; /* face count */ + quint32 start_point; /* start 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 ) { - unsigned int i; + quint32 i; halfedge_t *d, *sig; /* 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 ) { - unsigned int i; + quint32 i; halfedge_t *curr; 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; delaunay_t del; - unsigned int i; - unsigned int* faces = NULL; + quint32 i; + quint32* faces = NULL; 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); if( num_points >= 3 ) { - unsigned int fbuff_size = 0; - unsigned int j = 0; + quint32 fbuff_size = 0; + quint32 j = 0; del_divide_and_conquer( &del, 0, num_points - 1 ); 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++ ) 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++ ) { diff --git a/src/libs/vobj/delaunay.h b/src/libs/vobj/delaunay.h index d6fcf66ea..f9fac4315 100644 --- a/src/libs/vobj/delaunay.h +++ b/src/libs/vobj/delaunay.h @@ -53,16 +53,16 @@ typedef struct { typedef struct { /** input points count */ - unsigned int num_points; + quint32 num_points; /** the input points */ del_point2d_t* points; /** 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 */ - unsigned int* faces; + quint32* faces; } delaunay2d_t; 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 * @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 diff --git a/src/libs/vobj/vobjengine.cpp b/src/libs/vobj/vobjengine.cpp index 5a049283a..e4acb7379 100644 --- a/src/libs/vobj/vobjengine.cpp +++ b/src/libs/vobj/vobjengine.cpp @@ -157,7 +157,7 @@ void VObjEngine::drawPath(const QPainterPath &path) ++planeCount; *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++) { @@ -175,7 +175,7 @@ void VObjEngine::drawPath(const QPainterPath &path) QPointF pf[MAX_POINTS]; 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) { diff --git a/src/libs/vobj/vobjengine.h b/src/libs/vobj/vobjengine.h index 3a2b4fab2..a6cedc275 100644 --- a/src/libs/vobj/vobjengine.h +++ b/src/libs/vobj/vobjengine.h @@ -65,10 +65,10 @@ public: private: Q_DISABLE_COPY(VObjEngine) QSharedPointer stream; - unsigned int globalPointsCount; + quint32 globalPointsCount; QSharedPointer outputDevice; del_point2d_t points[MAX_POINTS]; - unsigned int planeCount; + quint32 planeCount; QSize size; int resolution; QMatrix matrix; diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp index 8dface9a7..3bf57e1d8 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp @@ -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(size), static_cast(size), QImage::Format_ARGB32_Premultiplied); - tmpImgage.fill(static_cast(color.rgb())); + tmpImgage.fill(static_cast(color.rgb())); return QPixmap::fromImage(tmpImgage); // todo: support alpha channel } diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h index 9f833d27b..bbd7b0e40 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h @@ -51,7 +51,7 @@ public: //! \param color The color to fill the image with //! \size The size of the generated pixmap //! \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. //! \param color The color to fill the image with diff --git a/src/libs/vtools/visualization/vistoolsplinepath.cpp b/src/libs/vtools/visualization/vistoolsplinepath.cpp index 78597eaa1..d0f42833b 100644 --- a/src/libs/vtools/visualization/vistoolsplinepath.cpp +++ b/src/libs/vtools/visualization/vistoolsplinepath.cpp @@ -120,9 +120,9 @@ void VisToolSplinePath::setMode(const Mode &value) } //--------------------------------------------------------------------------------------------------------------------- -QGraphicsEllipseItem *VisToolSplinePath::getPoint(unsigned int i) +QGraphicsEllipseItem *VisToolSplinePath::getPoint(quint32 i) { - if (static_cast(points.size() - 1) >= i && points.isEmpty() == false) + if (static_cast(points.size() - 1) >= i && points.isEmpty() == false) { return points.at(static_cast(i)); } diff --git a/src/libs/vtools/visualization/vistoolsplinepath.h b/src/libs/vtools/visualization/vistoolsplinepath.h index 050db9936..b1f69fb5d 100644 --- a/src/libs/vtools/visualization/vistoolsplinepath.h +++ b/src/libs/vtools/visualization/vistoolsplinepath.h @@ -61,7 +61,7 @@ protected: VSplinePath path; Mode mode; - QGraphicsEllipseItem * getPoint(unsigned int i); + QGraphicsEllipseItem * getPoint(quint32 i); }; #endif // VISTOOLSPLINEPATH_H