mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0024951: Qt samples - fix compilation after changes in Raytracing API
Compilation errors in qt samples were fixed.
This commit is contained in:
parent
16c7b64236
commit
2ad228f691
@ -609,5 +609,3 @@ QToolBar* ApplicationCommonWindow::getCasCadeBar()
|
||||
{
|
||||
return myCasCadeBar;
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,7 +94,7 @@ void MDIWindow::createRaytraceActions()
|
||||
aToolBar->toggleViewAction()->setVisible (true);
|
||||
aList->at (View::ToolRaytracingId)->setChecked (false);
|
||||
aList->at (View::ToolShadowsId)->setChecked (true);
|
||||
aList->at (View::ToolReflectionsId)->setChecked (true);
|
||||
aList->at (View::ToolReflectionsId)->setChecked (false);
|
||||
aList->at (View::ToolAntialiasingId)->setChecked (false);
|
||||
}
|
||||
|
||||
|
@ -57,24 +57,22 @@ static QCursor* rotCursor = NULL;
|
||||
|
||||
View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
||||
: QWidget( parent ),
|
||||
myIsRaytracing( false ),
|
||||
myIsShadowsEnabled (true),
|
||||
myIsReflectionsEnabled (true),
|
||||
myIsAntialiasingEnabled (false),
|
||||
myViewActions( 0 ),
|
||||
myRaytraceActions( 0 ),
|
||||
myBackMenu( NULL )
|
||||
myIsRaytracing( false ),
|
||||
myIsShadowsEnabled (true),
|
||||
myIsReflectionsEnabled (false),
|
||||
myIsAntialiasingEnabled (false),
|
||||
myViewActions( 0 ),
|
||||
myRaytraceActions( 0 ),
|
||||
myBackMenu( NULL )
|
||||
{
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
//XSynchronize( x11Display(),true ); // it is possible to use QApplication::syncX();
|
||||
XSynchronize( x11Info().display(),true ); // it is possible to use QApplication::syncX();
|
||||
#endif
|
||||
|
||||
myFirst = true;
|
||||
myContext = theContext;
|
||||
|
||||
//if (theRT)
|
||||
// myContext->SetDisplayMode( AIS_DisplayMode::AIS_Shaded, 1 );
|
||||
|
||||
myXmin = 0;
|
||||
myYmin = 0;
|
||||
myXmax = 0;
|
||||
@ -155,6 +153,7 @@ myBackMenu( NULL )
|
||||
XFlush( x11Info().display() );
|
||||
}
|
||||
#endif
|
||||
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
myHlrModeIsOn = Standard_False;
|
||||
setMouseTracking( true );
|
||||
@ -206,7 +205,7 @@ void View::init()
|
||||
myView->MustBeResized();
|
||||
|
||||
if (myIsRaytracing)
|
||||
myView->SetRaytracingMode();
|
||||
myView->ChangeRenderingParams().Method = Graphic3d_RM_RAYTRACING;
|
||||
}
|
||||
|
||||
void View::paintEvent( QPaintEvent * )
|
||||
@ -324,10 +323,7 @@ void View::hlrOn()
|
||||
|
||||
void View::SetRaytracedShadows (bool theState)
|
||||
{
|
||||
if (theState)
|
||||
myView->EnableRaytracedShadows();
|
||||
else
|
||||
myView->DisableRaytracedShadows();
|
||||
myView->ChangeRenderingParams().IsShadowEnabled = theState;
|
||||
|
||||
myIsShadowsEnabled = theState;
|
||||
|
||||
@ -336,10 +332,7 @@ void View::SetRaytracedShadows (bool theState)
|
||||
|
||||
void View::SetRaytracedReflections (bool theState)
|
||||
{
|
||||
if (theState)
|
||||
myView->EnableRaytracedReflections();
|
||||
else
|
||||
myView->DisableRaytracedReflections();
|
||||
myView->ChangeRenderingParams().IsReflectionEnabled = theState;
|
||||
|
||||
myIsReflectionsEnabled = theState;
|
||||
|
||||
@ -383,10 +376,7 @@ void View::onRaytraceAction()
|
||||
|
||||
void View::SetRaytracedAntialiasing (bool theState)
|
||||
{
|
||||
if (theState)
|
||||
myView->EnableRaytracedAntialiasing();
|
||||
else
|
||||
myView->DisableRaytracedAntialiasing();
|
||||
myView->ChangeRenderingParams().IsAntialiasingEnabled = theState;
|
||||
|
||||
myIsAntialiasingEnabled = theState;
|
||||
|
||||
@ -396,7 +386,7 @@ void View::SetRaytracedAntialiasing (bool theState)
|
||||
void View::EnableRaytracing()
|
||||
{
|
||||
if (!myIsRaytracing)
|
||||
myView->SetRaytracingMode();
|
||||
myView->ChangeRenderingParams().Method = Graphic3d_RM_RAYTRACING;
|
||||
|
||||
myIsRaytracing = true;
|
||||
|
||||
@ -406,7 +396,7 @@ void View::EnableRaytracing()
|
||||
void View::DisableRaytracing()
|
||||
{
|
||||
if (myIsRaytracing)
|
||||
myView->SetRasterizationMode();
|
||||
myView->ChangeRenderingParams().Method = Graphic3d_RM_RASTERIZATION;
|
||||
|
||||
myIsRaytracing = false;
|
||||
|
||||
@ -423,6 +413,7 @@ void View::updateToggled( bool isOn )
|
||||
for ( int i = ViewFitAllId; i < ViewHlrOffId; i++ )
|
||||
{
|
||||
QAction* anAction = myViewActions->at( i );
|
||||
|
||||
if ( ( anAction == myViewActions->at( ViewFitAreaId ) ) ||
|
||||
( anAction == myViewActions->at( ViewZoomId ) ) ||
|
||||
( anAction == myViewActions->at( ViewPanId ) ) ||
|
||||
@ -647,7 +638,7 @@ void View::initRaytraceActions()
|
||||
a->setToolTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
||||
a->setStatusTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
||||
a->setCheckable( true );
|
||||
a->setChecked( true );
|
||||
a->setChecked( false );
|
||||
connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) );
|
||||
myRaytraceActions->insert( ToolReflectionsId, a );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user