- QPainter paint( this );
- paint.setBrush (Qt::SolidPattern );
-
- //Draw points
- const int aRadius = 3; // radius of a point
-
- for (int i = 0; i < myKeys.size() && i < myPoints.size(); i++)
- {
- SMESH::PointStruct aPoint = myPoints[ myKeys[i] ];
- QPoint aQPnt = MapCoords( aPoint.x, aPoint.y);
-
- paint.drawPie( aQPnt.x() - aRadius, aQPnt.y() - aRadius, aRadius*2, aRadius*2, 5760, 5760 );
- paint.drawText( aQPnt.x() + Shift, aQPnt.y() - Shift, QString::number( i+1 ) );
- }
-
- //Draw lines
- for (int i = 0; i < myConnections.size(); i++)
- {
- QValueVector<int> aCVector = myConnections[i];
-
- if ( aCVector.size() == 0 )
- continue;
-
- SMESH::PointStruct aPoint = myPoints[ aCVector[0] ];
- const QPoint aBeginPnt = MapCoords( aPoint.x, aPoint.y);
- QPoint aFirstPnt = aBeginPnt, aSecondPnt;
-
- for (int j = 1; j < aCVector.size(); j++)
- {
- aPoint = myPoints[ aCVector[j] ];
- aSecondPnt = MapCoords( aPoint.x, aPoint.y);
- paint.drawLine(aFirstPnt, aSecondPnt);
- aFirstPnt = aSecondPnt;
- }
-
- paint.drawLine(aBeginPnt, aSecondPnt);
+ QPainter painter( this );
+ painter.setBrush( Qt::SolidPattern );
+
+ // Draw points
+ for ( int i = 0; i < myKeys.size() && i < myPoints.size(); i++ ) {
+ SMESH::PointStruct aPoint = myPoints[ myKeys[i] ];
+ QPoint aQPnt = mapCoords( aPoint.x, aPoint.y );
+
+ painter.drawPie( aQPnt.x() - Radius, aQPnt.y() - Radius,
+ Radius * 2, Radius * 2, 0, 360 * 16 );
+ painter.drawText( aQPnt.x() + Shift, aQPnt.y() - Shift,
+ QString::number( i+1 ) );
+ }
+
+ // Draw lines
+ for ( int i = 0; i < myConnections.size(); i++ ) {
+ QVector<int> aCVector = myConnections[i];
+
+ if ( aCVector.isEmpty() )
+ continue;
+
+ SMESH::PointStruct aPoint = myPoints[ aCVector[0] ];
+ const QPoint aBeginPnt = mapCoords( aPoint.x, aPoint.y );
+ QPoint aFirstPnt = aBeginPnt, aSecondPnt;
+
+ for ( int j = 1; j < aCVector.size(); j++ ) {
+ aPoint = myPoints[ aCVector[j] ];
+ aSecondPnt = mapCoords( aPoint.x, aPoint.y );
+ painter.drawLine( aFirstPnt, aSecondPnt );
+ aFirstPnt = aSecondPnt;