mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +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;
|
return myCasCadeBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void MDIWindow::createRaytraceActions()
|
|||||||
aToolBar->toggleViewAction()->setVisible (true);
|
aToolBar->toggleViewAction()->setVisible (true);
|
||||||
aList->at (View::ToolRaytracingId)->setChecked (false);
|
aList->at (View::ToolRaytracingId)->setChecked (false);
|
||||||
aList->at (View::ToolShadowsId)->setChecked (true);
|
aList->at (View::ToolShadowsId)->setChecked (true);
|
||||||
aList->at (View::ToolReflectionsId)->setChecked (true);
|
aList->at (View::ToolReflectionsId)->setChecked (false);
|
||||||
aList->at (View::ToolAntialiasingId)->setChecked (false);
|
aList->at (View::ToolAntialiasingId)->setChecked (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
|||||||
: QWidget( parent ),
|
: QWidget( parent ),
|
||||||
myIsRaytracing( false ),
|
myIsRaytracing( false ),
|
||||||
myIsShadowsEnabled (true),
|
myIsShadowsEnabled (true),
|
||||||
myIsReflectionsEnabled (true),
|
myIsReflectionsEnabled (false),
|
||||||
myIsAntialiasingEnabled (false),
|
myIsAntialiasingEnabled (false),
|
||||||
myViewActions( 0 ),
|
myViewActions( 0 ),
|
||||||
myRaytraceActions( 0 ),
|
myRaytraceActions( 0 ),
|
||||||
@ -69,12 +69,10 @@ myBackMenu( NULL )
|
|||||||
//XSynchronize( x11Display(),true ); // it is possible to use QApplication::syncX();
|
//XSynchronize( x11Display(),true ); // it is possible to use QApplication::syncX();
|
||||||
XSynchronize( x11Info().display(),true ); // it is possible to use QApplication::syncX();
|
XSynchronize( x11Info().display(),true ); // it is possible to use QApplication::syncX();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
myFirst = true;
|
myFirst = true;
|
||||||
myContext = theContext;
|
myContext = theContext;
|
||||||
|
|
||||||
//if (theRT)
|
|
||||||
// myContext->SetDisplayMode( AIS_DisplayMode::AIS_Shaded, 1 );
|
|
||||||
|
|
||||||
myXmin = 0;
|
myXmin = 0;
|
||||||
myYmin = 0;
|
myYmin = 0;
|
||||||
myXmax = 0;
|
myXmax = 0;
|
||||||
@ -155,6 +153,7 @@ myBackMenu( NULL )
|
|||||||
XFlush( x11Info().display() );
|
XFlush( x11Info().display() );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
myCurrentMode = CurAction3d_Nothing;
|
||||||
myHlrModeIsOn = Standard_False;
|
myHlrModeIsOn = Standard_False;
|
||||||
setMouseTracking( true );
|
setMouseTracking( true );
|
||||||
@ -206,7 +205,7 @@ void View::init()
|
|||||||
myView->MustBeResized();
|
myView->MustBeResized();
|
||||||
|
|
||||||
if (myIsRaytracing)
|
if (myIsRaytracing)
|
||||||
myView->SetRaytracingMode();
|
myView->ChangeRenderingParams().Method = Graphic3d_RM_RAYTRACING;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::paintEvent( QPaintEvent * )
|
void View::paintEvent( QPaintEvent * )
|
||||||
@ -324,10 +323,7 @@ void View::hlrOn()
|
|||||||
|
|
||||||
void View::SetRaytracedShadows (bool theState)
|
void View::SetRaytracedShadows (bool theState)
|
||||||
{
|
{
|
||||||
if (theState)
|
myView->ChangeRenderingParams().IsShadowEnabled = theState;
|
||||||
myView->EnableRaytracedShadows();
|
|
||||||
else
|
|
||||||
myView->DisableRaytracedShadows();
|
|
||||||
|
|
||||||
myIsShadowsEnabled = theState;
|
myIsShadowsEnabled = theState;
|
||||||
|
|
||||||
@ -336,10 +332,7 @@ void View::SetRaytracedShadows (bool theState)
|
|||||||
|
|
||||||
void View::SetRaytracedReflections (bool theState)
|
void View::SetRaytracedReflections (bool theState)
|
||||||
{
|
{
|
||||||
if (theState)
|
myView->ChangeRenderingParams().IsReflectionEnabled = theState;
|
||||||
myView->EnableRaytracedReflections();
|
|
||||||
else
|
|
||||||
myView->DisableRaytracedReflections();
|
|
||||||
|
|
||||||
myIsReflectionsEnabled = theState;
|
myIsReflectionsEnabled = theState;
|
||||||
|
|
||||||
@ -383,10 +376,7 @@ void View::onRaytraceAction()
|
|||||||
|
|
||||||
void View::SetRaytracedAntialiasing (bool theState)
|
void View::SetRaytracedAntialiasing (bool theState)
|
||||||
{
|
{
|
||||||
if (theState)
|
myView->ChangeRenderingParams().IsAntialiasingEnabled = theState;
|
||||||
myView->EnableRaytracedAntialiasing();
|
|
||||||
else
|
|
||||||
myView->DisableRaytracedAntialiasing();
|
|
||||||
|
|
||||||
myIsAntialiasingEnabled = theState;
|
myIsAntialiasingEnabled = theState;
|
||||||
|
|
||||||
@ -396,7 +386,7 @@ void View::SetRaytracedAntialiasing (bool theState)
|
|||||||
void View::EnableRaytracing()
|
void View::EnableRaytracing()
|
||||||
{
|
{
|
||||||
if (!myIsRaytracing)
|
if (!myIsRaytracing)
|
||||||
myView->SetRaytracingMode();
|
myView->ChangeRenderingParams().Method = Graphic3d_RM_RAYTRACING;
|
||||||
|
|
||||||
myIsRaytracing = true;
|
myIsRaytracing = true;
|
||||||
|
|
||||||
@ -406,7 +396,7 @@ void View::EnableRaytracing()
|
|||||||
void View::DisableRaytracing()
|
void View::DisableRaytracing()
|
||||||
{
|
{
|
||||||
if (myIsRaytracing)
|
if (myIsRaytracing)
|
||||||
myView->SetRasterizationMode();
|
myView->ChangeRenderingParams().Method = Graphic3d_RM_RASTERIZATION;
|
||||||
|
|
||||||
myIsRaytracing = false;
|
myIsRaytracing = false;
|
||||||
|
|
||||||
@ -423,6 +413,7 @@ void View::updateToggled( bool isOn )
|
|||||||
for ( int i = ViewFitAllId; i < ViewHlrOffId; i++ )
|
for ( int i = ViewFitAllId; i < ViewHlrOffId; i++ )
|
||||||
{
|
{
|
||||||
QAction* anAction = myViewActions->at( i );
|
QAction* anAction = myViewActions->at( i );
|
||||||
|
|
||||||
if ( ( anAction == myViewActions->at( ViewFitAreaId ) ) ||
|
if ( ( anAction == myViewActions->at( ViewFitAreaId ) ) ||
|
||||||
( anAction == myViewActions->at( ViewZoomId ) ) ||
|
( anAction == myViewActions->at( ViewZoomId ) ) ||
|
||||||
( anAction == myViewActions->at( ViewPanId ) ) ||
|
( anAction == myViewActions->at( ViewPanId ) ) ||
|
||||||
@ -647,7 +638,7 @@ void View::initRaytraceActions()
|
|||||||
a->setToolTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
a->setToolTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
||||||
a->setStatusTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
a->setStatusTip( QObject::tr("TBR_TOOL_REFLECTIONS") );
|
||||||
a->setCheckable( true );
|
a->setCheckable( true );
|
||||||
a->setChecked( true );
|
a->setChecked( false );
|
||||||
connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) );
|
connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) );
|
||||||
myRaytraceActions->insert( ToolReflectionsId, a );
|
myRaytraceActions->insert( ToolReflectionsId, a );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user