]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_RubberBand.cpp
Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / XGUI / XGUI_RubberBand.cpp
index 66140015ba1aacc0350ed886fe25653b5128592c..f6cf5857bf9b7d88aca08791ea7e0b7d3fd28469 100644 (file)
  */\r
 \r
 XGUI_AbstractRubberBand::XGUI_AbstractRubberBand(QWidget* theParent)\r
-    : QWidget(theParent), myPoints(), myIsClosed(false)\r
+    : QWidget(theParent),\r
+      myPoints(),\r
+      myIsClosed(false)\r
 {\r
   setAttribute(Qt::WA_TransparentForMouseEvents);\r
 #ifndef WIN32\r
   setAttribute(Qt::WA_NoSystemBackground);\r
-#endif //WIN32\r  setAttribute(Qt::WA_WState_ExplicitShowHide);\r  setVisible(false);\r  theParent->installEventFilter(this);\r
-  setGeometry(QRect(QPoint(0, 0), theParent->size()));\r
+#endif //WIN32\r  setAttribute(Qt::WA_WState_ExplicitShowHide);\r  setVisible(false);\r  theParent->installEventFilter(this);\r  setGeometry(QRect(QPoint(0, 0), theParent->size()));\r
 }\r
 \r
 /*!\r
@@ -100,7 +101,7 @@ QRegion createRegion(const QPointF& p1, const QPointF& p2)
   if (p1 == p2)\r
     return QRegion();\r
 \r
-  QLineF n = QLineF(p1, p2).normalVector(); //.unitVector();\r
+  QLineF n = QLineF(p1, p2).normalVector();  //.unitVector();\r
   n.setLength(1);\r
   n.translate(p1 * -1);\r
   QPointF nPoint = n.p2();\r
@@ -116,7 +117,7 @@ void XGUI_AbstractRubberBand::updateMask()
   QRegion r;\r
 \r
   QVectorIterator<QPoint> it(myPoints);\r
-  while(it.hasNext()) {\r
+  while (it.hasNext()) {\r
     QPoint p = it.next();\r
     if (!it.hasNext())\r
       break;\r
@@ -151,7 +152,7 @@ void XGUI_RectRubberBand::initGeometry(const QRect& theRect)
 {\r
   myPoints.clear();\r
   myPoints << theRect.topLeft() << theRect.topRight() << theRect.bottomRight()\r
-      << theRect.bottomLeft();\r
+           << theRect.bottomLeft();\r
   //setMask( QRegion( myPoints ) );\r
   updateMask();\r
 }\r
@@ -175,7 +176,7 @@ void XGUI_RectRubberBand::setEndPoint(const QPoint& thePoint)
 void XGUI_RectRubberBand::clearGeometry()\r
 {\r
   QMutableVectorIterator<QPoint> i(myPoints);\r
-  while(i.hasNext()) {\r
+  while (i.hasNext()) {\r
     i.next();\r
     i.setValue(QPoint(-1, -1));\r
   }\r