-// Copyright (C) 2007-2016 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
#include <QTimer>
#include <V3d_View.hxx>
-#include <Quantity_Ratio.hxx>
#include "utilities.h"
*/
OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_Viewer)& viewer, V3d_TypeOfView type )
: OCCViewer_ViewPort( parent ),
- myScale( 1.0 ),
myBusy( true ),
+ myScale( 1.0 ),
myIsAdvancedZoomingEnabled( false )
{
// VSR: 01/07/2010 commented to avoid SIGSEGV at SALOME exit
// set texture image: file name and fill mode
switch ( textureMode ) {
case Qtx::CenterTexture:
- activeView()->SetBackgroundImage( fi.absoluteFilePath().toLatin1().constData(), Aspect_FM_CENTERED );
+ activeView()->SetBackgroundImage( fi.absoluteFilePath().toUtf8().constData(), Aspect_FM_CENTERED );
break;
case Qtx::TileTexture:
- activeView()->SetBackgroundImage( fi.absoluteFilePath().toLatin1().constData(), Aspect_FM_TILED );
+ activeView()->SetBackgroundImage( fi.absoluteFilePath().toUtf8().constData(), Aspect_FM_TILED );
break;
case Qtx::StretchTexture:
- activeView()->SetBackgroundImage( fi.absoluteFilePath().toLatin1().constData(), Aspect_FM_STRETCH );
+ activeView()->SetBackgroundImage( fi.absoluteFilePath().toUtf8().constData(), Aspect_FM_STRETCH );
break;
default:
break;
theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
Standard_True );
- Quantity_Ratio zRotationThreshold;
+ Standard_Real zRotationThreshold;
zRotation = Standard_False;
zRotationThreshold = 0.45;
if( zRotationThreshold > 0. ) {
mapView( activeView() );
#endif
if ( !myWindow.IsNull() ) {
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- QApplication::syncX();
-#endif
if ( !myPaintersRedrawing ) {
activeView()->Redraw();
}
*/
void OCCViewer_ViewPort3d::resizeEvent( QResizeEvent* e )
{
-#if defined WIN32 || QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- /* Win32 : map before first show to avoid flicker */
+ /* Map before first show to avoid flicker */
if ( !mapped( activeView() ) )
mapView( activeView() );
-#endif
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- QApplication::syncX();
-#endif
QTimer::singleShot( 0, this, SLOT( repaintViewAfterMove() ) );
+ emit vpResizeEvent( e );
}
/*!
/*!
Fits all objects in view. [ virtual protected ]
*/
-void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd )
+void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool /*withZ*/, bool upd )
{
if ( activeView().IsNull() )
return;