From: Shamus Hammons Date: Sun, 6 Jun 2010 01:53:59 +0000 (+0000) Subject: Scrubbed out all references to RS2::qtToRsButton(). Gone! X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46a5b82a20219b6d24e6095f56843db3eaa45595;p=architektonas Scrubbed out all references to RS2::qtToRsButton(). Gone! --- diff --git a/src/actions/rs_actionblockscreate.cpp b/src/actions/rs_actionblockscreate.cpp index 083f2fe..70f57d0 100644 --- a/src/actions/rs_actionblockscreate.cpp +++ b/src/actions/rs_actionblockscreate.cpp @@ -117,7 +117,7 @@ void RS_ActionBlocksCreate::mouseMoveEvent(QMouseEvent * e) void RS_ActionBlocksCreate::mouseReleaseEvent(QMouseEvent * e) { -// if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) +// if (e->button() == Qt::LeftButton) if (e->button() == Qt::LeftButton) { // Vector ce(snapPoint(e)); @@ -125,7 +125,7 @@ void RS_ActionBlocksCreate::mouseReleaseEvent(QMouseEvent * e) Vector ce(snapPoint(e)); coordinateEvent(&ce); } -// else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) +// else if (e->button() == Qt::RightButton) else if (e->button() == Qt::RightButton) { deleteSnapper(); diff --git a/src/actions/rs_actiondefault.cpp b/src/actions/rs_actiondefault.cpp index 9159eee..7ae500b 100644 --- a/src/actions/rs_actiondefault.cpp +++ b/src/actions/rs_actiondefault.cpp @@ -166,7 +166,7 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e) void RS_ActionDefault::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { diff --git a/src/actions/rs_actiondimangular.cpp b/src/actions/rs_actiondimangular.cpp index 31bb89e..9ebb568 100644 --- a/src/actions/rs_actiondimangular.cpp +++ b/src/actions/rs_actiondimangular.cpp @@ -119,7 +119,7 @@ void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e) void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -187,7 +187,7 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondimdiametric.cpp b/src/actions/rs_actiondimdiametric.cpp index 07bfa2b..ce47570 100644 --- a/src/actions/rs_actiondimdiametric.cpp +++ b/src/actions/rs_actiondimdiametric.cpp @@ -144,7 +144,7 @@ void RS_ActionDimDiametric::mouseMoveEvent(QMouseEvent * e) void RS_ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -185,7 +185,7 @@ void RS_ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondimleader.cpp b/src/actions/rs_actiondimleader.cpp index c1d2aa9..8d625d9 100644 --- a/src/actions/rs_actiondimleader.cpp +++ b/src/actions/rs_actiondimleader.cpp @@ -121,12 +121,12 @@ void RS_ActionDimLeader::mouseMoveEvent(QMouseEvent * e) void RS_ActionDimLeader::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { if (getStatus() == SetEndpoint) { diff --git a/src/actions/rs_actiondimlinear.cpp b/src/actions/rs_actiondimlinear.cpp index db10186..efa3be0 100644 --- a/src/actions/rs_actiondimlinear.cpp +++ b/src/actions/rs_actiondimlinear.cpp @@ -142,12 +142,12 @@ void RS_ActionDimLinear::mouseMoveEvent(QMouseEvent * e) void RS_ActionDimLinear::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondimradial.cpp b/src/actions/rs_actiondimradial.cpp index 9d3bebf..f9b8641 100644 --- a/src/actions/rs_actiondimradial.cpp +++ b/src/actions/rs_actiondimradial.cpp @@ -139,7 +139,7 @@ void RS_ActionDimRadial::mouseMoveEvent(QMouseEvent * e) void RS_ActionDimRadial::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -179,7 +179,7 @@ void RS_ActionDimRadial::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawarc.cpp b/src/actions/rs_actiondrawarc.cpp index c4fded9..671d3cd 100644 --- a/src/actions/rs_actiondrawarc.cpp +++ b/src/actions/rs_actiondrawarc.cpp @@ -156,12 +156,12 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawArc::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawarc3p.cpp b/src/actions/rs_actiondrawarc3p.cpp index 6f5d641..bf1c493 100644 --- a/src/actions/rs_actiondrawarc3p.cpp +++ b/src/actions/rs_actiondrawarc3p.cpp @@ -138,12 +138,12 @@ void RS_ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawArc3P::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawarctangential.cpp b/src/actions/rs_actiondrawarctangential.cpp index 25d52bc..1f639dc 100644 --- a/src/actions/rs_actiondrawarctangential.cpp +++ b/src/actions/rs_actiondrawarctangential.cpp @@ -135,7 +135,7 @@ void RS_ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -176,7 +176,7 @@ void RS_ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawcircle.cpp b/src/actions/rs_actiondrawcircle.cpp index 54baf31..7b1d50b 100644 --- a/src/actions/rs_actiondrawcircle.cpp +++ b/src/actions/rs_actiondrawcircle.cpp @@ -106,12 +106,12 @@ void RS_ActionDrawCircle::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawCircle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawimage.cpp b/src/actions/rs_actiondrawimage.cpp index d68e5b5..2ba383d 100644 --- a/src/actions/rs_actiondrawimage.cpp +++ b/src/actions/rs_actiondrawimage.cpp @@ -125,13 +125,13 @@ void RS_ActionDrawImage::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawImage::mouseReleaseEvent(QMouseEvent * e) { -// if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) +// if (e->button() == Qt::LeftButton) if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } -// else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) +// else if (e->button() == Qt::RightButton) else if (e->button() == Qt::RightButton) { deleteSnapper(); diff --git a/src/actions/rs_actiondrawline.cpp b/src/actions/rs_actiondrawline.cpp index 89a8ea5..8a3d4f5 100644 --- a/src/actions/rs_actiondrawline.cpp +++ b/src/actions/rs_actiondrawline.cpp @@ -113,12 +113,12 @@ void RS_ActionDrawLine::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLine::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawlineangle.cpp b/src/actions/rs_actiondrawlineangle.cpp index 188d8c4..cf25401 100644 --- a/src/actions/rs_actiondrawlineangle.cpp +++ b/src/actions/rs_actiondrawlineangle.cpp @@ -98,7 +98,7 @@ void RS_ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { if (getStatus() == SetPos) { @@ -106,7 +106,7 @@ void RS_ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e) coordinateEvent(&ce); } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawlinebisector.cpp b/src/actions/rs_actiondrawlinebisector.cpp index c376095..e06ebf9 100644 --- a/src/actions/rs_actiondrawlinebisector.cpp +++ b/src/actions/rs_actiondrawlinebisector.cpp @@ -126,7 +126,7 @@ void RS_ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawlinepolygon.cpp b/src/actions/rs_actiondrawlinepolygon.cpp index c32d062..c9761a6 100644 --- a/src/actions/rs_actiondrawlinepolygon.cpp +++ b/src/actions/rs_actiondrawlinepolygon.cpp @@ -85,12 +85,12 @@ void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawlinepolygon2.cpp b/src/actions/rs_actiondrawlinepolygon2.cpp index feaa99f..8e26061 100644 --- a/src/actions/rs_actiondrawlinepolygon2.cpp +++ b/src/actions/rs_actiondrawlinepolygon2.cpp @@ -85,12 +85,12 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawlinerectangle.cpp b/src/actions/rs_actiondrawlinerectangle.cpp index 3dc5b2d..455eeeb 100644 --- a/src/actions/rs_actiondrawlinerectangle.cpp +++ b/src/actions/rs_actiondrawlinerectangle.cpp @@ -106,12 +106,12 @@ void RS_ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawlinerelangle.cpp b/src/actions/rs_actiondrawlinerelangle.cpp index 4e69092..1ecd4c0 100644 --- a/src/actions/rs_actiondrawlinerelangle.cpp +++ b/src/actions/rs_actiondrawlinerelangle.cpp @@ -142,7 +142,7 @@ void RS_ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -174,7 +174,7 @@ void RS_ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actiondrawlinetangent1.cpp b/src/actions/rs_actiondrawlinetangent1.cpp index a39f4df..d6f0770 100644 --- a/src/actions/rs_actiondrawlinetangent1.cpp +++ b/src/actions/rs_actiondrawlinetangent1.cpp @@ -118,7 +118,7 @@ void RS_ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawlinetangent2.cpp b/src/actions/rs_actiondrawlinetangent2.cpp index 98027d3..a284560 100644 --- a/src/actions/rs_actiondrawlinetangent2.cpp +++ b/src/actions/rs_actiondrawlinetangent2.cpp @@ -120,7 +120,7 @@ void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { deletePreview(); clearPreview(); diff --git a/src/actions/rs_actiondrawpoint.cpp b/src/actions/rs_actiondrawpoint.cpp index 8ec3a81..0a3d48d 100644 --- a/src/actions/rs_actiondrawpoint.cpp +++ b/src/actions/rs_actiondrawpoint.cpp @@ -56,12 +56,12 @@ void RS_ActionDrawPoint::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawPoint::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actiondrawspline.cpp b/src/actions/rs_actiondrawspline.cpp index ba4e681..faa11eb 100644 --- a/src/actions/rs_actiondrawspline.cpp +++ b/src/actions/rs_actiondrawspline.cpp @@ -104,12 +104,10 @@ void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e) tmpSpline->update(); preview->addEntity(tmpSpline); -// Q3ValueList cpts = tmpSpline->getControlPoints(); -// Q3ValueList::iterator it; QList cpts = tmpSpline->getControlPoints(); QList::iterator it; - for (it = cpts.begin(); it != cpts.end(); ++it) + for(it = cpts.begin(); it != cpts.end(); ++it) preview->addEntity(new RS_Point(preview, RS_PointData(*it))); drawPreview(); @@ -120,15 +118,16 @@ void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e) void RS_ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { if (getStatus() == SetNextPoint) trigger(); + deletePreview(); clearPreview(); deleteSnapper(); diff --git a/src/actions/rs_actioneditcopy.cpp b/src/actions/rs_actioneditcopy.cpp index bbb70d6..02f0e2c 100644 --- a/src/actions/rs_actioneditcopy.cpp +++ b/src/actions/rs_actioneditcopy.cpp @@ -59,12 +59,12 @@ void RS_ActionEditCopy::mouseMoveEvent(QMouseEvent * e) void RS_ActionEditCopy::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actioneditpaste.cpp b/src/actions/rs_actioneditpaste.cpp index f4b7aa9..e52a7d1 100644 --- a/src/actions/rs_actioneditpaste.cpp +++ b/src/actions/rs_actioneditpaste.cpp @@ -83,12 +83,12 @@ void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e) void RS_ActionEditPaste::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actioninfoangle.cpp b/src/actions/rs_actioninfoangle.cpp index c6fa7dd..3dc6cb8 100644 --- a/src/actions/rs_actioninfoangle.cpp +++ b/src/actions/rs_actioninfoangle.cpp @@ -82,7 +82,7 @@ void RS_ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/) void RS_ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y())); @@ -115,7 +115,7 @@ void RS_ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actioninfoarea.cpp b/src/actions/rs_actioninfoarea.cpp index 34e1646..ffb5063 100644 --- a/src/actions/rs_actioninfoarea.cpp +++ b/src/actions/rs_actioninfoarea.cpp @@ -125,12 +125,12 @@ void RS_ActionInfoArea::mouseMoveEvent(QMouseEvent * e) void RS_ActionInfoArea::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { //deletePreview(); //clearPreview(); diff --git a/src/actions/rs_actioninfodist.cpp b/src/actions/rs_actioninfodist.cpp index 2c3a6ad..a63ea03 100644 --- a/src/actions/rs_actioninfodist.cpp +++ b/src/actions/rs_actioninfodist.cpp @@ -86,12 +86,12 @@ void RS_ActionInfoDist::mouseMoveEvent(QMouseEvent * e) void RS_ActionInfoDist::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actioninfodist2.cpp b/src/actions/rs_actioninfodist2.cpp index f051c92..84859d8 100644 --- a/src/actions/rs_actioninfodist2.cpp +++ b/src/actions/rs_actioninfodist2.cpp @@ -71,7 +71,7 @@ void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e) void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -92,7 +92,7 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actioninfoinside.cpp b/src/actions/rs_actioninfoinside.cpp index 9417b4d..7012a93 100644 --- a/src/actions/rs_actioninfoinside.cpp +++ b/src/actions/rs_actioninfoinside.cpp @@ -57,7 +57,7 @@ void RS_ActionInfoInside::mouseMoveEvent(QMouseEvent * /*e*/) void RS_ActionInfoInside::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actionlibraryinsert.cpp b/src/actions/rs_actionlibraryinsert.cpp index 4fdab2f..2447d8f 100644 --- a/src/actions/rs_actionlibraryinsert.cpp +++ b/src/actions/rs_actionlibraryinsert.cpp @@ -124,12 +124,12 @@ void RS_ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e) void RS_ActionLibraryInsert::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actionmodifybevel.cpp b/src/actions/rs_actionmodifybevel.cpp index 34fce8d..652e447 100644 --- a/src/actions/rs_actionmodifybevel.cpp +++ b/src/actions/rs_actionmodifybevel.cpp @@ -95,7 +95,7 @@ void RS_ActionModifyBevel::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -116,7 +116,7 @@ void RS_ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifycut.cpp b/src/actions/rs_actionmodifycut.cpp index 54c7214..fb59aac 100644 --- a/src/actions/rs_actionmodifycut.cpp +++ b/src/actions/rs_actionmodifycut.cpp @@ -78,7 +78,7 @@ void RS_ActionModifyCut::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyCut::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -123,7 +123,7 @@ void RS_ActionModifyCut::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); diff --git a/src/actions/rs_actionmodifydeletefree.cpp b/src/actions/rs_actionmodifydeletefree.cpp index e7715ae..dabac67 100644 --- a/src/actions/rs_actionmodifydeletefree.cpp +++ b/src/actions/rs_actionmodifydeletefree.cpp @@ -97,7 +97,7 @@ void RS_ActionModifyDeleteFree::trigger() void RS_ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionmodifydeletequick.cpp b/src/actions/rs_actionmodifydeletequick.cpp index 89f001b..f8dc8af 100644 --- a/src/actions/rs_actionmodifydeletequick.cpp +++ b/src/actions/rs_actionmodifydeletequick.cpp @@ -63,7 +63,7 @@ void RS_ActionModifyDeleteQuick::trigger() void RS_ActionModifyDeleteQuick::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionmodifyentity.cpp b/src/actions/rs_actionmodifyentity.cpp index 0513046..63b2299 100644 --- a/src/actions/rs_actionmodifyentity.cpp +++ b/src/actions/rs_actionmodifyentity.cpp @@ -66,7 +66,7 @@ void RS_ActionModifyEntity::trigger() void RS_ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionmodifymirror.cpp b/src/actions/rs_actionmodifymirror.cpp index fab05b2..437de4b 100644 --- a/src/actions/rs_actionmodifymirror.cpp +++ b/src/actions/rs_actionmodifymirror.cpp @@ -86,12 +86,12 @@ void RS_ActionModifyMirror::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyMirror::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifymove.cpp b/src/actions/rs_actionmodifymove.cpp index c5f43c9..5421298 100644 --- a/src/actions/rs_actionmodifymove.cpp +++ b/src/actions/rs_actionmodifymove.cpp @@ -81,12 +81,12 @@ void RS_ActionModifyMove::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyMove::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifymoverotate.cpp b/src/actions/rs_actionmodifymoverotate.cpp index a241d79..2480d92 100644 --- a/src/actions/rs_actionmodifymoverotate.cpp +++ b/src/actions/rs_actionmodifymoverotate.cpp @@ -89,12 +89,12 @@ void RS_ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyMoveRotate::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifyrotate.cpp b/src/actions/rs_actionmodifyrotate.cpp index 77c102b..224a07e 100644 --- a/src/actions/rs_actionmodifyrotate.cpp +++ b/src/actions/rs_actionmodifyrotate.cpp @@ -65,12 +65,12 @@ void RS_ActionModifyRotate::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyRotate::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifyrotate2.cpp b/src/actions/rs_actionmodifyrotate2.cpp index b627045..4191234 100644 --- a/src/actions/rs_actionmodifyrotate2.cpp +++ b/src/actions/rs_actionmodifyrotate2.cpp @@ -83,12 +83,12 @@ void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifyround.cpp b/src/actions/rs_actionmodifyround.cpp index 67c0503..8b6eaf3 100644 --- a/src/actions/rs_actionmodifyround.cpp +++ b/src/actions/rs_actionmodifyround.cpp @@ -136,7 +136,7 @@ void RS_ActionModifyRound::mouseReleaseEvent(QMouseEvent * e) Vector mouse = graphicView->toGraph(e->x(), e->y()); RS_Entity * se = catchEntity(e, RS2::ResolveAll); - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -163,7 +163,7 @@ void RS_ActionModifyRound::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifyscale.cpp b/src/actions/rs_actionmodifyscale.cpp index 38e3a5b..5ab6499 100644 --- a/src/actions/rs_actionmodifyscale.cpp +++ b/src/actions/rs_actionmodifyscale.cpp @@ -65,7 +65,7 @@ void RS_ActionModifyScale::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyScale::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector mouse = snapPoint(e); @@ -86,7 +86,7 @@ void RS_ActionModifyScale::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifystretch.cpp b/src/actions/rs_actionmodifystretch.cpp index f71e107..7f391f8 100644 --- a/src/actions/rs_actionmodifystretch.cpp +++ b/src/actions/rs_actionmodifystretch.cpp @@ -130,12 +130,12 @@ void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifytrim.cpp b/src/actions/rs_actionmodifytrim.cpp index 611d012..a73ebfd 100644 --- a/src/actions/rs_actionmodifytrim.cpp +++ b/src/actions/rs_actionmodifytrim.cpp @@ -98,7 +98,7 @@ void RS_ActionModifyTrim::mouseMoveEvent(QMouseEvent * e) void RS_ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector mouse = graphicView->toGraph(e->x(), e->y()); RS_Entity * se = catchEntity(e); @@ -129,7 +129,7 @@ void RS_ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionmodifytrimamount.cpp b/src/actions/rs_actionmodifytrimamount.cpp index 65666c8..c28031e 100644 --- a/src/actions/rs_actionmodifytrimamount.cpp +++ b/src/actions/rs_actionmodifytrimamount.cpp @@ -65,7 +65,7 @@ void RS_ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e) trimCoord = graphicView->toGraph(e->x(), e->y()); trimEntity = catchEntity(e); - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -93,7 +93,7 @@ void RS_ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actionprintpreview.cpp b/src/actions/rs_actionprintpreview.cpp index e280e57..b9c6d1f 100644 --- a/src/actions/rs_actionprintpreview.cpp +++ b/src/actions/rs_actionprintpreview.cpp @@ -73,7 +73,7 @@ void RS_ActionPrintPreview::mouseMoveEvent(QMouseEvent * e) void RS_ActionPrintPreview::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -99,9 +99,7 @@ void RS_ActionPrintPreview::mouseReleaseEvent(QMouseEvent * e) default: //deleteSnapper(); RS_DIALOGFACTORY->requestPreviousMenu(); -#if QT_VERSION >= 0x030000 e->accept(); -#endif break; } } diff --git a/src/actions/rs_actionselect.cpp b/src/actions/rs_actionselect.cpp index 88d73b7..15afb6f 100644 --- a/src/actions/rs_actionselect.cpp +++ b/src/actions/rs_actionselect.cpp @@ -36,7 +36,7 @@ void RS_ActionSelect::init(int status) void RS_ActionSelect::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); } diff --git a/src/actions/rs_actionselectcontour.cpp b/src/actions/rs_actionselectcontour.cpp index 378a905..9f98a06 100644 --- a/src/actions/rs_actionselectcontour.cpp +++ b/src/actions/rs_actionselectcontour.cpp @@ -56,7 +56,7 @@ void RS_ActionSelectContour::trigger() void RS_ActionSelectContour::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionselectintersected.cpp b/src/actions/rs_actionselectintersected.cpp index dc158d5..7f73a75 100644 --- a/src/actions/rs_actionselectintersected.cpp +++ b/src/actions/rs_actionselectintersected.cpp @@ -83,7 +83,7 @@ void RS_ActionSelectIntersected::mouseMoveEvent(QMouseEvent * e) void RS_ActionSelectIntersected::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -105,14 +105,14 @@ void RS_ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e) { RS_DEBUG->print("RS_ActionSelectIntersected::mouseReleaseEvent()"); - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { if (getStatus() == SetPoint2) deletePreview(); deleteSnapper(); init(getStatus() - 1); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + else if (e->button() == Qt::LeftButton) if (getStatus() == SetPoint2) { v2 = snapPoint(e); diff --git a/src/actions/rs_actionselectlayer.cpp b/src/actions/rs_actionselectlayer.cpp index 933d012..72306ec 100644 --- a/src/actions/rs_actionselectlayer.cpp +++ b/src/actions/rs_actionselectlayer.cpp @@ -48,7 +48,7 @@ void RS_ActionSelectLayer::trigger() void RS_ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionselectsingle.cpp b/src/actions/rs_actionselectsingle.cpp index 507b11c..33792d3 100644 --- a/src/actions/rs_actionselectsingle.cpp +++ b/src/actions/rs_actionselectsingle.cpp @@ -53,7 +53,7 @@ void RS_ActionSelectSingle::keyPressEvent(QKeyEvent * e) void RS_ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); else { diff --git a/src/actions/rs_actionselectwindow.cpp b/src/actions/rs_actionselectwindow.cpp index f0da9bf..4441606 100644 --- a/src/actions/rs_actionselectwindow.cpp +++ b/src/actions/rs_actionselectwindow.cpp @@ -94,7 +94,7 @@ void RS_ActionSelectWindow::mouseMoveEvent(QMouseEvent * e) void RS_ActionSelectWindow::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -116,7 +116,7 @@ void RS_ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e) { RS_DEBUG->print("RS_ActionSelectWindow::mouseReleaseEvent()"); - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { if (getStatus() == SetCorner2) { @@ -124,7 +124,7 @@ void RS_ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e) trigger(); } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { if (getStatus() == SetCorner2) deletePreview(); diff --git a/src/actions/rs_actionsetrelativezero.cpp b/src/actions/rs_actionsetrelativezero.cpp index 14c6ff7..46d22a4 100644 --- a/src/actions/rs_actionsetrelativezero.cpp +++ b/src/actions/rs_actionsetrelativezero.cpp @@ -52,7 +52,7 @@ void RS_ActionSetRelativeZero::mouseMoveEvent(QMouseEvent * e) void RS_ActionSetRelativeZero::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { deleteSnapper(); init(getStatus() - 1); diff --git a/src/actions/rs_actionsnapintersectionmanual.cpp b/src/actions/rs_actionsnapintersectionmanual.cpp index 78330b5..319e7ed 100644 --- a/src/actions/rs_actionsnapintersectionmanual.cpp +++ b/src/actions/rs_actionsnapintersectionmanual.cpp @@ -122,7 +122,7 @@ void RS_ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e) void RS_ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { Vector mouse = graphicView->toGraph(e->x(), e->y()); RS_Entity * se = catchEntity(e); @@ -148,7 +148,7 @@ void RS_ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e) break; } } - else if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + else if (e->button() == Qt::RightButton) { deletePreview(); deleteSnapper(); diff --git a/src/actions/rs_actionzoompan.cpp b/src/actions/rs_actionzoompan.cpp index 0795666..7e788de 100644 --- a/src/actions/rs_actionzoompan.cpp +++ b/src/actions/rs_actionzoompan.cpp @@ -62,8 +62,8 @@ void RS_ActionZoomPan::mouseMoveEvent(QMouseEvent * e) void RS_ActionZoomPan::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::MidButton - || RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::MidButton + || e->button() == Qt::LeftButton) { //v1 = snapPoint(e); x1 = e->x(); @@ -74,9 +74,9 @@ void RS_ActionZoomPan::mousePressEvent(QMouseEvent * e) void RS_ActionZoomPan::mouseReleaseEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) init(getStatus() - 1); - else if (RS2::qtToRsButtonState(e->button()) == RS2::MidButton) + else if (e->button() == Qt::MidButton) init(-1); else setStatus(0); diff --git a/src/actions/rs_actionzoomwindow.cpp b/src/actions/rs_actionzoomwindow.cpp index 5ef6118..4f370eb 100644 --- a/src/actions/rs_actionzoomwindow.cpp +++ b/src/actions/rs_actionzoomwindow.cpp @@ -86,7 +86,7 @@ void RS_ActionZoomWindow::mouseMoveEvent(QMouseEvent * e) void RS_ActionZoomWindow::mousePressEvent(QMouseEvent * e) { - if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + if (e->button() == Qt::LeftButton) { switch (getStatus()) { @@ -107,14 +107,14 @@ void RS_ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e) { RS_DEBUG->print("RS_ActionZoomWindow::mouseReleaseEvent()"); - if (RS2::qtToRsButtonState(e->button()) == RS2::RightButton) + if (e->button() == Qt::RightButton) { if (getStatus() == 1) deletePreview(); init(getStatus() - 1); } - else if (RS2::qtToRsButtonState(e->button()) == RS2::LeftButton) + else if (e->button() == Qt::LeftButton) if (getStatus() == 1) { v2 = snapPoint(e); diff --git a/src/base/rs.h b/src/base/rs.h index a17cad6..9ba69d9 100644 --- a/src/base/rs.h +++ b/src/base/rs.h @@ -586,7 +586,8 @@ Qt::KeyButtonMask Qt::KeyboardModifierMask Keypad = Qt::KeypadModifier }; -#if 1 +//get rid of unnecessary shiaut like this: +#if 0 /** * Wrapper for Qt */ diff --git a/src/base/rs_graphicview.cpp b/src/base/rs_graphicview.cpp index 4dd3e13..73500e2 100644 --- a/src/base/rs_graphicview.cpp +++ b/src/base/rs_graphicview.cpp @@ -565,8 +565,7 @@ void RS_GraphicView::mouseReleaseEvent(QMouseEvent * e) if (eventHandler != NULL) { - if (RS2::qtToRsButtonState(e->button()) != RS2::RightButton - || eventHandler->hasAction()) + if (e->button() != Qt::RightButton || eventHandler->hasAction()) { eventHandler->mouseReleaseEvent(e); //e->accept(); @@ -574,10 +573,7 @@ void RS_GraphicView::mouseReleaseEvent(QMouseEvent * e) else { back(); -//#if QT_VERSION>=0x030000 e->accept(); -//#endif - } }