-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
}
aBuffer+="closepath\nstroke\n";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
return true;
}
}
aBuffer+="PU;\n";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
}
return true;
if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) ||
( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) )
{
- isFound = FALSE;
+ isFound = false;
count++;
for ( it = myCurSelNumbers.begin(); it != myCurSelNumbers.end(); ++it )
if( i == *it )
{
- isFound = TRUE;
+ isFound = true;
curHNumbers.append( i );
}
\param isCircle - true if sensitive area of detection is round
\param isShift - true if selection exec with append option
*/
-GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
+GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
GLboolean isCircle, GLboolean isShift )
{
if( !myIsVisible )
count++;
if ( isShift )
{
- bool isFound = FALSE;
+ bool isFound = false;
for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
if ( *it == i )
{
myUSelNumbers.append( *it );
remIt = it;
- isFound = TRUE;
+ isFound = true;
break;
}
bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
{
if( index < 0 || index > myNumber )
- return FALSE;
+ return false;
int n = mySelNumbers.indexOf( index );
if( n == -1 )
mySelNumbers.removeAt(n);
myUSelNumbers.append( index );
}
- return TRUE;
+ return true;
}
/*!
\param size - size of polyline
\param toolTip - tool tip of polyline
*/
-GLViewer_Polyline::GLViewer_Polyline( int number, float size, const QString& toolTip ):
+GLViewer_Polyline::GLViewer_Polyline( int number, float /*size*/, const QString& toolTip ):
GLViewer_Object(),
- myNumber( 0 ),
myXCoord( 0 ),
- myYCoord( 0 )
+ myYCoord( 0 ),
+ myNumber( 0 )
{
myHighFlag = GL_TRUE;
aBuffer+="closepath\nstroke\n";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
return true;
}
aBuffer+="PU;\n";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
return true;
}
\param isCircle - true if sensitive area of detection is round
\return true if highlight status is changed
*/
-GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle )
+GLboolean GLViewer_Polyline::highlight( GLfloat x, GLfloat y, GLfloat /*tol*/, GLboolean /*isCircle*/ )
{
if( !myIsVisible )
return false;
\param isCircle - true if sensitive area of detection is round
\param isShift - true if selection exec with append option
*/
-GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull,
- GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat /*tol*/, GLViewer_Rect /*rect*/, GLboolean /*isFull*/,
+ GLboolean /*isCircle*/, GLboolean /*isShift*/ )
{
if( !myIsVisible )
return false;
GLfloat xa, xb, ya, yb, l;
GLfloat rsin, rcos, r, ra, rb;
// GLboolean update;
- GLboolean selected = myIsSel;
+ // GLboolean selected = myIsSel;
myIsSel = GL_FALSE;
AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, double(xPos), double(yPos) );
aBuffer += "(" + aText + ") show\n";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
return true;
}
aBuffer = "LB" + aText + "#;";
- hFile.write( aBuffer.toAscii() );
+ hFile.write( aBuffer.toLatin1() );
return true;
}
y = double( yPos );
aViewerCS->transform( *aEMFCS, x, y );
- const char* str = aText.toAscii();
int nHeight = 35*14; // height of font
int nWidth = 35*12; // average character width
int nEscapement = 0; // angle of escapement
int nOrientation = 0; // base-line orientation angle
int fnWeight = FW_NORMAL; // font weight
- DWORD fdwItalic = FALSE; // italic attribute option
- DWORD fdwUnderline = FALSE; // underline attribute option
- DWORD fdwStrikeOut = FALSE; // strikeout attribute option
+ DWORD fdwItalic = false; // italic attribute option
+ DWORD fdwUnderline = false; // underline attribute option
+ DWORD fdwStrikeOut = false; // strikeout attribute option
DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS; // output precision
DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS; // clipping precision
HGDIOBJ old1 = SelectObject( dc, aFont );
HGDIOBJ old2 = SelectObject( dc, aBrush );
-
+#ifdef UNICODE
+ LPTSTR str = new TCHAR[aText.length() + 1];
+ str[aText.toWCharArray(str)] = '\0';
+#else
+ QByteArray arr = FileName.toLatin1();
+ LPTSTR str = arr.constData();
+#endif
TextOut( dc, x, y, str, aText.length() );
+#ifdef UNICODE
+ delete str;
+#endif
SelectObject ( dc, old1 );
SelectObject ( dc, old2 );
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
- intersection = obj.intersect( circle );
+ intersection = obj.intersected( circle );
else
- intersection = obj.intersect( region );
+ intersection = obj.intersected( region );
if( intersection.isEmpty() )
myIsHigh = false;
\param isCircle - true if sensitive area of detection is round
\param isShift - true if selection exec with append option
*/
-GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect rect,
- GLboolean isFull, GLboolean isCircle, GLboolean isShift )
+GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTol, GLViewer_Rect /*rect*/,
+ GLboolean /*isFull*/, GLboolean isCircle, GLboolean /*isShift*/ )
{
if( !myIsVisible )
return false;
QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
(int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
if( isCircle )
- intersection = obj.intersect( circle );
+ intersection = obj.intersected( circle );
else
- intersection = obj.intersect( region );
+ intersection = obj.intersected( region );
if( intersection.isEmpty() )
myIsSel = false;