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
@ -42,7 +42,7 @@ myStdToolBar( 0 )
|
|||||||
stWs = new QMdiArea( vb );
|
stWs = new QMdiArea( vb );
|
||||||
layout->addWidget( stWs );
|
layout->addWidget( stWs );
|
||||||
setCentralWidget( vb );
|
setCentralWidget( vb );
|
||||||
|
|
||||||
createStandardOperations();
|
createStandardOperations();
|
||||||
createCasCadeOperations();
|
createCasCadeOperations();
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ void ApplicationCommonWindow::createStandardOperations()
|
|||||||
// create preferences menu
|
// create preferences menu
|
||||||
QMenu* aPrefMenu = new QMenu( QObject::tr("MNU_PREFERENCES") );
|
QMenu* aPrefMenu = new QMenu( QObject::tr("MNU_PREFERENCES") );
|
||||||
aPrefMenu->addAction( filePrefUseVBOAction );
|
aPrefMenu->addAction( filePrefUseVBOAction );
|
||||||
|
|
||||||
// populate a menu with all actions
|
// populate a menu with all actions
|
||||||
myFilePopup = new QMenu( this );
|
myFilePopup = new QMenu( this );
|
||||||
myFilePopup = menuBar()->addMenu( QObject::tr("MNU_FILE") );
|
myFilePopup = menuBar()->addMenu( QObject::tr("MNU_FILE") );
|
||||||
@ -132,25 +132,25 @@ void ApplicationCommonWindow::createStandardOperations()
|
|||||||
myFilePopup->addMenu( aPrefMenu );
|
myFilePopup->addMenu( aPrefMenu );
|
||||||
myFileSeparator = myFilePopup->addSeparator();
|
myFileSeparator = myFilePopup->addSeparator();
|
||||||
myFilePopup->addAction( fileQuitAction );
|
myFilePopup->addAction( fileQuitAction );
|
||||||
|
|
||||||
// add a view menu
|
// add a view menu
|
||||||
QMenu * view = new QMenu( this );
|
QMenu * view = new QMenu( this );
|
||||||
|
|
||||||
view = menuBar()->addMenu( QObject::tr("MNU_VIEW") );
|
view = menuBar()->addMenu( QObject::tr("MNU_VIEW") );
|
||||||
view->addAction( viewToolAction );
|
view->addAction( viewToolAction );
|
||||||
view->addAction( viewStatusAction );
|
view->addAction( viewStatusAction );
|
||||||
|
|
||||||
// add a help menu
|
// add a help menu
|
||||||
QMenu * help = new QMenu( this );
|
QMenu * help = new QMenu( this );
|
||||||
menuBar()->addSeparator();
|
menuBar()->addSeparator();
|
||||||
help = menuBar()->addMenu( QObject::tr("MNU_HELP") );
|
help = menuBar()->addMenu( QObject::tr("MNU_HELP") );
|
||||||
help->addAction( helpAboutAction );
|
help->addAction( helpAboutAction );
|
||||||
|
|
||||||
// populate a tool bar with some actions
|
// populate a tool bar with some actions
|
||||||
myStdToolBar = addToolBar( tr( "File Operations" ) );
|
myStdToolBar = addToolBar( tr( "File Operations" ) );
|
||||||
myStdToolBar->addAction( fileNewAction );
|
myStdToolBar->addAction( fileNewAction );
|
||||||
myStdToolBar->addAction( helpAboutAction );
|
myStdToolBar->addAction( helpAboutAction );
|
||||||
|
|
||||||
myStdActions.at(FileCloseId)->setEnabled(myDocuments.count() > 0);
|
myStdActions.at(FileCloseId)->setEnabled(myDocuments.count() > 0);
|
||||||
|
|
||||||
myStdActions.at(FilePrefUseVBOId)->setEnabled( true );
|
myStdActions.at(FilePrefUseVBOId)->setEnabled( true );
|
||||||
@ -281,8 +281,8 @@ void ApplicationCommonWindow::createWindowPopup()
|
|||||||
if ( !myWindowPopup )
|
if ( !myWindowPopup )
|
||||||
{
|
{
|
||||||
myWindowPopup = new QMenu( QObject::tr( "MNU_WINDOW" ), this );
|
myWindowPopup = new QMenu( QObject::tr( "MNU_WINDOW" ), this );
|
||||||
connect( myWindowPopup, SIGNAL( aboutToShow() ),
|
connect( myWindowPopup, SIGNAL( aboutToShow() ),
|
||||||
this, SLOT( windowsMenuAboutToShow() ) );
|
this, SLOT( windowsMenuAboutToShow() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ void ApplicationCommonWindow::windowsMenuAboutToShow()
|
|||||||
QList<QMdiSubWindow *> windows = stWs->subWindowList();
|
QList<QMdiSubWindow *> windows = stWs->subWindowList();
|
||||||
for (int i = 0; i < windows.count(); ++i)
|
for (int i = 0; i < windows.count(); ++i)
|
||||||
{
|
{
|
||||||
QAction* aAction = new QAction( windows.at(i)->windowTitle(), this );
|
QAction* aAction = new QAction( windows.at(i)->windowTitle(), this );
|
||||||
aAction->setCheckable( true );
|
aAction->setCheckable( true );
|
||||||
aAction->setData( i );
|
aAction->setData( i );
|
||||||
myWindowPopup->addAction( aAction );
|
myWindowPopup->addAction( aAction );
|
||||||
@ -328,7 +328,7 @@ void ApplicationCommonWindow::windowsMenuActivated( bool checked )
|
|||||||
{
|
{
|
||||||
QAction* aSender = qobject_cast<QAction*>( sender() );
|
QAction* aSender = qobject_cast<QAction*>( sender() );
|
||||||
if ( !aSender )
|
if ( !aSender )
|
||||||
return;
|
return;
|
||||||
QWidget * w = stWs->subWindowList().at( aSender->data().toInt() );
|
QWidget * w = stWs->subWindowList().at( aSender->data().toInt() );
|
||||||
if ( w && checked )
|
if ( w && checked )
|
||||||
w->setFocus();
|
w->setFocus();
|
||||||
@ -351,29 +351,29 @@ void ApplicationCommonWindow::updateFileActions()
|
|||||||
if ( !myIsDocuments )
|
if ( !myIsDocuments )
|
||||||
{
|
{
|
||||||
QAction *fileQuitAction, *windowAction;
|
QAction *fileQuitAction, *windowAction;
|
||||||
QList<QAction *> aListActions = myFilePopup->actions();
|
QList<QAction *> aListActions = myFilePopup->actions();
|
||||||
for ( int i = 0; i < aListActions.size(); i++ )
|
for ( int i = 0; i < aListActions.size(); i++ )
|
||||||
{
|
{
|
||||||
if( aListActions.at( i )->text() == QObject::tr("MNU_QUIT") )
|
if( aListActions.at( i )->text() == QObject::tr("MNU_QUIT") )
|
||||||
{
|
{
|
||||||
fileQuitAction = aListActions.at( i );
|
fileQuitAction = aListActions.at( i );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !fileQuitAction )
|
if( !fileQuitAction )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
myIsDocuments = true;
|
myIsDocuments = true;
|
||||||
myCasCadeBar->show();
|
myCasCadeBar->show();
|
||||||
|
|
||||||
QList<QAction *> aListMenuActions = menuBar()->actions();
|
QList<QAction *> aListMenuActions = menuBar()->actions();
|
||||||
for ( int i = 0; i < aListMenuActions.size(); i++ )
|
for ( int i = 0; i < aListMenuActions.size(); i++ )
|
||||||
{
|
{
|
||||||
if( aListMenuActions.at( i )->text() == QObject::tr("MNU_HELP") )
|
if( aListMenuActions.at( i )->text() == QObject::tr("MNU_HELP") )
|
||||||
{
|
{
|
||||||
windowAction= aListMenuActions.at( i );
|
windowAction= aListMenuActions.at( i );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -384,9 +384,9 @@ void ApplicationCommonWindow::updateFileActions()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myIsDocuments = false;
|
myIsDocuments = false;
|
||||||
myCasCadeBar->hide();
|
myCasCadeBar->hide();
|
||||||
menuBar()->removeAction( myWindowPopup->menuAction() );
|
menuBar()->removeAction( myWindowPopup->menuAction() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,30 +459,30 @@ void ApplicationCommonWindow::onCloseDocument(DocumentCommon* theDoc)
|
|||||||
|
|
||||||
void ApplicationCommonWindow::onViewToolBar()
|
void ApplicationCommonWindow::onViewToolBar()
|
||||||
{
|
{
|
||||||
bool show = myStdActions.at( ViewToolId )->isChecked();
|
bool show = myStdActions.at( ViewToolId )->isChecked();
|
||||||
if ( show == myStdToolBar->isVisible() )
|
if ( show == myStdToolBar->isVisible() )
|
||||||
return;
|
return;
|
||||||
if ( show )
|
if ( show )
|
||||||
myStdToolBar->show();
|
myStdToolBar->show();
|
||||||
else
|
else
|
||||||
myStdToolBar->hide();
|
myStdToolBar->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationCommonWindow::onViewStatusBar()
|
void ApplicationCommonWindow::onViewStatusBar()
|
||||||
{
|
{
|
||||||
bool show = myStdActions.at( ViewStatusId )->isChecked();
|
bool show = myStdActions.at( ViewStatusId )->isChecked();
|
||||||
if ( show == statusBar()->isVisible() )
|
if ( show == statusBar()->isVisible() )
|
||||||
return;
|
return;
|
||||||
if ( show )
|
if ( show )
|
||||||
statusBar()->show();
|
statusBar()->show();
|
||||||
else
|
else
|
||||||
statusBar()->hide();
|
statusBar()->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationCommonWindow::onAbout()
|
void ApplicationCommonWindow::onAbout()
|
||||||
{
|
{
|
||||||
QMessageBox::information( this, QObject::tr( "TIT_ABOUT" ), QObject::tr( "INF_ABOUT" ), QObject::tr("BTN_OK" ),
|
QMessageBox::information( this, QObject::tr( "TIT_ABOUT" ), QObject::tr( "INF_ABOUT" ), QObject::tr("BTN_OK" ),
|
||||||
QString::null, QString::null, 0, 0 );
|
QString::null, QString::null, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationCommonWindow::onCreateNewView()
|
void ApplicationCommonWindow::onCreateNewView()
|
||||||
@ -505,37 +505,37 @@ void ApplicationCommonWindow::onWindowActivated ( QWidget * w )
|
|||||||
|
|
||||||
void ApplicationCommonWindow::onToolAction()
|
void ApplicationCommonWindow::onToolAction()
|
||||||
{
|
{
|
||||||
QAction* sentBy = (QAction*) sender();
|
QAction* sentBy = (QAction*) sender();
|
||||||
QMdiArea* ws = ApplicationCommonWindow::getWorkspace();
|
QMdiArea* ws = ApplicationCommonWindow::getWorkspace();
|
||||||
DocumentCommon* doc = qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() )->getDocument();
|
DocumentCommon* doc = qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() )->getDocument();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolWireframeId ) )
|
if( sentBy == myToolActions.at( ToolWireframeId ) )
|
||||||
doc->onWireframe();
|
doc->onWireframe();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolShadingId ) )
|
if( sentBy == myToolActions.at( ToolShadingId ) )
|
||||||
doc->onShading();
|
doc->onShading();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolColorId ) )
|
if( sentBy == myToolActions.at( ToolColorId ) )
|
||||||
doc->onColor();
|
doc->onColor();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolMaterialId ) )
|
if( sentBy == myToolActions.at( ToolMaterialId ) )
|
||||||
doc->onMaterial();
|
doc->onMaterial();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolTransparencyId ) )
|
if( sentBy == myToolActions.at( ToolTransparencyId ) )
|
||||||
doc->onTransparency();
|
doc->onTransparency();
|
||||||
|
|
||||||
if( sentBy == myToolActions.at( ToolDeleteId ) )
|
if( sentBy == myToolActions.at( ToolDeleteId ) )
|
||||||
doc->onDelete();
|
doc->onDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationCommonWindow::onSelectionChanged()
|
void ApplicationCommonWindow::onSelectionChanged()
|
||||||
{
|
{
|
||||||
QMdiArea* ws = ApplicationCommonWindow::getWorkspace();
|
QMdiArea* ws = ApplicationCommonWindow::getWorkspace();
|
||||||
DocumentCommon* doc;
|
DocumentCommon* doc;
|
||||||
|
|
||||||
if( !qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() ) )
|
if( !qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
doc = ( qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() ) )->getDocument();
|
doc = ( qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() ) )->getDocument();
|
||||||
Handle(AIS_InteractiveContext) context = doc->getContext();
|
Handle(AIS_InteractiveContext) context = doc->getContext();
|
||||||
|
|
||||||
@ -609,5 +609,3 @@ QToolBar* ApplicationCommonWindow::getCasCadeBar()
|
|||||||
{
|
{
|
||||||
return myCasCadeBar;
|
return myCasCadeBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ DocumentCommon::~DocumentCommon()
|
|||||||
|
|
||||||
ApplicationCommonWindow* DocumentCommon::getApplication()
|
ApplicationCommonWindow* DocumentCommon::getApplication()
|
||||||
{
|
{
|
||||||
return myApp;
|
return myApp;
|
||||||
}
|
}
|
||||||
|
|
||||||
MDIWindow* DocumentCommon::createNewMDIWindow()
|
MDIWindow* DocumentCommon::createNewMDIWindow()
|
||||||
@ -87,9 +87,9 @@ void DocumentCommon::onCreateNewView()
|
|||||||
{
|
{
|
||||||
QMdiArea* ws = myApp->getWorkspace();
|
QMdiArea* ws = myApp->getWorkspace();
|
||||||
MDIWindow* w = createNewMDIWindow();
|
MDIWindow* w = createNewMDIWindow();
|
||||||
|
|
||||||
if (!w)
|
if (!w)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ws->addSubWindow (w);
|
ws->addSubWindow (w);
|
||||||
myViews.append (w);
|
myViews.append (w);
|
||||||
@ -97,14 +97,14 @@ void DocumentCommon::onCreateNewView()
|
|||||||
connect( w, SIGNAL( selectionChanged() ),
|
connect( w, SIGNAL( selectionChanged() ),
|
||||||
this, SIGNAL( selectionChanged() ) );
|
this, SIGNAL( selectionChanged() ) );
|
||||||
connect( w, SIGNAL( message( const QString&, int ) ),
|
connect( w, SIGNAL( message( const QString&, int ) ),
|
||||||
myApp->statusBar(), SLOT( showMessage( const QString&, int ) ) );
|
myApp->statusBar(), SLOT( showMessage( const QString&, int ) ) );
|
||||||
connect( w, SIGNAL( sendCloseView( MDIWindow* ) ),
|
connect( w, SIGNAL( sendCloseView( MDIWindow* ) ),
|
||||||
this, SLOT( onCloseView( MDIWindow* ) ) );
|
this, SLOT( onCloseView( MDIWindow* ) ) );
|
||||||
|
|
||||||
QString aName;
|
QString aName;
|
||||||
w->setWindowTitle( aName.sprintf( "Document %d:%d", myIndex, ++myNbViews ) );
|
w->setWindowTitle( aName.sprintf( "Document %d:%d", myIndex, ++myNbViews ) );
|
||||||
QString dir = ApplicationCommonWindow::getResourceDir() + QString( "/" );
|
QString dir = ApplicationCommonWindow::getResourceDir() + QString( "/" );
|
||||||
|
|
||||||
w->setWindowIcon( QPixmap( dir + QObject::tr("ICON_DOC") ) );
|
w->setWindowIcon( QPixmap( dir + QObject::tr("ICON_DOC") ) );
|
||||||
|
|
||||||
if ( ws->subWindowList().isEmpty() )
|
if ( ws->subWindowList().isEmpty() )
|
||||||
@ -113,10 +113,10 @@ void DocumentCommon::onCreateNewView()
|
|||||||
// in the main menu if showMaximized() is called for a non-visible child window
|
// in the main menu if showMaximized() is called for a non-visible child window
|
||||||
// Therefore calling show() first...
|
// Therefore calling show() first...
|
||||||
w->show();
|
w->show();
|
||||||
w->showMaximized();
|
w->showMaximized();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
w->show();
|
w->show();
|
||||||
|
|
||||||
w->setFocus();
|
w->setFocus();
|
||||||
|
|
||||||
@ -134,9 +134,9 @@ void DocumentCommon::removeView(MDIWindow* theView)
|
|||||||
{
|
{
|
||||||
if ( myViews.count( theView ) )
|
if ( myViews.count( theView ) )
|
||||||
{
|
{
|
||||||
myViews.removeAll(theView);
|
myViews.removeAll(theView);
|
||||||
delete theView;
|
delete theView;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void DocumentCommon::removeViews()
|
void DocumentCommon::removeViews()
|
||||||
{
|
{
|
||||||
@ -148,19 +148,19 @@ void DocumentCommon::removeViews()
|
|||||||
|
|
||||||
int DocumentCommon::countOfWindow()
|
int DocumentCommon::countOfWindow()
|
||||||
{
|
{
|
||||||
return myViews.count();
|
return myViews.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(AIS_InteractiveContext) DocumentCommon::getContext()
|
Handle(AIS_InteractiveContext) DocumentCommon::getContext()
|
||||||
{
|
{
|
||||||
return myContext;
|
return myContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentCommon::fitAll()
|
void DocumentCommon::fitAll()
|
||||||
{
|
{
|
||||||
QList<MDIWindow*>::iterator i;
|
QList<MDIWindow*>::iterator i;
|
||||||
for ( i = myViews.begin(); i != myViews.end(); i++ )
|
for ( i = myViews.begin(); i != myViews.end(); i++ )
|
||||||
(*i)->fitAll();
|
(*i)->fitAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentCommon::onWireframe()
|
void DocumentCommon::onWireframe()
|
||||||
@ -201,7 +201,7 @@ void DocumentCommon::onColor()
|
|||||||
if ( aRetColor.isValid() )
|
if ( aRetColor.isValid() )
|
||||||
{
|
{
|
||||||
Quantity_Color color( aRetColor.red() / 255., aRetColor.green() / 255.,
|
Quantity_Color color( aRetColor.red() / 255., aRetColor.green() / 255.,
|
||||||
aRetColor.blue() / 255., Quantity_TOC_RGB );
|
aRetColor.blue() / 255., Quantity_TOC_RGB );
|
||||||
for (; myContext->MoreCurrent(); myContext->NextCurrent() )
|
for (; myContext->MoreCurrent(); myContext->NextCurrent() )
|
||||||
myContext->SetColor( myContext->Current(), color.Name() );
|
myContext->SetColor( myContext->Current(), color.Name() );
|
||||||
}
|
}
|
||||||
|
@ -22,28 +22,28 @@ MDIWindow::MDIWindow(View* aView,
|
|||||||
: QMainWindow( parent, wflags )
|
: QMainWindow( parent, wflags )
|
||||||
{
|
{
|
||||||
myView = aView;
|
myView = aView;
|
||||||
myDocument = aDocument;
|
myDocument = aDocument;
|
||||||
}
|
}
|
||||||
|
|
||||||
MDIWindow::MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags)
|
MDIWindow::MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags)
|
||||||
: QMainWindow( parent, wflags )
|
: QMainWindow( parent, wflags )
|
||||||
{
|
{
|
||||||
QFrame *vb = new QFrame( this );
|
QFrame *vb = new QFrame( this );
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout( vb );
|
QVBoxLayout *layout = new QVBoxLayout( vb );
|
||||||
layout->setMargin( 0 );
|
layout->setMargin( 0 );
|
||||||
|
|
||||||
vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
|
vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
|
||||||
|
|
||||||
setCentralWidget( vb );
|
setCentralWidget( vb );
|
||||||
|
|
||||||
myDocument = aDocument;
|
myDocument = aDocument;
|
||||||
myView = new View (myDocument->getContext(), vb);
|
myView = new View (myDocument->getContext(), vb);
|
||||||
layout->addWidget (myView);
|
layout->addWidget (myView);
|
||||||
|
|
||||||
connect( myView, SIGNAL( selectionChanged() ),
|
connect( myView, SIGNAL( selectionChanged() ),
|
||||||
this, SIGNAL( selectionChanged() ) );
|
this, SIGNAL( selectionChanged() ) );
|
||||||
|
|
||||||
createViewActions();
|
createViewActions();
|
||||||
createRaytraceActions();
|
createRaytraceActions();
|
||||||
|
|
||||||
@ -58,26 +58,26 @@ MDIWindow::~MDIWindow()
|
|||||||
|
|
||||||
DocumentCommon* MDIWindow::getDocument()
|
DocumentCommon* MDIWindow::getDocument()
|
||||||
{
|
{
|
||||||
return myDocument;
|
return myDocument;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDIWindow::closeEvent(QCloseEvent* )
|
void MDIWindow::closeEvent(QCloseEvent* )
|
||||||
{
|
{
|
||||||
emit sendCloseView(this);
|
emit sendCloseView(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDIWindow::fitAll()
|
void MDIWindow::fitAll()
|
||||||
{
|
{
|
||||||
myView->fitAll();
|
myView->fitAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDIWindow::createViewActions()
|
void MDIWindow::createViewActions()
|
||||||
{
|
{
|
||||||
// populate a tool bar with some actions
|
// populate a tool bar with some actions
|
||||||
QToolBar* aToolBar = addToolBar( tr( "View Operations" ) );
|
QToolBar* aToolBar = addToolBar( tr( "View Operations" ) );
|
||||||
|
|
||||||
QList<QAction*>* aList = myView->getViewActions();
|
QList<QAction*>* aList = myView->getViewActions();
|
||||||
aToolBar->addActions( *aList );
|
aToolBar->addActions( *aList );
|
||||||
|
|
||||||
aToolBar->toggleViewAction()->setVisible(false);
|
aToolBar->toggleViewAction()->setVisible(false);
|
||||||
aList->at(View::ViewHlrOffId)->setChecked( true );
|
aList->at(View::ViewHlrOffId)->setChecked( true );
|
||||||
@ -86,15 +86,15 @@ void MDIWindow::createViewActions()
|
|||||||
void MDIWindow::createRaytraceActions()
|
void MDIWindow::createRaytraceActions()
|
||||||
{
|
{
|
||||||
// populate a tool bar with some actions
|
// populate a tool bar with some actions
|
||||||
QToolBar* aToolBar = addToolBar( tr( "Ray-tracing Options" ) );
|
QToolBar* aToolBar = addToolBar( tr( "Ray-tracing Options" ) );
|
||||||
|
|
||||||
QList<QAction*>* aList = myView->getRaytraceActions();
|
QList<QAction*>* aList = myView->getRaytraceActions();
|
||||||
aToolBar->addActions( *aList );
|
aToolBar->addActions( *aList );
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,48 +106,48 @@ void MDIWindow::onWindowActivated ()
|
|||||||
void MDIWindow::dump()
|
void MDIWindow::dump()
|
||||||
{
|
{
|
||||||
QString datadir = (QString(qgetenv ("CASROOT").constData()) + "/../data/images");
|
QString datadir = (QString(qgetenv ("CASROOT").constData()) + "/../data/images");
|
||||||
static QString filter;
|
static QString filter;
|
||||||
filter = "Images Files (*.bmp *.ppm *.png *.jpg *.tiff *.tga *.gif *.exr *.ps *.eps *.tex *.pdf *.svg *.pgf)";
|
filter = "Images Files (*.bmp *.ppm *.png *.jpg *.tiff *.tga *.gif *.exr *.ps *.eps *.tex *.pdf *.svg *.pgf)";
|
||||||
QFileDialog fd ( 0 );
|
QFileDialog fd ( 0 );
|
||||||
fd.setModal( true );
|
fd.setModal( true );
|
||||||
fd.setNameFilter ( filter );
|
fd.setNameFilter ( filter );
|
||||||
fd.setWindowTitle( QObject::tr("INF_APP_EXPORT") );
|
fd.setWindowTitle( QObject::tr("INF_APP_EXPORT") );
|
||||||
fd.setFileMode( QFileDialog::AnyFile );
|
fd.setFileMode( QFileDialog::AnyFile );
|
||||||
int ret = fd.exec();
|
int ret = fd.exec();
|
||||||
|
|
||||||
/* update the desktop after the dialog is closed */
|
/* update the desktop after the dialog is closed */
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
QStringList fileNames;
|
QStringList fileNames;
|
||||||
fileNames = fd.selectedFiles();
|
fileNames = fd.selectedFiles();
|
||||||
|
|
||||||
QString file ( (ret == QDialog::Accepted && !fileNames.isEmpty() )? fileNames[0] : QString::null);
|
QString file ( (ret == QDialog::Accepted && !fileNames.isEmpty() )? fileNames[0] : QString::null);
|
||||||
if ( !file.isNull() )
|
if ( !file.isNull() )
|
||||||
{
|
{
|
||||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||||
if ( !QFileInfo( file ).completeSuffix().length() )
|
if ( !QFileInfo( file ).completeSuffix().length() )
|
||||||
file += QString( ".bmp" );
|
file += QString( ".bmp" );
|
||||||
|
|
||||||
bool res = myView->dump( (Standard_CString)file.toLatin1().constData() );
|
bool res = myView->dump( (Standard_CString)file.toLatin1().constData() );
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
if ( !res )
|
if ( !res )
|
||||||
{
|
{
|
||||||
QWidgetList list = qApp->allWidgets();
|
QWidgetList list = qApp->allWidgets();
|
||||||
QWidget* mainWidget;
|
QWidget* mainWidget;
|
||||||
for( int i = 0; i < list.size(); ++i )
|
for( int i = 0; i < list.size(); ++i )
|
||||||
{
|
{
|
||||||
if( qobject_cast<ApplicationCommonWindow*>( list.at( i ) ) )
|
if( qobject_cast<ApplicationCommonWindow*>( list.at( i ) ) )
|
||||||
mainWidget = qobject_cast<ApplicationCommonWindow*>( list.at( i ) );
|
mainWidget = qobject_cast<ApplicationCommonWindow*>( list.at( i ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QMessageBox::information ( mainWidget, QObject::tr("TIT_ERROR"), QObject::tr("INF_ERROR"), QObject::tr("BTN_OK"),
|
QMessageBox::information ( mainWidget, QObject::tr("TIT_ERROR"), QObject::tr("INF_ERROR"), QObject::tr("BTN_OK"),
|
||||||
QString::null, QString::null, 0, 0 );
|
QString::null, QString::null, 0, 0 );
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize MDIWindow::sizeHint() const
|
QSize MDIWindow::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize( 450, 300 );
|
return QSize( 450, 300 );
|
||||||
}
|
}
|
||||||
|
@ -57,33 +57,31 @@ static QCursor* rotCursor = NULL;
|
|||||||
|
|
||||||
View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
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 ),
|
||||||
myBackMenu( NULL )
|
myBackMenu( NULL )
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||||
//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;
|
|
||||||
myContext = theContext;
|
|
||||||
|
|
||||||
//if (theRT)
|
myFirst = true;
|
||||||
// myContext->SetDisplayMode( AIS_DisplayMode::AIS_Shaded, 1 );
|
myContext = theContext;
|
||||||
|
|
||||||
myXmin = 0;
|
myXmin = 0;
|
||||||
myYmin = 0;
|
myYmin = 0;
|
||||||
myXmax = 0;
|
myXmax = 0;
|
||||||
myYmax = 0;
|
myYmax = 0;
|
||||||
myCurZoom = 0;
|
myCurZoom = 0;
|
||||||
myRectBand = 0;
|
myRectBand = 0;
|
||||||
|
|
||||||
setAttribute(Qt::WA_PaintOnScreen);
|
setAttribute(Qt::WA_PaintOnScreen);
|
||||||
setAttribute(Qt::WA_NoSystemBackground);
|
setAttribute(Qt::WA_NoSystemBackground);
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||||
XVisualInfo* pVisualInfo;
|
XVisualInfo* pVisualInfo;
|
||||||
@ -95,7 +93,7 @@ myBackMenu( NULL )
|
|||||||
|
|
||||||
/* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
|
/* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
|
||||||
int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
||||||
GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
|
GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
|
||||||
pVisualInfo = ::glXChooseVisual( x11Info().display(), DefaultScreen( x11Info().display() ), visualAttr );
|
pVisualInfo = ::glXChooseVisual( x11Info().display(), DefaultScreen( x11Info().display() ), visualAttr );
|
||||||
|
|
||||||
if ( isVisible() )
|
if ( isVisible() )
|
||||||
@ -106,8 +104,8 @@ myBackMenu( NULL )
|
|||||||
Window p = RootWindow( x11Info().display(), DefaultScreen( x11Info().display() ) );
|
Window p = RootWindow( x11Info().display(), DefaultScreen( x11Info().display() ) );
|
||||||
a.colormap = XCreateColormap( x11Info().display(), RootWindow( x11Info().display(), pVisualInfo->screen ),
|
a.colormap = XCreateColormap( x11Info().display(), RootWindow( x11Info().display(), pVisualInfo->screen ),
|
||||||
pVisualInfo->visual, AllocNone );
|
pVisualInfo->visual, AllocNone );
|
||||||
|
|
||||||
QColor color = palette().color( backgroundRole() );
|
QColor color = palette().color( backgroundRole() );
|
||||||
QColormap colmap = QColormap::instance();
|
QColormap colmap = QColormap::instance();
|
||||||
a.background_pixel = colmap.pixel( color );
|
a.background_pixel = colmap.pixel( color );
|
||||||
a.border_pixel = colmap.pixel( Qt::black );
|
a.border_pixel = colmap.pixel( Qt::black );
|
||||||
@ -115,8 +113,8 @@ myBackMenu( NULL )
|
|||||||
p = parentWidget()->winId();
|
p = parentWidget()->winId();
|
||||||
|
|
||||||
Window w = XCreateWindow( x11Info().display(), p, x(), y(), width(), height(),
|
Window w = XCreateWindow( x11Info().display(), p, x(), y(), width(), height(),
|
||||||
0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
|
0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
|
||||||
CWBackPixel | CWBorderPixel | CWColormap, &a );
|
CWBackPixel | CWBorderPixel | CWColormap, &a );
|
||||||
Window *cmw;
|
Window *cmw;
|
||||||
Window *cmwret;
|
Window *cmwret;
|
||||||
int count;
|
int count;
|
||||||
@ -128,14 +126,14 @@ myBackMenu( NULL )
|
|||||||
int i;
|
int i;
|
||||||
for ( i = 0; i < count; i++ )
|
for ( i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
if ( cmw[i] == winId() ) /* replace old window */
|
if ( cmw[i] == winId() ) /* replace old window */
|
||||||
{
|
{
|
||||||
cmw[i] = w;
|
cmw[i] = w;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( i >= count ) /* append new window */
|
if ( i >= count ) /* append new window */
|
||||||
cmw[count++] = w;
|
cmw[count++] = w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -155,23 +153,24 @@ myBackMenu( NULL )
|
|||||||
XFlush( x11Info().display() );
|
XFlush( x11Info().display() );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
|
||||||
myHlrModeIsOn = Standard_False;
|
|
||||||
setMouseTracking( true );
|
|
||||||
|
|
||||||
if( myFirst )
|
|
||||||
{
|
|
||||||
init();
|
|
||||||
myFirst = false;
|
|
||||||
}
|
|
||||||
initViewActions();
|
|
||||||
initCursors();
|
|
||||||
|
|
||||||
setBackgroundRole( QPalette::NoRole );//NoBackground );
|
myCurrentMode = CurAction3d_Nothing;
|
||||||
// set focus policy to threat QContextMenuEvent from keyboard
|
myHlrModeIsOn = Standard_False;
|
||||||
setFocusPolicy( Qt::StrongFocus );
|
setMouseTracking( true );
|
||||||
setAttribute( Qt::WA_PaintOnScreen );
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
if( myFirst )
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
myFirst = false;
|
||||||
|
}
|
||||||
|
initViewActions();
|
||||||
|
initCursors();
|
||||||
|
|
||||||
|
setBackgroundRole( QPalette::NoRole );//NoBackground );
|
||||||
|
// set focus policy to threat QContextMenuEvent from keyboard
|
||||||
|
setFocusPolicy( Qt::StrongFocus );
|
||||||
|
setAttribute( Qt::WA_PaintOnScreen );
|
||||||
|
setAttribute( Qt::WA_NoSystemBackground );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,128 +205,125 @@ 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 * )
|
||||||
{
|
{
|
||||||
// QApplication::syncX();
|
// QApplication::syncX();
|
||||||
if( myFirst )
|
if( myFirst )
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
myFirst = false;
|
myFirst = false;
|
||||||
}
|
}
|
||||||
myView->Redraw();
|
myView->Redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::resizeEvent( QResizeEvent * )
|
void View::resizeEvent( QResizeEvent * )
|
||||||
{
|
{
|
||||||
// QApplication::syncX();
|
// QApplication::syncX();
|
||||||
if( !myView.IsNull() )
|
if( !myView.IsNull() )
|
||||||
{
|
{
|
||||||
myView->MustBeResized();
|
myView->MustBeResized();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::fitAll()
|
void View::fitAll()
|
||||||
{
|
{
|
||||||
myView->FitAll();
|
myView->FitAll();
|
||||||
myView->ZFitAll();
|
myView->ZFitAll();
|
||||||
myView->Redraw();
|
myView->Redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::fitArea()
|
void View::fitArea()
|
||||||
{
|
{
|
||||||
myCurrentMode = CurAction3d_WindowZooming;
|
myCurrentMode = CurAction3d_WindowZooming;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::zoom()
|
void View::zoom()
|
||||||
{
|
{
|
||||||
myCurrentMode = CurAction3d_DynamicZooming;
|
myCurrentMode = CurAction3d_DynamicZooming;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::pan()
|
void View::pan()
|
||||||
{
|
{
|
||||||
myCurrentMode = CurAction3d_DynamicPanning;
|
myCurrentMode = CurAction3d_DynamicPanning;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::rotation()
|
void View::rotation()
|
||||||
{
|
{
|
||||||
myCurrentMode = CurAction3d_DynamicRotation;
|
myCurrentMode = CurAction3d_DynamicRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::globalPan()
|
void View::globalPan()
|
||||||
{
|
{
|
||||||
// save the current zoom value
|
// save the current zoom value
|
||||||
myCurZoom = myView->Scale();
|
myCurZoom = myView->Scale();
|
||||||
// Do a Global Zoom
|
// Do a Global Zoom
|
||||||
myView->FitAll();
|
myView->FitAll();
|
||||||
// Set the mode
|
// Set the mode
|
||||||
myCurrentMode = CurAction3d_GlobalPanning;
|
myCurrentMode = CurAction3d_GlobalPanning;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::front()
|
void View::front()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Xpos );
|
myView->SetProj( V3d_Xpos );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::back()
|
void View::back()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Xneg );
|
myView->SetProj( V3d_Xneg );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::top()
|
void View::top()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Zpos );
|
myView->SetProj( V3d_Zpos );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::bottom()
|
void View::bottom()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Zneg );
|
myView->SetProj( V3d_Zneg );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::left()
|
void View::left()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Ypos );
|
myView->SetProj( V3d_Ypos );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::right()
|
void View::right()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_Yneg );
|
myView->SetProj( V3d_Yneg );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::axo()
|
void View::axo()
|
||||||
{
|
{
|
||||||
myView->SetProj( V3d_XposYnegZpos );
|
myView->SetProj( V3d_XposYnegZpos );
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::reset()
|
void View::reset()
|
||||||
{
|
{
|
||||||
myView->Reset();
|
myView->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::hlrOff()
|
void View::hlrOff()
|
||||||
{
|
{
|
||||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||||
myHlrModeIsOn = Standard_False;
|
myHlrModeIsOn = Standard_False;
|
||||||
myView->SetComputedMode (myHlrModeIsOn);
|
myView->SetComputedMode (myHlrModeIsOn);
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::hlrOn()
|
void View::hlrOn()
|
||||||
{
|
{
|
||||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||||
myHlrModeIsOn = Standard_True;
|
myHlrModeIsOn = Standard_True;
|
||||||
myView->SetComputedMode (myHlrModeIsOn);
|
myView->SetComputedMode (myHlrModeIsOn);
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@ -415,72 +405,73 @@ void View::DisableRaytracing()
|
|||||||
|
|
||||||
void View::updateToggled( bool isOn )
|
void View::updateToggled( bool isOn )
|
||||||
{
|
{
|
||||||
QAction* sentBy = (QAction*)sender();
|
QAction* sentBy = (QAction*)sender();
|
||||||
|
|
||||||
if( !isOn )
|
if( !isOn )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for ( int i = ViewFitAllId; i < ViewHlrOffId; i++ )
|
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 ) ) ||
|
||||||
|
( anAction == myViewActions->at( ViewGlobalPanId ) ) ||
|
||||||
|
( anAction == myViewActions->at( ViewRotationId ) ) )
|
||||||
{
|
{
|
||||||
QAction* anAction = myViewActions->at( i );
|
if ( anAction && ( anAction != sentBy ) )
|
||||||
if ( ( anAction == myViewActions->at( ViewFitAreaId ) ) ||
|
{
|
||||||
( anAction == myViewActions->at( ViewZoomId ) ) ||
|
anAction->setCheckable( true );
|
||||||
( anAction == myViewActions->at( ViewPanId ) ) ||
|
anAction->setChecked( false );
|
||||||
( anAction == myViewActions->at( ViewGlobalPanId ) ) ||
|
}
|
||||||
( anAction == myViewActions->at( ViewRotationId ) ) )
|
else
|
||||||
{
|
{
|
||||||
if ( anAction && ( anAction != sentBy ) )
|
if ( sentBy == myViewActions->at( ViewFitAreaId ) )
|
||||||
{
|
setCursor( *handCursor );
|
||||||
anAction->setCheckable( true );
|
else if ( sentBy == myViewActions->at( ViewZoomId ) )
|
||||||
anAction->setChecked( false );
|
setCursor( *zoomCursor );
|
||||||
}
|
else if ( sentBy == myViewActions->at( ViewPanId ) )
|
||||||
else
|
setCursor( *panCursor );
|
||||||
{
|
else if ( sentBy == myViewActions->at( ViewGlobalPanId ) )
|
||||||
if ( sentBy == myViewActions->at( ViewFitAreaId ) )
|
setCursor( *globPanCursor );
|
||||||
setCursor( *handCursor );
|
else if ( sentBy == myViewActions->at( ViewRotationId ) )
|
||||||
else if ( sentBy == myViewActions->at( ViewZoomId ) )
|
setCursor( *rotCursor );
|
||||||
setCursor( *zoomCursor );
|
else
|
||||||
else if ( sentBy == myViewActions->at( ViewPanId ) )
|
setCursor( *defCursor );
|
||||||
setCursor( *panCursor );
|
|
||||||
else if ( sentBy == myViewActions->at( ViewGlobalPanId ) )
|
sentBy->setCheckable( false );
|
||||||
setCursor( *globPanCursor );
|
}
|
||||||
else if ( sentBy == myViewActions->at( ViewRotationId ) )
|
|
||||||
setCursor( *rotCursor );
|
|
||||||
else
|
|
||||||
setCursor( *defCursor );
|
|
||||||
|
|
||||||
sentBy->setCheckable( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::initCursors()
|
void View::initCursors()
|
||||||
{
|
{
|
||||||
if ( !defCursor )
|
if ( !defCursor )
|
||||||
defCursor = new QCursor( Qt::ArrowCursor );
|
defCursor = new QCursor( Qt::ArrowCursor );
|
||||||
if ( !handCursor )
|
if ( !handCursor )
|
||||||
handCursor = new QCursor( Qt::PointingHandCursor );
|
handCursor = new QCursor( Qt::PointingHandCursor );
|
||||||
if ( !panCursor )
|
if ( !panCursor )
|
||||||
panCursor = new QCursor( Qt::SizeAllCursor );
|
panCursor = new QCursor( Qt::SizeAllCursor );
|
||||||
if ( !globPanCursor )
|
if ( !globPanCursor )
|
||||||
globPanCursor = new QCursor( Qt::CrossCursor );
|
globPanCursor = new QCursor( Qt::CrossCursor );
|
||||||
if ( !zoomCursor )
|
if ( !zoomCursor )
|
||||||
zoomCursor = new QCursor( QPixmap( ApplicationCommonWindow::getResourceDir() + QString( "/" ) + QObject::tr( "ICON_CURSOR_ZOOM" ) ) );
|
zoomCursor = new QCursor( QPixmap( ApplicationCommonWindow::getResourceDir() + QString( "/" ) + QObject::tr( "ICON_CURSOR_ZOOM" ) ) );
|
||||||
if ( !rotCursor )
|
if ( !rotCursor )
|
||||||
rotCursor = new QCursor( QPixmap( ApplicationCommonWindow::getResourceDir() + QString( "/" ) + QObject::tr( "ICON_CURSOR_ROTATE" ) ) );
|
rotCursor = new QCursor( QPixmap( ApplicationCommonWindow::getResourceDir() + QString( "/" ) + QObject::tr( "ICON_CURSOR_ROTATE" ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction*>* View::getViewActions()
|
QList<QAction*>* View::getViewActions()
|
||||||
{
|
{
|
||||||
initViewActions();
|
initViewActions();
|
||||||
return myViewActions;
|
return myViewActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction*>* View::getRaytraceActions()
|
QList<QAction*>* View::getRaytraceActions()
|
||||||
{
|
{
|
||||||
initRaytraceActions();
|
initRaytraceActions();
|
||||||
return myRaytraceActions;
|
return myRaytraceActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -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 );
|
||||||
|
|
||||||
@ -690,24 +681,24 @@ void View::activateCursor( const CurrentAction3d mode )
|
|||||||
switch( mode )
|
switch( mode )
|
||||||
{
|
{
|
||||||
case CurAction3d_DynamicPanning:
|
case CurAction3d_DynamicPanning:
|
||||||
setCursor( *panCursor );
|
setCursor( *panCursor );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicZooming:
|
case CurAction3d_DynamicZooming:
|
||||||
setCursor( *zoomCursor );
|
setCursor( *zoomCursor );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicRotation:
|
case CurAction3d_DynamicRotation:
|
||||||
setCursor( *rotCursor );
|
setCursor( *rotCursor );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_GlobalPanning:
|
case CurAction3d_GlobalPanning:
|
||||||
setCursor( *globPanCursor );
|
setCursor( *globPanCursor );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_WindowZooming:
|
case CurAction3d_WindowZooming:
|
||||||
setCursor( *handCursor );
|
setCursor( *handCursor );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_Nothing:
|
case CurAction3d_Nothing:
|
||||||
default:
|
default:
|
||||||
setCursor( *defCursor );
|
setCursor( *defCursor );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,9 +720,9 @@ void View::onLButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint poi
|
|||||||
{
|
{
|
||||||
case CurAction3d_Nothing:
|
case CurAction3d_Nothing:
|
||||||
if ( nFlags & MULTISELECTIONKEY )
|
if ( nFlags & MULTISELECTIONKEY )
|
||||||
MultiDragEvent( myXmax, myYmax, -1 );
|
MultiDragEvent( myXmax, myYmax, -1 );
|
||||||
else
|
else
|
||||||
DragEvent( myXmax, myYmax, -1 );
|
DragEvent( myXmax, myYmax, -1 );
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicZooming:
|
case CurAction3d_DynamicZooming:
|
||||||
break;
|
break;
|
||||||
@ -744,12 +735,12 @@ void View::onLButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint poi
|
|||||||
case CurAction3d_DynamicRotation:
|
case CurAction3d_DynamicRotation:
|
||||||
if (myHlrModeIsOn)
|
if (myHlrModeIsOn)
|
||||||
{
|
{
|
||||||
myView->SetComputedMode (Standard_False);
|
myView->SetComputedMode (Standard_False);
|
||||||
}
|
}
|
||||||
myView->StartRotation( point.x(), point.y() );
|
myView->StartRotation( point.x(), point.y() );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Standard_Failure::Raise( "incompatible Current Mode" );
|
Standard_Failure::Raise( "incompatible Current Mode" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -788,23 +779,23 @@ void View::onLButtonUp( Qt::MouseButtons nFlags, const QPoint point )
|
|||||||
case CurAction3d_Nothing:
|
case CurAction3d_Nothing:
|
||||||
if ( point.x() == myXmin && point.y() == myYmin )
|
if ( point.x() == myXmin && point.y() == myYmin )
|
||||||
{
|
{
|
||||||
// no offset between down and up --> selectEvent
|
// no offset between down and up --> selectEvent
|
||||||
myXmax = point.x();
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
if ( nFlags & MULTISELECTIONKEY )
|
if ( nFlags & MULTISELECTIONKEY )
|
||||||
MultiInputEvent( point.x(), point.y() );
|
MultiInputEvent( point.x(), point.y() );
|
||||||
else
|
else
|
||||||
InputEvent( point.x(), point.y() );
|
InputEvent( point.x(), point.y() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
||||||
myXmax = point.x();
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
if ( nFlags & MULTISELECTIONKEY )
|
if ( nFlags & MULTISELECTIONKEY )
|
||||||
MultiDragEvent( point.x(), point.y(), 1 );
|
MultiDragEvent( point.x(), point.y(), 1 );
|
||||||
else
|
else
|
||||||
DragEvent( point.x(), point.y(), 1 );
|
DragEvent( point.x(), point.y(), 1 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicZooming:
|
case CurAction3d_DynamicZooming:
|
||||||
@ -817,7 +808,7 @@ void View::onLButtonUp( Qt::MouseButtons nFlags, const QPoint point )
|
|||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
if ( (abs( myXmin - myXmax ) > ValZWMin ) ||
|
if ( (abs( myXmin - myXmax ) > ValZWMin ) ||
|
||||||
(abs( myYmin - myYmax ) > ValZWMin ) )
|
(abs( myYmin - myYmax ) > ValZWMin ) )
|
||||||
myView->WindowFitAll( myXmin, myYmin, myXmax, myYmax );
|
myView->WindowFitAll( myXmin, myYmin, myXmax, myYmax );
|
||||||
myCurrentMode = CurAction3d_Nothing;
|
myCurrentMode = CurAction3d_Nothing;
|
||||||
noActiveActions();
|
noActiveActions();
|
||||||
break;
|
break;
|
||||||
@ -835,7 +826,7 @@ void View::onLButtonUp( Qt::MouseButtons nFlags, const QPoint point )
|
|||||||
noActiveActions();
|
noActiveActions();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Standard_Failure::Raise(" incompatible Current Mode ");
|
Standard_Failure::Raise(" incompatible Current Mode ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
activateCursor( myCurrentMode );
|
activateCursor( myCurrentMode );
|
||||||
@ -871,39 +862,39 @@ void View::onMouseMove( Qt::MouseButtons nFlags, const QPoint point )
|
|||||||
switch ( myCurrentMode )
|
switch ( myCurrentMode )
|
||||||
{
|
{
|
||||||
case CurAction3d_Nothing:
|
case CurAction3d_Nothing:
|
||||||
myXmax = point.x();
|
|
||||||
myYmax = point.y();
|
|
||||||
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
|
||||||
if ( nFlags & MULTISELECTIONKEY )
|
|
||||||
MultiDragEvent( myXmax, myYmax, 0 );
|
|
||||||
else
|
|
||||||
DragEvent( myXmax, myYmax, 0 );
|
|
||||||
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_True );
|
|
||||||
break;
|
|
||||||
case CurAction3d_DynamicZooming:
|
|
||||||
myView->Zoom( myXmax, myYmax, point.x(), point.y() );
|
|
||||||
myXmax = point.x();
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
break;
|
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
||||||
case CurAction3d_WindowZooming:
|
if ( nFlags & MULTISELECTIONKEY )
|
||||||
myXmax = point.x();
|
MultiDragEvent( myXmax, myYmax, 0 );
|
||||||
|
else
|
||||||
|
DragEvent( myXmax, myYmax, 0 );
|
||||||
|
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_True );
|
||||||
|
break;
|
||||||
|
case CurAction3d_DynamicZooming:
|
||||||
|
myView->Zoom( myXmax, myYmax, point.x(), point.y() );
|
||||||
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
break;
|
||||||
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_True );
|
case CurAction3d_WindowZooming:
|
||||||
break;
|
myXmax = point.x();
|
||||||
|
myYmax = point.y();
|
||||||
|
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_False );
|
||||||
|
DrawRectangle( myXmin, myYmin, myXmax, myYmax, Standard_True );
|
||||||
|
break;
|
||||||
case CurAction3d_DynamicPanning:
|
case CurAction3d_DynamicPanning:
|
||||||
myView->Pan( point.x() - myXmax, myYmax - point.y() );
|
myView->Pan( point.x() - myXmax, myYmax - point.y() );
|
||||||
myXmax = point.x();
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
break;
|
break;
|
||||||
case CurAction3d_GlobalPanning:
|
case CurAction3d_GlobalPanning:
|
||||||
break;
|
break;
|
||||||
case CurAction3d_DynamicRotation:
|
case CurAction3d_DynamicRotation:
|
||||||
myView->Rotation( point.x(), point.y() );
|
myView->Rotation( point.x(), point.y() );
|
||||||
myView->Redraw();
|
myView->Redraw();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Standard_Failure::Raise( "incompatible Current Mode" );
|
Standard_Failure::Raise( "incompatible Current Mode" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -911,10 +902,10 @@ void View::onMouseMove( Qt::MouseButtons nFlags, const QPoint point )
|
|||||||
{
|
{
|
||||||
myXmax = point.x();
|
myXmax = point.x();
|
||||||
myYmax = point.y();
|
myYmax = point.y();
|
||||||
if ( nFlags & MULTISELECTIONKEY )
|
if ( nFlags & MULTISELECTIONKEY )
|
||||||
MultiMoveEvent( point.x(), point.y() );
|
MultiMoveEvent( point.x(), point.y() );
|
||||||
else
|
else
|
||||||
MoveEvent( point.x(), point.y() );
|
MoveEvent( point.x(), point.y() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -988,23 +979,23 @@ void View::Popup( const int /*x*/, const int /*y*/ )
|
|||||||
{
|
{
|
||||||
QList<QAction*>* aList = stApp->getToolActions();
|
QList<QAction*>* aList = stApp->getToolActions();
|
||||||
QMenu* myToolMenu = new QMenu( 0 );
|
QMenu* myToolMenu = new QMenu( 0 );
|
||||||
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolWireframeId ) );
|
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolWireframeId ) );
|
||||||
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolShadingId ) );
|
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolShadingId ) );
|
||||||
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolColorId ) );
|
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolColorId ) );
|
||||||
|
|
||||||
QMenu* myMaterMenu = new QMenu( myToolMenu );
|
QMenu* myMaterMenu = new QMenu( myToolMenu );
|
||||||
|
|
||||||
QList<QAction*>* aMeterActions = ApplicationCommonWindow::getApplication()->getMaterialActions();
|
QList<QAction*>* aMeterActions = ApplicationCommonWindow::getApplication()->getMaterialActions();
|
||||||
|
|
||||||
QString dir = ApplicationCommonWindow::getResourceDir() + QString( "/" );
|
QString dir = ApplicationCommonWindow::getResourceDir() + QString( "/" );
|
||||||
myMaterMenu = myToolMenu->addMenu( QPixmap( dir+QObject::tr("ICON_TOOL_MATER")), QObject::tr("MNU_MATER") );
|
myMaterMenu = myToolMenu->addMenu( QPixmap( dir+QObject::tr("ICON_TOOL_MATER")), QObject::tr("MNU_MATER") );
|
||||||
for ( int i = 0; i < aMeterActions->size(); i++ )
|
for ( int i = 0; i < aMeterActions->size(); i++ )
|
||||||
myMaterMenu->addAction( aMeterActions->at( i ) );
|
myMaterMenu->addAction( aMeterActions->at( i ) );
|
||||||
|
|
||||||
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolTransparencyId ) );
|
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolTransparencyId ) );
|
||||||
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolDeleteId ) );
|
myToolMenu->addAction( aList->at( ApplicationCommonWindow::ToolDeleteId ) );
|
||||||
addItemInPopup(myToolMenu);
|
addItemInPopup(myToolMenu);
|
||||||
myToolMenu->exec( QCursor::pos() );
|
myToolMenu->exec( QCursor::pos() );
|
||||||
delete myToolMenu;
|
delete myToolMenu;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1013,18 +1004,18 @@ void View::Popup( const int /*x*/, const int /*y*/ )
|
|||||||
{
|
{
|
||||||
myBackMenu = new QMenu( 0 );
|
myBackMenu = new QMenu( 0 );
|
||||||
|
|
||||||
QAction* a = new QAction( QObject::tr("MNU_CH_BACK"), this );
|
QAction* a = new QAction( QObject::tr("MNU_CH_BACK"), this );
|
||||||
a->setToolTip( QObject::tr("TBR_CH_BACK") );
|
a->setToolTip( QObject::tr("TBR_CH_BACK") );
|
||||||
connect( a, SIGNAL( activated() ), this, SLOT( onBackground() ) );
|
connect( a, SIGNAL( activated() ), this, SLOT( onBackground() ) );
|
||||||
myBackMenu->addAction( a );
|
myBackMenu->addAction( a );
|
||||||
addItemInPopup(myBackMenu);
|
addItemInPopup(myBackMenu);
|
||||||
|
|
||||||
a = new QAction( QObject::tr("MNU_CH_ENV_MAP"), this );
|
a = new QAction( QObject::tr("MNU_CH_ENV_MAP"), this );
|
||||||
a->setToolTip( QObject::tr("TBR_CH_ENV_MAP") );
|
a->setToolTip( QObject::tr("TBR_CH_ENV_MAP") );
|
||||||
connect( a, SIGNAL( activated() ), this, SLOT( onEnvironmentMap() ) );
|
connect( a, SIGNAL( activated() ), this, SLOT( onEnvironmentMap() ) );
|
||||||
a->setCheckable( true );
|
a->setCheckable( true );
|
||||||
a->setChecked( false );
|
a->setChecked( false );
|
||||||
myBackMenu->addAction( a );
|
myBackMenu->addAction( a );
|
||||||
addItemInPopup(myBackMenu);
|
addItemInPopup(myBackMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1039,7 +1030,7 @@ void View::addItemInPopup( QMenu* /*theMenu*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void View::DrawRectangle(const int MinX, const int MinY,
|
void View::DrawRectangle(const int MinX, const int MinY,
|
||||||
const int MaxX, const int MaxY, const bool Draw)
|
const int MaxX, const int MaxY, const bool Draw)
|
||||||
{
|
{
|
||||||
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
static Standard_Integer StoredMinX, StoredMaxX, StoredMinY, StoredMaxY;
|
||||||
static Standard_Boolean m_IsVisible;
|
static Standard_Boolean m_IsVisible;
|
||||||
@ -1093,8 +1084,8 @@ void View::noActiveActions()
|
|||||||
( anAction == myViewActions->at( ViewRotationId ) ) )
|
( anAction == myViewActions->at( ViewRotationId ) ) )
|
||||||
{
|
{
|
||||||
setCursor( *defCursor );
|
setCursor( *defCursor );
|
||||||
anAction->setCheckable( true );
|
anAction->setCheckable( true );
|
||||||
anAction->setChecked( false );
|
anAction->setChecked( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user