diff --git a/samples/qt/Common/src/ApplicationCommon.cxx b/samples/qt/Common/src/ApplicationCommon.cxx index e0e21d1471..186363f7f5 100755 --- a/samples/qt/Common/src/ApplicationCommon.cxx +++ b/samples/qt/Common/src/ApplicationCommon.cxx @@ -68,27 +68,27 @@ void ApplicationCommonWindow::createStandardOperations() fileNewAction->setToolTip( QObject::tr("TBR_NEW") ); fileNewAction->setStatusTip( QObject::tr("TBR_NEW") ); fileNewAction->setShortcut( QObject::tr("CTRL+N") ); - connect( fileNewAction, SIGNAL( activated() ) , this, SLOT( onNewDoc() ) ); + connect( fileNewAction, SIGNAL( triggered() ) , this, SLOT( onNewDoc() ) ); myStdActions.insert( FileNewId, fileNewAction ); fileCloseAction = new QAction( closeIcon, QObject::tr("MNU_CLOSE"), this ); fileCloseAction->setToolTip( QObject::tr("TBR_CLOSE") ); fileCloseAction->setStatusTip( QObject::tr("TBR_CLOSE") ); fileCloseAction->setShortcut( QObject::tr("CTRL+W") ); - connect( fileCloseAction, SIGNAL( activated() ) , this, SLOT( onCloseWindow() ) ); + connect( fileCloseAction, SIGNAL( triggered() ) , this, SLOT( onCloseWindow() ) ); myStdActions.insert( FileCloseId, fileCloseAction ); fileQuitAction = new QAction( QObject::tr("MNU_QUIT"), this ); fileQuitAction->setToolTip( QObject::tr("TBR_QUIT") ); fileQuitAction->setStatusTip( QObject::tr("TBR_QUIT") ); fileQuitAction->setShortcut( QObject::tr("CTRL+Q") ); - connect( fileQuitAction, SIGNAL( activated() ) , qApp, SLOT( closeAllWindows() ) ); + connect( fileQuitAction, SIGNAL( triggered() ) , qApp, SLOT( closeAllWindows() ) ); myStdActions.insert( FileQuitId, fileQuitAction ); viewToolAction = new QAction( QObject::tr("MNU_TOOL_BAR"), this ); viewToolAction->setToolTip( QObject::tr("TBR_TOOL_BAR") ); viewToolAction->setStatusTip( QObject::tr("TBR_TOOL_BAR") ); - connect( viewToolAction, SIGNAL( activated() ) , this, SLOT( onViewToolBar() )); + connect( viewToolAction, SIGNAL( triggered() ) , this, SLOT( onViewToolBar() )); viewToolAction->setCheckable( true ); viewToolAction->setChecked( true ); myStdActions.insert( ViewToolId, viewToolAction ); @@ -96,7 +96,7 @@ void ApplicationCommonWindow::createStandardOperations() viewStatusAction = new QAction( QObject::tr("MNU_STATUS_BAR"), this ); viewStatusAction->setToolTip( QObject::tr("TBR_STATUS_BAR") ); viewStatusAction->setStatusTip( QObject::tr("TBR_STATUS_BAR") ); - connect( viewStatusAction, SIGNAL( activated() ), this, SLOT( onViewStatusBar() )); + connect( viewStatusAction, SIGNAL( triggered() ), this, SLOT( onViewStatusBar() )); viewStatusAction->setCheckable( true ); viewStatusAction->setChecked( true ); myStdActions.insert( ViewStatusId, viewStatusAction ); @@ -105,7 +105,7 @@ void ApplicationCommonWindow::createStandardOperations() helpAboutAction->setToolTip( QObject::tr( "TBR_ABOUT" ) ); helpAboutAction->setStatusTip( QObject::tr( "TBR_ABOUT" ) ); helpAboutAction->setShortcut( QObject::tr( "F1" ) ); - connect( helpAboutAction, SIGNAL( activated() ) , this, SLOT( onAbout() ) ); + connect( helpAboutAction, SIGNAL( triggered() ) , this, SLOT( onAbout() ) ); myStdActions.insert( HelpAboutId, helpAboutAction ); // popuplate a menu with all actions @@ -151,37 +151,37 @@ void ApplicationCommonWindow::createCasCadeOperations() a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_WIRE") ), QObject::tr("MNU_TOOL_WIRE"), this ); a->setToolTip( QObject::tr("TBR_TOOL_WIRE") ); a->setStatusTip( QObject::tr("TBR_TOOL_WIRE") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolWireframeId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_SHAD") ), QObject::tr("MNU_TOOL_SHAD"), this ); a->setToolTip( QObject::tr("TBR_TOOL_SHAD") ); a->setStatusTip( QObject::tr("TBR_TOOL_SHAD") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolShadingId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_COLOR") ), QObject::tr("MNU_TOOL_COLOR"), this ); a->setToolTip( QObject::tr("TBR_TOOL_COLOR") ); a->setStatusTip( QObject::tr("TBR_TOOL_COLOR") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolColorId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_MATER") ), QObject::tr("MNU_TOOL_MATER"), this ); a->setToolTip( QObject::tr("TBR_TOOL_MATER") ); a->setStatusTip( QObject::tr("TBR_TOOL_MATER") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolMaterialId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_TRANS") ), QObject::tr("MNU_TOOL_TRANS"), this ); a->setToolTip( QObject::tr("TBR_TOOL_TRANS") ); a->setStatusTip( QObject::tr("TBR_TOOL_TRANS") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolTransparencyId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_DEL") ), QObject::tr("MNU_TOOL_DEL"), this ); a->setToolTip( QObject::tr("TBR_TOOL_DEL") ); a->setStatusTip( QObject::tr("TBR_TOOL_DEL") ); - connect( a, SIGNAL( activated() ) , this, SLOT( onToolAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onToolAction() ) ); myToolActions.insert( ToolDeleteId, a ); QSignalMapper* sm = new QSignalMapper( this ); @@ -191,56 +191,56 @@ void ApplicationCommonWindow::createCasCadeOperations() a->setToolTip( QObject::tr("TBR_BRASS") ); a->setStatusTip( QObject::tr("TBR_BRASS") ); sm->setMapping( a,(int)Graphic3d_NOM_BRASS ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_BRASS, a ); a = new QAction( QObject::tr("MNU_BRONZE"), this ); a->setToolTip( QObject::tr("TBR_BRONZE") ); a->setStatusTip( QObject::tr("TBR_BRONZE") ); sm->setMapping( a, ( int )Graphic3d_NOM_BRONZE ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_BRONZE, a ); a = new QAction( QObject::tr("MNU_COPPER"), this ); a->setToolTip( QObject::tr("TBR_COPPER") ); a->setStatusTip( QObject::tr("TBR_COPER") ); sm->setMapping( a, ( int )Graphic3d_NOM_COPPER ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_COPPER, a ); a = new QAction( QObject::tr("MNU_GOLD"), this ); a->setToolTip( QObject::tr("TBR_GOLD") ); a->setStatusTip( QObject::tr("TBR_GOLD") ); sm->setMapping( a, ( int )Graphic3d_NOM_GOLD ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_GOLD, a ); a = new QAction( QObject::tr("MNU_PEWTER"), this ); a->setToolTip( QObject::tr("TBR_PEWTER") ); a->setStatusTip( QObject::tr("TBR_PEWTER") ); sm->setMapping( a, ( int )Graphic3d_NOM_PEWTER ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_PEWTER, a ); a = new QAction( QObject::tr("MNU_PLASTER"), this ); a->setToolTip( QObject::tr("TBR_PLASTER") ); a->setStatusTip( QObject::tr("TBR_PLASTER") ); sm->setMapping( a, ( int )Graphic3d_NOM_PLASTER ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_PLASTER, a ); a = new QAction( QObject::tr("MNU_PLASTIC"), this ); a->setToolTip( QObject::tr("TBR_PLASTIC") ); a->setStatusTip( QObject::tr("TBR_PLASTIC") ); sm->setMapping( a, ( int )Graphic3d_NOM_PLASTIC ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_PLASTIC, a ); a = new QAction( QObject::tr("MNU_SILVER"), this ); a->setToolTip( QObject::tr("TBR_SILVER") ); a->setStatusTip( QObject::tr("TBR_SILVER") ); sm->setMapping( a, ( int )Graphic3d_NOM_SILVER ); - connect( a, SIGNAL( activated() ), sm, SLOT( map() ) ); + connect( a, SIGNAL( triggered() ), sm, SLOT( map() ) ); myMaterialActions.insert( Graphic3d_NOM_SILVER, a ); for ( int i = 0; i < myToolActions.size(); i++ ) @@ -278,19 +278,19 @@ void ApplicationCommonWindow::windowsMenuAboutToShow() a = new QAction( QPixmap( dir + QObject::tr( "ICON_WINDOW_NEW3D" ) ), QObject::tr( "MNU_WINDOW_NEW3D" ), this ); a->setToolTip( QObject::tr( "TBR_WINDOW_NEW3D" ) ); a->setStatusTip( QObject::tr( "TBR_WINDOW_NEW3D" ) ); - connect( a, SIGNAL( activated() ), this, SLOT( onCreateNewView() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onCreateNewView() ) ); myWindowPopup->addAction( a ); a = new QAction( QPixmap( dir + QObject::tr( "ICON_WINDOW_CASCADE" ) ), QObject::tr( "MNU_WINDOW_CASCADE" ), this ); a->setToolTip( QObject::tr( "TBR_WINDOW_CASCADE" ) ); a->setStatusTip( QObject::tr( "TBR_WINDOW_CASCADE" ) ); - connect( a, SIGNAL( activated() ), stWs, SLOT( cascade() ) ); + connect( a, SIGNAL( triggered() ), stWs, SLOT( cascade() ) ); myWindowPopup->addAction( a ); a = new QAction( QPixmap( dir + QObject::tr( "ICON_WINDOW_TILE" ) ), QObject::tr( "MNU_WINDOW_TILE" ), this ); a->setToolTip( QObject::tr( "TBR_WINDOW_TILE" ) ); a->setStatusTip( QObject::tr( "TBR_WINDOW_TILE" ) ); - connect( a, SIGNAL( activated() ), stWs, SLOT( tile() ) ); + connect( a, SIGNAL( triggered() ), stWs, SLOT( tile() ) ); myWindowPopup->addAction( a ); myWindowPopup->addSeparator(); diff --git a/samples/qt/Common/src/DocumentCommon.cxx b/samples/qt/Common/src/DocumentCommon.cxx index 83f7efe473..d8de9df361 100755 --- a/samples/qt/Common/src/DocumentCommon.cxx +++ b/samples/qt/Common/src/DocumentCommon.cxx @@ -86,7 +86,7 @@ void DocumentCommon::onCreateNewView() connect( w, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); connect( w, SIGNAL( message( const QString&, int ) ), - myApp->statusBar(), SLOT( message( const QString&, int ) ) ); + myApp->statusBar(), SLOT( showMessage( const QString&, int ) ) ); connect( w, SIGNAL( sendCloseView( MDIWindow* ) ), this, SLOT( onCloseView( MDIWindow* ) ) ); diff --git a/samples/qt/Common/src/View.cxx b/samples/qt/Common/src/View.cxx index 947f2615af..a881a83543 100755 --- a/samples/qt/Common/src/View.cxx +++ b/samples/qt/Common/src/View.cxx @@ -383,13 +383,13 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_FITALL") ), QObject::tr("MNU_FITALL"), this ); a->setToolTip( QObject::tr("TBR_FITALL") ); a->setStatusTip( QObject::tr("TBR_FITALL") ); - connect( a, SIGNAL( activated() ) , this, SLOT( fitAll() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( fitAll() ) ); myViewActions->insert(ViewFitAllId, a); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_FITAREA") ), QObject::tr("MNU_FITAREA"), this ); a->setToolTip( QObject::tr("TBR_FITAREA") ); a->setStatusTip( QObject::tr("TBR_FITAREA") ); - connect( a, SIGNAL( activated() ) , this, SLOT( fitArea() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( fitArea() ) ); a->setCheckable( true ); connect( a, SIGNAL( toggled( bool ) ) , this, SLOT( updateToggled( bool ) ) ); @@ -398,7 +398,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_ZOOM") ), QObject::tr("MNU_ZOOM"), this ); a->setToolTip( QObject::tr("TBR_ZOOM") ); a->setStatusTip( QObject::tr("TBR_ZOOM") ); - connect( a, SIGNAL( activated() ) , this, SLOT( zoom() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( zoom() ) ); a->setCheckable( true ); connect( a, SIGNAL( toggled(bool) ) , this, SLOT( updateToggled(bool) ) ); @@ -407,7 +407,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_PAN") ), QObject::tr("MNU_PAN"), this ); a->setToolTip( QObject::tr("TBR_PAN") ); a->setStatusTip( QObject::tr("TBR_PAN") ); - connect( a, SIGNAL( activated() ) , this, SLOT( pan() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( pan() ) ); a->setCheckable( true ); connect( a, SIGNAL( toggled(bool) ) , this, SLOT( updateToggled(bool) ) ); @@ -416,7 +416,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_GLOBALPAN") ), QObject::tr("MNU_GLOBALPAN"), this ); a->setToolTip( QObject::tr("TBR_GLOBALPAN") ); a->setStatusTip( QObject::tr("TBR_GLOBALPAN") ); - connect( a, SIGNAL( activated() ) , this, SLOT( globalPan() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( globalPan() ) ); a->setCheckable( true ); connect( a, SIGNAL( toggled(bool) ) , this, SLOT( updateToggled(bool) ) ); @@ -425,49 +425,49 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_FRONT") ), QObject::tr("MNU_FRONT"), this ); a->setToolTip( QObject::tr("TBR_FRONT") ); a->setStatusTip( QObject::tr("TBR_FRONT") ); - connect( a, SIGNAL( activated() ) , this, SLOT( front() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( front() ) ); myViewActions->insert( ViewFrontId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_BACK") ), QObject::tr("MNU_BACK"), this ); a->setToolTip( QObject::tr("TBR_BACK") ); a->setStatusTip( QObject::tr("TBR_BACK") ); - connect( a, SIGNAL( activated() ) , this, SLOT( back() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( back() ) ); myViewActions->insert(ViewBackId, a); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_TOP") ), QObject::tr("MNU_TOP"), this ); a->setToolTip( QObject::tr("TBR_TOP") ); a->setStatusTip( QObject::tr("TBR_TOP") ); - connect( a, SIGNAL( activated() ) , this, SLOT( top() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( top() ) ); myViewActions->insert( ViewTopId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_BOTTOM") ), QObject::tr("MNU_BOTTOM"), this ); a->setToolTip( QObject::tr("TBR_BOTTOM") ); a->setStatusTip( QObject::tr("TBR_BOTTOM") ); - connect( a, SIGNAL( activated() ) , this, SLOT( bottom() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( bottom() ) ); myViewActions->insert( ViewBottomId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_LEFT") ), QObject::tr("MNU_LEFT"), this ); a->setToolTip( QObject::tr("TBR_LEFT") ); a->setStatusTip( QObject::tr("TBR_LEFT") ); - connect( a, SIGNAL( activated() ) , this, SLOT( left() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( left() ) ); myViewActions->insert( ViewLeftId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_RIGHT") ), QObject::tr("MNU_RIGHT"), this ); a->setToolTip( QObject::tr("TBR_RIGHT") ); a->setStatusTip( QObject::tr("TBR_RIGHT") ); - connect( a, SIGNAL( activated() ) , this, SLOT( right() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( right() ) ); myViewActions->insert( ViewRightId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_AXO") ), QObject::tr("MNU_AXO"), this ); a->setToolTip( QObject::tr("TBR_AXO") ); a->setStatusTip( QObject::tr("TBR_AXO") ); - connect( a, SIGNAL( activated() ) , this, SLOT( axo() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( axo() ) ); myViewActions->insert( ViewAxoId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_ROTATION") ), QObject::tr("MNU_ROTATION"), this ); a->setToolTip( QObject::tr("TBR_ROTATION") ); a->setStatusTip( QObject::tr("TBR_ROTATION") ); - connect( a, SIGNAL( activated() ) , this, SLOT( rotation() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( rotation() ) ); a->setCheckable( true ); connect( a, SIGNAL( toggled(bool) ) , this, SLOT( updateToggled(bool) ) ); myViewActions->insert( ViewRotationId, a ); @@ -475,7 +475,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_RESET") ), QObject::tr("MNU_RESET"), this ); a->setToolTip( QObject::tr("TBR_RESET") ); a->setStatusTip( QObject::tr("TBR_RESET") ); - connect( a, SIGNAL( activated() ) , this, SLOT( reset() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( reset() ) ); myViewActions->insert( ViewResetId, a ); QActionGroup* ag = new QActionGroup( this ); @@ -483,7 +483,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_HLROFF") ), QObject::tr("MNU_HLROFF"), this ); a->setToolTip( QObject::tr("TBR_HLROFF") ); a->setStatusTip( QObject::tr("TBR_HLROFF") ); - connect( a, SIGNAL( activated() ) , this, SLOT( hlrOff() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( hlrOff() ) ); a->setCheckable( true ); ag->addAction(a); myViewActions->insert(ViewHlrOffId, a); @@ -491,7 +491,7 @@ void View::initViewActions() a = new QAction( QPixmap( dir+QObject::tr("ICON_VIEW_HLRON") ), QObject::tr("MNU_HLRON"), this ); a->setToolTip( QObject::tr("TBR_HLRON") ); a->setStatusTip( QObject::tr("TBR_HLRON") ); - connect( a, SIGNAL( activated() ) ,this, SLOT( hlrOn() ) ); + connect( a, SIGNAL( triggered() ) ,this, SLOT( hlrOn() ) ); a->setCheckable( true ); ag->addAction(a); @@ -850,7 +850,7 @@ void View::Popup( const int /*x*/, const int /*y*/ ) QMenu* myBackMenu = new QMenu( 0 ); QAction* a = new QAction( QObject::tr("MNU_CH_BACK"), this ); a->setToolTip( QObject::tr("TBR_CH_BACK") ); - connect( a,SIGNAL( activated() ), this, SLOT( onBackground() ) ); + connect( a,SIGNAL( triggered() ), this, SLOT( onBackground() ) ); myBackMenu->addAction( a ); addItemInPopup(myBackMenu); myBackMenu->exec( QCursor::pos() ); diff --git a/samples/qt/IESample/IESample.pro b/samples/qt/IESample/IESample.pro index f820bdc2e0..e854dce397 100755 --- a/samples/qt/IESample/IESample.pro +++ b/samples/qt/IESample/IESample.pro @@ -1,6 +1,5 @@ TEMPLATE = app CONFIG += debug_and_release qt -QT += qt3support TARGET = IESample diff --git a/samples/qt/Interface/src/Application.cxx b/samples/qt/Interface/src/Application.cxx index 06b2be88bb..a3655dc730 100755 --- a/samples/qt/Interface/src/Application.cxx +++ b/samples/qt/Interface/src/Application.cxx @@ -28,61 +28,61 @@ void ApplicationWindow::createTranslatePopups() QAction* a; a = new QAction( QObject::tr("MNU_IMPORT_BREP"), this ); a->setStatusTip( QObject::tr("TBR_IMPORT_BREP") ); - connect( a, SIGNAL( activated() ), this, SLOT( onImport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onImport() ) ); myCasCadeTranslateActions.insert( FileImportBREPId, a ); myImportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_BREP"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_BREP") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportBREPId, a ); myExportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_IMPORT_CSFDB"), this ); a->setStatusTip( QObject::tr("TBR_IMPORT_CSFDB") ); - connect( a, SIGNAL( activated() ), this, SLOT( onImport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onImport() ) ); myCasCadeTranslateActions.insert( FileImportCSFDBId, a ); myImportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_CSFDB"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_CSFDB") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportCSFDBId, a ); myExportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_IMPORT_IGES"), this ); a->setStatusTip( QObject::tr("TBR_IMPORT_IGES") ); - connect( a, SIGNAL( activated() ), this, SLOT( onImport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onImport() ) ); myCasCadeTranslateActions.insert( FileImportIGESId, a ); myImportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_IGES"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_IGES") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportIGESId, a ); myExportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_IMPORT_STEP"), this ); a->setStatusTip( QObject::tr("TBR_IMPORT_STEP") ); - connect( a, SIGNAL( activated() ), this, SLOT( onImport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onImport() ) ); myCasCadeTranslateActions.insert( FileImportSTEPId, a ); myImportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_STEP"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_STEP") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportSTEPId, a ); myExportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_STL"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_STL") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportSTLId, a ); myExportPopup->addAction( a ); a = new QAction( QObject::tr("MNU_EXPORT_VRML"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_VRML") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExport() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExport() ) ); myCasCadeTranslateActions.insert( FileExportVRMLId, a ); myExportPopup->addAction( a ); @@ -90,7 +90,7 @@ void ApplicationWindow::createTranslatePopups() a = new QAction( QObject::tr("MNU_EXPORT_IMAGE"), this ); a->setStatusTip( QObject::tr("TBR_EXPORT_IMAGE") ); - connect( a, SIGNAL( activated() ), this, SLOT( onExportImage() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onExportImage() ) ); myExportPopup->addAction( a ); } diff --git a/samples/qt/Interface/src/Translate.cxx b/samples/qt/Interface/src/Translate.cxx index de0c6fa9bd..25f5e8092a 100755 --- a/samples/qt/Interface/src/Translate.cxx +++ b/samples/qt/Interface/src/Translate.cxx @@ -481,7 +481,7 @@ Handle(TopTools_HSequenceOfShape) Translate::importCSFDB( const QString& file ) if ( FSD_File::IsGoodFileType( (Standard_CString)file.toLatin1().constData() ) != Storage_VSOk ) return aSequence; - static FSD_File fileDriver; + FSD_File fileDriver; TCollection_AsciiString aName( (Standard_CString)file.toLatin1().constData() ); if ( fileDriver.Open( aName, Storage_VSRead ) != Storage_VSOk ) return aSequence; @@ -591,7 +591,7 @@ bool Translate::exportCSFDB( const QString& file, const Handle(TopTools_HSequenc if ( type < 0 ) return false; - static FSD_File fileDriver; + FSD_File fileDriver; Handle(ShapeSchema) schema = new ShapeSchema(); Handle(Storage_Data) data = new Storage_Data(); diff --git a/samples/qt/Tutorial/Tutorial-vc9.sln b/samples/qt/Tutorial/Tutorial-vc9.sln index f1ef1ba3ef..cef63e51f9 100644 --- a/samples/qt/Tutorial/Tutorial-vc9.sln +++ b/samples/qt/Tutorial/Tutorial-vc9.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcproj", "{28627D0B-F82A-39D5-A15D-DDAFA11059E7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -8,10 +8,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Debug|Win32.Build.0 = Debug|Win32 - {59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Release|Win32.ActiveCfg = Release|Win32 - {59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Release|Win32.Build.0 = Release|Win32 + {28627D0B-F82A-39D5-A15D-DDAFA11059E7}.Debug|Win32.ActiveCfg = Debug|Win32 + {28627D0B-F82A-39D5-A15D-DDAFA11059E7}.Debug|Win32.Build.0 = Debug|Win32 + {28627D0B-F82A-39D5-A15D-DDAFA11059E7}.Release|Win32.ActiveCfg = Release|Win32 + {28627D0B-F82A-39D5-A15D-DDAFA11059E7}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/qt/Tutorial/Tutorial.pro b/samples/qt/Tutorial/Tutorial.pro index 25793b970a..07157c1a24 100755 --- a/samples/qt/Tutorial/Tutorial.pro +++ b/samples/qt/Tutorial/Tutorial.pro @@ -1,6 +1,5 @@ TEMPLATE = app CONFIG += debug_and_release qt -QT += qt3support TARGET = Tutorial diff --git a/samples/qt/Tutorial/src/ApplicationTut.cxx b/samples/qt/Tutorial/src/ApplicationTut.cxx index 663f14297f..a20891b732 100755 --- a/samples/qt/Tutorial/src/ApplicationTut.cxx +++ b/samples/qt/Tutorial/src/ApplicationTut.cxx @@ -23,7 +23,7 @@ void ApplicationTut::createMakeBottleOperation(){ MakeBottleAction->setToolTip( QObject::tr( "TBR_MAKEBOT" ) ); MakeBottleAction->setStatusTip( QObject::tr("TBR_MAKEBOT") ); MakeBottleAction->setShortcut( QObject::tr( "CTRL+M" ) ); - connect( MakeBottleAction, SIGNAL( activated() ) , this, SLOT( onMakeBottleAction() ) ); + connect( MakeBottleAction, SIGNAL( triggered() ) , this, SLOT( onMakeBottleAction() ) ); myMakeBottleBar = addToolBar( tr( "Make Bottle" ) ); insertToolBar( getCasCadeBar(), myMakeBottleBar ); diff --git a/samples/qt/VoxelDemo/VoxelDemo.pro b/samples/qt/VoxelDemo/VoxelDemo.pro new file mode 100644 index 0000000000..0fd2318781 --- /dev/null +++ b/samples/qt/VoxelDemo/VoxelDemo.pro @@ -0,0 +1,165 @@ +TEMPLATE = app +CONFIG += debug_and_release qt opengl + +TARGET = VoxelDemo + +SAMPLESROOT = $$(CASROOT)/samples/qt + +HEADERS = $${SAMPLESROOT}/voxeldemo/src/*.h + +SOURCES = $${SAMPLESROOT}/voxeldemo/src/*.cxx \ + $${SAMPLESROOT}/voxeldemo/src/*.cpp + + +INCLUDEPATH += $$quote($${SAMPLESROOT}/voxeldemo/src) + +DEFINES = CSFDB + +unix { + UNAME = $$system(uname -s) + INCLUDES = $$(CSF_OPT_INC) + PATHS = $$split(INCLUDES,":") + for(path, PATHS):INCLUDEPATH += $${path} + LIBLIST = $$(LD_LIBRARY_PATH) + LIBPATHS = $$split(LIBLIST,":") + for(lib, LIBPATHS):LIBS += -L$${lib} + + CONFIG(debug, debug|release) { + DESTDIR = ./$$UNAME/bind + OBJECTS_DIR = ./$$UNAME/objd + MOC_DIR = ./$$UNAME/srcd + } else { + DESTDIR = ./$$UNAME/bin + OBJECTS_DIR = ./$$UNAME/obj + MOC_DIR = ./$$UNAME/src + } + + MACOSX_USE_GLX = $$(MACOSX_USE_GLX) + + !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD + !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL + equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX + DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL + !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD + LIBS += -lfreeimageplus + LIBS += -ltbb -ltbbmalloc +} + +win32 { + INCLUDES = $$(CSF_OPT_INC) + PATHS = $$split(INCLUDES,";") + for(path, PATHS):INCLUDEPATH += $${path} + + CONFIG(debug, debug|release) { + DEFINES += _DEBUG + !contains(QMAKE_HOST.arch, x86_64) { + LIBS = -L$(CSF_OPT_LIB32D) + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1310) { + DESTDIR = ./win32/vc7/bind + OBJECTS_DIR = ./win32/vc7/objd + MOC_DIR = ./win32/vc7/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) { + DESTDIR = ./win32/vc8/bind + OBJECTS_DIR = ./win32/vc8/objd + MOC_DIR = ./win32/vc8/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) { + DESTDIR = ./win32/vc9/bind + OBJECTS_DIR = ./win32/vc9/objd + MOC_DIR = ./win32/vc9/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) { + DESTDIR = ./win32/vc10/bind + OBJECTS_DIR = ./win32/vc10/objd + MOC_DIR = ./win32/vc10/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) { + DESTDIR = ./win32/vc11/bind + OBJECTS_DIR = ./win32/vc11/objd + MOC_DIR = ./win32/vc11/srcd + } + } else { + LIBS = -L$(CSF_OPT_LIB64D) + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) { + DESTDIR = ./win64/vc8/bind + OBJECTS_DIR = ./win64/vc8/objd + MOC_DIR = ./win64/vc8/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) { + DESTDIR = ./win64/vc9/bind + OBJECTS_DIR = ./win64/vc9/objd + MOC_DIR = ./win64/vc9/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) { + DESTDIR = ./win64/vc10/bind + OBJECTS_DIR = ./win64/vc10/objd + MOC_DIR = ./win64/vc10/srcd + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) { + DESTDIR = ./win64/vc11/bind + OBJECTS_DIR = ./win64/vc11/objd + MOC_DIR = ./win64/vc11/srcd + } + } + } else { + DEFINES += NDEBUG + !contains(QMAKE_HOST.arch, x86_64) { + LIBS = -L$(CSF_OPT_LIB32) + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1310) { + DESTDIR = ./win32/vc7/bin + OBJECTS_DIR = ./win32/vc7/obj + MOC_DIR = ./win32/vc7/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) { + DESTDIR = ./win32/vc8/bin + OBJECTS_DIR = ./win32/vc8/obj + MOC_DIR = ./win32/vc8/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) { + DESTDIR = ./win32/vc9/bin + OBJECTS_DIR = ./win32/vc9/obj + MOC_DIR = ./win32/vc9/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) { + DESTDIR = ./win32/vc10/bin + OBJECTS_DIR = ./win32/vc10/obj + MOC_DIR = ./win32/vc10/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) { + DESTDIR = ./win32/vc11/bin + OBJECTS_DIR = ./win32/vc11/obj + MOC_DIR = ./win32/vc11/src + } + } else { + LIBS = -L$(CSF_OPT_LIB64) + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) { + DESTDIR = ./win64/vc8/bin + OBJECTS_DIR = ./win64/vc8/obj + MOC_DIR = ./win64/vc8/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) { + DESTDIR = ./win64/vc9/bin + OBJECTS_DIR = ./win64/vc9/obj + MOC_DIR = ./win64/vc9/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) { + DESTDIR = ./win64/vc10/bin + OBJECTS_DIR = ./win64/vc10/obj + MOC_DIR = ./win64/vc10/src + } + contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) { + DESTDIR = ./win64/vc11/bin + OBJECTS_DIR = ./win64/vc11/obj + MOC_DIR = ./win64/vc11/src + } + } + } + DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS +} + +LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d \ + -lTKBRep -lTKGeomBase -lTKPShape -lTKTopAlgo -lTKPrim \ + -lTKBool -lTKVoxel -lTKOpenGl \ + +