From: imn Date: Wed, 17 Sep 2014 09:37:11 +0000 (+0400) Subject: Removed qt3 support and replaced qt macros X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fimn%2Fremoved_qt3_support;p=modules%2Fgui.git Removed qt3 support and replaced qt macros --- diff --git a/adm_local/cmake_files/deprecated/FindQT4.cmake b/adm_local/cmake_files/deprecated/FindQT4.cmake index d76a3d6f3..577fb6cab 100644 --- a/adm_local/cmake_files/deprecated/FindQT4.cmake +++ b/adm_local/cmake_files/deprecated/FindQT4.cmake @@ -26,7 +26,7 @@ SET(DIRS ${DIRS} -I${D}) ENDFOREACH(D ${QT_INCLUDES}) SET(QT_INCLUDES ${DIRS}) # to be removed SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) # to be removed -SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT) +SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT -DQT_NO_KEYWORDS) SET(QT_MT_LIBS ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY}) SET(QT_LIBS ${QT_MT_LIBS}) SET(qt4_ldflags ${QT_MT_LIBS}) diff --git a/src/CAF/CAF_Application.h b/src/CAF/CAF_Application.h index f80f316a4..852c45abf 100755 --- a/src/CAF/CAF_Application.h +++ b/src/CAF/CAF_Application.h @@ -50,10 +50,10 @@ public: virtual QString getFileFilter() const; -public slots: +public Q_SLOTS: virtual void onHelpAbout(); -protected slots: +protected Q_SLOTS: virtual bool onUndo( int ); virtual bool onRedo( int ); diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index f6bdc9688..f66b10e67 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -639,12 +639,12 @@ bool CAM_Application::isModuleAccessible( const QString& title ) QStringList somewhereLoaded; QList apps = SUIT_Session::session()->applications(); - foreach( SUIT_Application* app, apps ) { + Q_FOREACH( SUIT_Application* app, apps ) { CAM_Application* camApp = dynamic_cast( app ); if ( !camApp ) continue; QStringList loaded; camApp->modules( loaded, true ); - foreach( QString lm, loaded ) { + Q_FOREACH( QString lm, loaded ) { if ( !somewhereLoaded.contains( lm ) ) somewhereLoaded << lm; } } diff --git a/src/CAM/CAM_DataModel.cxx b/src/CAM/CAM_DataModel.cxx index 3c4bc8ef4..b4834bd7d 100755 --- a/src/CAM/CAM_DataModel.cxx +++ b/src/CAM/CAM_DataModel.cxx @@ -103,7 +103,7 @@ void CAM_DataModel::setRoot( const CAM_DataObject* newRoot ) myRoot->connect( SIGNAL( destroyed( SUIT_DataObject* ) ), this, SLOT( onDestroyed( SUIT_DataObject* ) ) ); - emit rootChanged( this ); + Q_EMIT rootChanged( this ); } /*! diff --git a/src/CAM/CAM_DataModel.h b/src/CAM/CAM_DataModel.h index bb70b5510..214fb6885 100755 --- a/src/CAM/CAM_DataModel.h +++ b/src/CAM/CAM_DataModel.h @@ -55,10 +55,10 @@ public: protected: virtual void setRoot( const CAM_DataObject* ); -private slots: +private Q_SLOTS: void onDestroyed( SUIT_DataObject* ); -signals: +Q_SIGNALS: void rootChanged( const CAM_DataModel* ); private: diff --git a/src/CAM/CAM_Module.h b/src/CAM/CAM_Module.h index 49fbaf4e7..3d81745c0 100755 --- a/src/CAM/CAM_Module.h +++ b/src/CAM/CAM_Module.h @@ -114,7 +114,7 @@ public: static QAction* separator(); -public slots: +public Q_SLOTS: virtual bool activateModule( SUIT_Study* ); virtual bool deactivateModule( SUIT_Study* ); @@ -125,7 +125,7 @@ public slots: virtual void onApplicationClosed( SUIT_Application* ); -private slots: +private Q_SLOTS: void onInfoChanged( QString ); protected: diff --git a/src/CAM/CAM_Study.h b/src/CAM/CAM_Study.h index 8f5ecd7cb..9332fbc51 100755 --- a/src/CAM/CAM_Study.h +++ b/src/CAM/CAM_Study.h @@ -62,7 +62,7 @@ protected: virtual bool openDataModel( const QString&, CAM_DataModel* ); virtual bool saveDataModel( const QString&, CAM_DataModel* ); -protected slots: +protected Q_SLOTS: virtual void updateModelRoot( const CAM_DataModel* ); private: diff --git a/src/GLViewer/GLViewer_Selector.h b/src/GLViewer/GLViewer_Selector.h index cf580c5e7..c0625f9e4 100644 --- a/src/GLViewer/GLViewer_Selector.h +++ b/src/GLViewer/GLViewer_Selector.h @@ -77,7 +77,7 @@ public: static int appendKey() { return apppendKey; } static void setAppendKey( int k ) { apppendKey = k; } -signals: +Q_SIGNALS: void selSelectionCancel(); void selSelectionDone( bool append, SelectionChangeStatus status ); diff --git a/src/GLViewer/GLViewer_Selector2d.cxx b/src/GLViewer/GLViewer_Selector2d.cxx index 96301415e..a2ab04316 100644 --- a/src/GLViewer/GLViewer_Selector2d.cxx +++ b/src/GLViewer/GLViewer_Selector2d.cxx @@ -163,7 +163,7 @@ void GLViewer_Selector2d::unselectAll() // bool lcOpen = ( myAISContext->IndexOfCurrentLocal() != -1 ); // lcOpen ? myAISContext->ClearSelected( updateViewer ) : // myAISContext->ClearCurrent( updateViewer ); - if ( hadSelection ) emit selSelectionCancel(); + if ( hadSelection ) Q_EMIT selSelectionCancel(); } /*! @@ -174,16 +174,16 @@ void GLViewer_Selector2d::checkSelection( int selBefore, bool append, int aStatu { int selAfter = numSelected(); if ( selBefore > 0 && selAfter < 1 ) - emit selSelectionCancel(); + Q_EMIT selSelectionCancel(); else if ( selAfter > 0 ) { switch( aStatus ) { case SS_LocalChanged: - emit selSelectionDone( selAfter > 1, SCS_Local ); + Q_EMIT selSelectionDone( selAfter > 1, SCS_Local ); break; case SS_GlobalChanged: - emit selSelectionDone( selAfter > 1, SCS_Global ); + Q_EMIT selSelectionDone( selAfter > 1, SCS_Global ); break; } } diff --git a/src/GLViewer/GLViewer_ToolTip.h b/src/GLViewer/GLViewer_ToolTip.h index aa16a6eb2..882ec53c3 100644 --- a/src/GLViewer/GLViewer_ToolTip.h +++ b/src/GLViewer/GLViewer_ToolTip.h @@ -67,7 +67,7 @@ private: void hideTipAndSleep(); void wakeup( int mseconds = TIP_TIME ); -private slots: +private Q_SLOTS: void showTip(); private: diff --git a/src/GLViewer/GLViewer_ViewFrame.cxx b/src/GLViewer/GLViewer_ViewFrame.cxx index f0a23b919..22374f405 100644 --- a/src/GLViewer/GLViewer_ViewFrame.cxx +++ b/src/GLViewer/GLViewer_ViewFrame.cxx @@ -349,16 +349,16 @@ void GLViewer_ViewFrame::mouseEvent( QMouseEvent* e ) switch ( e->type() ) { case QEvent::MouseButtonPress: - emit mousePressed( this, e ); + Q_EMIT mousePressed( this, e ); break; case QEvent::MouseButtonRelease: - emit mouseReleased( this, e ); + Q_EMIT mouseReleased( this, e ); break; case QEvent::MouseButtonDblClick: - emit mouseDoubleClicked( this, e ); + Q_EMIT mouseDoubleClicked( this, e ); break; case QEvent::MouseMove: - emit mouseMoving( this, e ); + Q_EMIT mouseMoving( this, e ); break; default: break; @@ -373,10 +373,10 @@ void GLViewer_ViewFrame::keyEvent( QKeyEvent* e ) switch ( e->type() ) { case QEvent::KeyPress: - emit keyPressed( this, e ); + Q_EMIT keyPressed( this, e ); break; case QEvent::KeyRelease: - emit keyReleased( this, e ); + Q_EMIT keyReleased( this, e ); break; default: break; @@ -391,7 +391,7 @@ void GLViewer_ViewFrame::wheelEvent( QWheelEvent* e ) switch ( e->type() ) { case QEvent::Wheel: - emit wheeling( this, e ); + Q_EMIT wheeling( this, e ); break; default: break; diff --git a/src/GLViewer/GLViewer_ViewFrame.h b/src/GLViewer/GLViewer_ViewFrame.h index 23da74524..b752da69a 100644 --- a/src/GLViewer/GLViewer_ViewFrame.h +++ b/src/GLViewer/GLViewer_ViewFrame.h @@ -79,7 +79,7 @@ public: virtual QImage dumpView(); -signals: +Q_SIGNALS: void vfDrawExternal( QPainter* ); void vfViewClosing( QCloseEvent* ); @@ -91,7 +91,7 @@ public: //ViewType getTypeView() const { return VIEW_GL; }; QWidget* getViewWidget() { return ( QWidget* )getViewPort(); }; -protected slots: +protected Q_SLOTS: void onViewPan(); void onViewZoom(); void onViewFitAll(); @@ -108,7 +108,7 @@ protected slots: void onViewTop() {}; void onViewTrihedron() {}; -private slots: +private Q_SLOTS: void keyEvent( QKeyEvent* ); void mouseEvent( QMouseEvent* ); void wheelEvent( QWheelEvent* ); diff --git a/src/GLViewer/GLViewer_ViewPort.cxx b/src/GLViewer/GLViewer_ViewPort.cxx index 99a68b751..02a5e4f79 100644 --- a/src/GLViewer/GLViewer_ViewPort.cxx +++ b/src/GLViewer/GLViewer_ViewPort.cxx @@ -493,7 +493,7 @@ void GLViewer_ViewPort::setTransformEnabled( bool enable ) */ void GLViewer_ViewPort::mousePressEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -501,7 +501,7 @@ void GLViewer_ViewPort::mousePressEvent( QMouseEvent *e ) */ void GLViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -509,7 +509,7 @@ void GLViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) */ void GLViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); /* show popup menu */ if ( e->button() == Qt::RightButton ) @@ -526,7 +526,7 @@ void GLViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) */ void GLViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -534,7 +534,7 @@ void GLViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) */ void GLViewer_ViewPort::keyPressEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + Q_EMIT vpKeyEvent( e ); } /*! @@ -542,7 +542,7 @@ void GLViewer_ViewPort::keyPressEvent( QKeyEvent *e ) */ void GLViewer_ViewPort::keyReleaseEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + Q_EMIT vpKeyEvent( e ); } /*! @@ -550,7 +550,7 @@ void GLViewer_ViewPort::keyReleaseEvent( QKeyEvent *e ) */ void GLViewer_ViewPort::wheelEvent( QWheelEvent *e ) { - emit vpWheelEvent( e ); + Q_EMIT vpWheelEvent( e ); } /*! @@ -561,7 +561,7 @@ void GLViewer_ViewPort::paintEvent( QPaintEvent* ) if ( myPaintersRedrawing ) { QPainter p( this ); - emit vpDrawExternal( &p ); + Q_EMIT vpDrawExternal( &p ); myPaintersRedrawing = false; } } @@ -598,5 +598,5 @@ void GLViewer_ViewPort::onChangeBgColor() void GLViewer_ViewPort::contextMenuEvent( QContextMenuEvent* e ) { //if ( e->reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( e ); + Q_EMIT contextMenuRequested( e ); } diff --git a/src/GLViewer/GLViewer_ViewPort.h b/src/GLViewer/GLViewer_ViewPort.h index 45eb2ee32..fd9775bda 100644 --- a/src/GLViewer/GLViewer_ViewPort.h +++ b/src/GLViewer/GLViewer_ViewPort.h @@ -139,10 +139,10 @@ protected: virtual void fitSelect() = 0; virtual void fitAll( bool keepScale = false, bool withZ = true ) = 0; -protected slots: +protected Q_SLOTS: virtual void onChangeBgColor(); -signals: +Q_SIGNALS: void vpKeyEvent( QKeyEvent* ); void vpMouseEvent( QMouseEvent* ); void vpWheelEvent( QWheelEvent* ); diff --git a/src/GLViewer/GLViewer_ViewPort2d.cxx b/src/GLViewer/GLViewer_ViewPort2d.cxx index aa9aa39bd..23dcfe9e5 100644 --- a/src/GLViewer/GLViewer_ViewPort2d.cxx +++ b/src/GLViewer/GLViewer_ViewPort2d.cxx @@ -332,7 +332,7 @@ void GLViewer_ViewPort2d::onDragObject( QMouseEvent* e ) */ void GLViewer_ViewPort2d::mousePressEvent( QMouseEvent* e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); GLViewer_Viewer2d* aViewer = (GLViewer_Viewer2d*)getViewFrame()->getViewer(); GLViewer_Context* aContext = aViewer->getGLContext(); @@ -354,7 +354,7 @@ void GLViewer_ViewPort2d::mousePressEvent( QMouseEvent* e ) */ void GLViewer_ViewPort2d::mouseMoveEvent( QMouseEvent* e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); if( myIsDragProcess == inDrag ) onDragObject( e ); @@ -400,7 +400,7 @@ void GLViewer_ViewPort2d::mouseReleaseEvent( QMouseEvent* e ) // popup->exec( QCursor::pos() ); //destroyPopup( /*popup*/ ); } - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); if( myIsDragProcess == inDrag ) { @@ -429,7 +429,7 @@ void GLViewer_ViewPort2d::mouseReleaseEvent( QMouseEvent* e ) if( isAnyMoved ) { - emit objectMoved(); + Q_EMIT objectMoved(); aViewer->updateBorders(); } } @@ -909,7 +909,7 @@ void GLViewer_ViewPort2d::fitAll( bool keepScale, bool withZ ) myGLWidget->updateGL(); if( keepScale ) - emit vpUpdateValues(); + Q_EMIT vpUpdateValues(); } /*! diff --git a/src/GLViewer/GLViewer_ViewPort2d.h b/src/GLViewer/GLViewer_ViewPort2d.h index d221a7a06..e85d82ca1 100644 --- a/src/GLViewer/GLViewer_ViewPort2d.h +++ b/src/GLViewer/GLViewer_ViewPort2d.h @@ -158,7 +158,7 @@ public: //! Transforms global rect to window rect QRect GLV2win( const GLViewer_Rect& ) const; -signals: +Q_SIGNALS: //! Emits after any transformation void vpUpdateValues(); @@ -190,7 +190,7 @@ protected: //! Transform view by view borders ( if \param keepScale = true, zoom does not change ) virtual void fitAll( bool keepScale = false, bool withZ = true ); -protected slots: +protected Q_SLOTS: //! Initializes drag process void onStartDragObject(); //! Pastes object from clipboard diff --git a/src/GLViewer/GLViewer_Viewer.cxx b/src/GLViewer/GLViewer_Viewer.cxx index 60efe28ee..dbb1b727f 100644 --- a/src/GLViewer/GLViewer_Viewer.cxx +++ b/src/GLViewer/GLViewer_Viewer.cxx @@ -335,7 +335,7 @@ bool GLViewer_Viewer::eventFilter( QObject* o, QEvent* e ) */ void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status ) { - emit selectionChanged( status ); + Q_EMIT selectionChanged( status ); } /*! @@ -343,7 +343,7 @@ void GLViewer_Viewer::onSelectionDone( bool bAdded, SelectionChangeStatus status */ void GLViewer_Viewer::onSelectionCancel() { - emit selectionChanged( SCS_Invalid ); + Q_EMIT selectionChanged( SCS_Invalid ); } /*! diff --git a/src/GLViewer/GLViewer_Viewer.h b/src/GLViewer/GLViewer_Viewer.h index 5ff8cb6e6..59e2f100c 100644 --- a/src/GLViewer/GLViewer_Viewer.h +++ b/src/GLViewer/GLViewer_Viewer.h @@ -89,7 +89,7 @@ public: GLViewer_ViewFrame* getActiveView() const; -signals: +Q_SIGNALS: void selectionChanged( SelectionChangeStatus ); protected: @@ -112,7 +112,7 @@ protected: virtual void finishOperations( QMouseEvent* ) {} virtual void startOperations( QWheelEvent* ) {} -protected slots: +protected Q_SLOTS: virtual void onKeyEvent( SUIT_ViewWindow*, QKeyEvent* ); virtual void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* ); virtual void onWheelEvent( SUIT_ViewWindow*, QWheelEvent* ); diff --git a/src/GLViewer/GLViewer_Viewer2d.cxx b/src/GLViewer/GLViewer_Viewer2d.cxx index 936621093..2c5224e6a 100644 --- a/src/GLViewer/GLViewer_Viewer2d.cxx +++ b/src/GLViewer/GLViewer_Viewer2d.cxx @@ -1011,7 +1011,7 @@ void GLViewer_Viewer2d::startOperations( QWheelEvent* e ) update = anObject->updateZoom( zoomIn ) || update; } - emit wheelZoomChange( zoomIn ); + Q_EMIT wheelZoomChange( zoomIn ); if( update ) updateAll(); diff --git a/src/GLViewer/GLViewer_Viewer2d.h b/src/GLViewer/GLViewer_Viewer2d.h index 3b6ba4b5b..49b4dbf02 100644 --- a/src/GLViewer/GLViewer_Viewer2d.h +++ b/src/GLViewer/GLViewer_Viewer2d.h @@ -176,12 +176,12 @@ public: //! Repaints view \param theView. If \param theView = NULL repaints all views. void repaintView( GLViewer_ViewFrame* theView = NULL, bool makeCurrent = false ); -signals: +Q_SIGNALS: //! Signal needs for optimum recompute of zoom depending objects //! Warning: use recompute without update viewer void wheelZoomChange( bool ); -public slots: +public Q_SLOTS: //void onSketchDelObject(); //void onSketchUndoLast(); //void onSketchFinish(); @@ -215,7 +215,7 @@ protected: //! Starts any operations on mouse wheel event virtual void startOperations( QWheelEvent* ); -protected slots: +protected Q_SLOTS: void onMouseEvent( SUIT_ViewWindow*, QMouseEvent* ); private: diff --git a/src/GraphicsView/GraphicsView_Scene.cxx b/src/GraphicsView/GraphicsView_Scene.cxx index a8a9959f9..e678bd877 100644 --- a/src/GraphicsView/GraphicsView_Scene.cxx +++ b/src/GraphicsView/GraphicsView_Scene.cxx @@ -67,7 +67,7 @@ GraphicsView_Scene::~GraphicsView_Scene() //================================================================ void GraphicsView_Scene::processRectChanged() { - emit gsBoundingRectChanged(); + Q_EMIT gsBoundingRectChanged(); } //================================================================ @@ -87,7 +87,7 @@ void GraphicsView_Scene::onSceneRectChanged( const QRectF& theRect ) //================================================================ void GraphicsView_Scene::keyPressEvent( QKeyEvent* e ) { - emit gsKeyEvent( e ); + Q_EMIT gsKeyEvent( e ); QGraphicsScene::keyPressEvent( e ); } @@ -97,7 +97,7 @@ void GraphicsView_Scene::keyPressEvent( QKeyEvent* e ) //================================================================ void GraphicsView_Scene::keyReleaseEvent( QKeyEvent* e ) { - emit gsKeyEvent( e ); + Q_EMIT gsKeyEvent( e ); QGraphicsScene::keyReleaseEvent( e ); } @@ -107,7 +107,7 @@ void GraphicsView_Scene::keyReleaseEvent( QKeyEvent* e ) //================================================================ void GraphicsView_Scene::mousePressEvent( QGraphicsSceneMouseEvent* e ) { - emit gsMouseEvent( e ); + Q_EMIT gsMouseEvent( e ); QGraphicsScene::mousePressEvent( e ); } @@ -117,7 +117,7 @@ void GraphicsView_Scene::mousePressEvent( QGraphicsSceneMouseEvent* e ) //================================================================ void GraphicsView_Scene::mouseMoveEvent( QGraphicsSceneMouseEvent* e ) { - emit gsMouseEvent( e ); + Q_EMIT gsMouseEvent( e ); QGraphicsScene::mouseMoveEvent( e ); } @@ -127,7 +127,7 @@ void GraphicsView_Scene::mouseMoveEvent( QGraphicsSceneMouseEvent* e ) //================================================================ void GraphicsView_Scene::mouseReleaseEvent( QGraphicsSceneMouseEvent* e ) { - emit gsMouseEvent( e ); + Q_EMIT gsMouseEvent( e ); QGraphicsScene::mouseReleaseEvent( e ); } @@ -137,7 +137,7 @@ void GraphicsView_Scene::mouseReleaseEvent( QGraphicsSceneMouseEvent* e ) //================================================================ void GraphicsView_Scene::mouseDoubleClickEvent( QGraphicsSceneMouseEvent* e ) { - emit gsMouseEvent( e ); + Q_EMIT gsMouseEvent( e ); QGraphicsScene::mouseDoubleClickEvent( e ); } @@ -147,7 +147,7 @@ void GraphicsView_Scene::mouseDoubleClickEvent( QGraphicsSceneMouseEvent* e ) //================================================================ void GraphicsView_Scene::wheelEvent( QGraphicsSceneWheelEvent* e ) { - emit gsWheelEvent( e ); + Q_EMIT gsWheelEvent( e ); // accept the event to prevent calling QAbstractScrollArea::wheelEvent() // from QGraphicsView::wheelEvent(), which will change values of scroll-bars @@ -162,7 +162,7 @@ void GraphicsView_Scene::wheelEvent( QGraphicsSceneWheelEvent* e ) //================================================================ void GraphicsView_Scene::contextMenuEvent( QGraphicsSceneContextMenuEvent* e ) { - emit gsContextMenuEvent( e ); + Q_EMIT gsContextMenuEvent( e ); QGraphicsScene::contextMenuEvent( e ); } diff --git a/src/GraphicsView/GraphicsView_Scene.h b/src/GraphicsView/GraphicsView_Scene.h index ebc57cf8b..ad4ee1dfd 100644 --- a/src/GraphicsView/GraphicsView_Scene.h +++ b/src/GraphicsView/GraphicsView_Scene.h @@ -41,7 +41,7 @@ public: public: void processRectChanged(); -protected slots: +protected Q_SLOTS: void onSceneRectChanged( const QRectF& theRect ); // for debug protected: @@ -59,7 +59,7 @@ protected: virtual void dragMoveEvent( QGraphicsSceneDragDropEvent* ); virtual void dropEvent( QGraphicsSceneDragDropEvent* ); -signals: +Q_SIGNALS: void gsKeyEvent( QKeyEvent* ); void gsMouseEvent( QGraphicsSceneMouseEvent* ); void gsWheelEvent( QGraphicsSceneWheelEvent* ); diff --git a/src/GraphicsView/GraphicsView_Selector.cxx b/src/GraphicsView/GraphicsView_Selector.cxx index dbfe620ab..03707d91d 100644 --- a/src/GraphicsView/GraphicsView_Selector.cxx +++ b/src/GraphicsView/GraphicsView_Selector.cxx @@ -96,7 +96,7 @@ void GraphicsView_Selector::unselectAll() return; if ( numSelected() > 0 ) - emit selSelectionCancel(); + Q_EMIT selSelectionCancel(); } //================================================================ @@ -107,16 +107,16 @@ void GraphicsView_Selector::checkSelection( int selBefore, bool append, int theS { int selAfter = numSelected(); if ( selBefore > 0 && selAfter < 1 ) - emit selSelectionCancel(); + Q_EMIT selSelectionCancel(); else if ( selAfter > 0 ) { switch( theStatus ) { case GVSS_LocalChanged: - emit selSelectionDone( GVSCS_Local ); + Q_EMIT selSelectionDone( GVSCS_Local ); break; case GVSS_GlobalChanged: - emit selSelectionDone( GVSCS_Global ); + Q_EMIT selSelectionDone( GVSCS_Global ); break; } } diff --git a/src/GraphicsView/GraphicsView_Selector.h b/src/GraphicsView/GraphicsView_Selector.h index 891acd58b..c67d398dd 100644 --- a/src/GraphicsView/GraphicsView_Selector.h +++ b/src/GraphicsView/GraphicsView_Selector.h @@ -57,7 +57,7 @@ public: virtual void checkSelection( int, bool, int ); -signals: +Q_SIGNALS: void selSelectionDone( GV_SelectionChangeStatus ); void selSelectionCancel(); diff --git a/src/GraphicsView/GraphicsView_ViewFrame.cxx b/src/GraphicsView/GraphicsView_ViewFrame.cxx index 9bc663af9..887d5130e 100644 --- a/src/GraphicsView/GraphicsView_ViewFrame.cxx +++ b/src/GraphicsView/GraphicsView_ViewFrame.cxx @@ -354,10 +354,10 @@ void GraphicsView_ViewFrame::keyEvent( QKeyEvent* e ) switch ( e->type() ) { case QEvent::KeyPress: - emit keyPressed( e ); + Q_EMIT keyPressed( e ); break; case QEvent::KeyRelease: - emit keyReleased( e ); + Q_EMIT keyReleased( e ); break; default: break; @@ -373,16 +373,16 @@ void GraphicsView_ViewFrame::mouseEvent( QGraphicsSceneMouseEvent* e ) switch ( e->type() ) { case QEvent::GraphicsSceneMousePress: - emit mousePressed( e ); + Q_EMIT mousePressed( e ); break; case QEvent::GraphicsSceneMouseMove: - emit mouseMoving( e ); + Q_EMIT mouseMoving( e ); break; case QEvent::GraphicsSceneMouseRelease: - emit mouseReleased( e ); + Q_EMIT mouseReleased( e ); break; case QEvent::GraphicsSceneMouseDoubleClick: - emit mouseDoubleClicked( e ); + Q_EMIT mouseDoubleClicked( e ); break; default: break; @@ -398,7 +398,7 @@ void GraphicsView_ViewFrame::wheelEvent( QGraphicsSceneWheelEvent* e ) switch ( e->type() ) { case QEvent::GraphicsSceneWheel: - emit wheeling( e ); + Q_EMIT wheeling( e ); break; default: break; @@ -414,6 +414,6 @@ void GraphicsView_ViewFrame::contextMenuEvent( QGraphicsSceneContextMenuEvent* e QPoint aPos = myViewPort->mapFromScene( e->scenePos() ); QContextMenuEvent* anEvent = new QContextMenuEvent( (QContextMenuEvent::Reason)e->reason(), aPos, e->screenPos(), e->modifiers() ); - emit contextMenuRequested( anEvent ); + Q_EMIT contextMenuRequested( anEvent ); delete anEvent; } diff --git a/src/GraphicsView/GraphicsView_ViewFrame.h b/src/GraphicsView/GraphicsView_ViewFrame.h index 088bdffc4..c85d255f6 100644 --- a/src/GraphicsView/GraphicsView_ViewFrame.h +++ b/src/GraphicsView/GraphicsView_ViewFrame.h @@ -62,7 +62,7 @@ public: void expandToolBarActions(); int getToolBarId(); -protected slots: +protected Q_SLOTS: void onViewPan(); void onViewZoom(); void onViewFitAll(); @@ -71,13 +71,13 @@ protected slots: void onViewGlobalPan(); void onViewReset(); -private slots: +private Q_SLOTS: void keyEvent( QKeyEvent* ); void mouseEvent( QGraphicsSceneMouseEvent* ); void wheelEvent( QGraphicsSceneWheelEvent* ); void contextMenuEvent( QGraphicsSceneContextMenuEvent* ); -signals: +Q_SIGNALS: void keyPressed( QKeyEvent* ); void keyReleased( QKeyEvent* ); void mousePressed( QGraphicsSceneMouseEvent* ); diff --git a/src/GraphicsView/GraphicsView_ViewPort.cxx b/src/GraphicsView/GraphicsView_ViewPort.cxx index 9f79d180a..98325deb2 100644 --- a/src/GraphicsView/GraphicsView_ViewPort.cxx +++ b/src/GraphicsView/GraphicsView_ViewPort.cxx @@ -1447,7 +1447,7 @@ void GraphicsView_ViewPort::finishSketching( bool theStatus ) if( theStatus ) { QPainterPath aPath = mySketchingItem->path(); - emit vpSketchingFinished( aPath ); + Q_EMIT vpSketchingFinished( aPath ); } } @@ -1658,7 +1658,7 @@ void GraphicsView_ViewPort::onBoundingRectChanged() //================================================================ void GraphicsView_ViewPort::onKeyEvent( QKeyEvent* e ) { - emit vpKeyEvent( e ); + Q_EMIT vpKeyEvent( e ); } //================================================================ @@ -1667,7 +1667,7 @@ void GraphicsView_ViewPort::onKeyEvent( QKeyEvent* e ) //================================================================ void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); bool anIsHandled = false; switch( e->type() ) @@ -1715,7 +1715,7 @@ void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e ) if( !anIsHandled && !isPulling() && myIsDragging ) { - emit vpObjectBeforeMoving(); + Q_EMIT vpObjectBeforeMoving(); bool anIsMoved = false; for( initSelected(); moreSelected(); nextSelected() ) @@ -1729,7 +1729,7 @@ void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e ) myDragPosition = QPointF(); setCursor( myStoredCursor ); - emit vpObjectAfterMoving( anIsMoved ); + Q_EMIT vpObjectAfterMoving( anIsMoved ); } break; } @@ -1753,7 +1753,7 @@ void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e ) //================================================================ void GraphicsView_ViewPort::onWheelEvent( QGraphicsSceneWheelEvent* e ) { - emit vpWheelEvent( e ); + Q_EMIT vpWheelEvent( e ); } //================================================================ @@ -1762,7 +1762,7 @@ void GraphicsView_ViewPort::onWheelEvent( QGraphicsSceneWheelEvent* e ) //================================================================ void GraphicsView_ViewPort::onContextMenuEvent( QGraphicsSceneContextMenuEvent* e ) { - emit vpContextMenuEvent( e ); + Q_EMIT vpContextMenuEvent( e ); } //================================================================ diff --git a/src/GraphicsView/GraphicsView_ViewPort.h b/src/GraphicsView/GraphicsView_ViewPort.h index 518598dd4..303dfd1e1 100644 --- a/src/GraphicsView/GraphicsView_ViewPort.h +++ b/src/GraphicsView/GraphicsView_ViewPort.h @@ -218,10 +218,10 @@ public: static QCursor* getZoomCursor() { return zoomCursor; } static QCursor* getSketchCursor() { return sketchCursor; } -public slots: +public Q_SLOTS: void onBoundingRectChanged(); -protected slots: +protected Q_SLOTS: void onKeyEvent( QKeyEvent* ); void onMouseEvent( QGraphicsSceneMouseEvent* ); void onWheelEvent( QGraphicsSceneWheelEvent* ); @@ -230,7 +230,7 @@ protected slots: protected: virtual void scrollContentsBy( int theDX, int theDY ); -signals: +Q_SIGNALS: void vpKeyEvent( QKeyEvent* ); void vpMouseEvent( QGraphicsSceneMouseEvent* ); void vpWheelEvent( QGraphicsSceneWheelEvent* ); diff --git a/src/GraphicsView/GraphicsView_Viewer.cxx b/src/GraphicsView/GraphicsView_Viewer.cxx index 5fb5eb082..006a5ad89 100644 --- a/src/GraphicsView/GraphicsView_Viewer.cxx +++ b/src/GraphicsView/GraphicsView_Viewer.cxx @@ -533,7 +533,7 @@ void GraphicsView_Viewer::handleWheel( QGraphicsSceneWheelEvent* e ) if( anIsScaleChanged ) { - emit wheelScaleChanged(); + Q_EMIT wheelScaleChanged(); aViewPort->onBoundingRectChanged(); } } @@ -556,7 +556,7 @@ void GraphicsView_Viewer::onSketchingFinished( QPainterPath thePath ) //================================================================ void GraphicsView_Viewer::onSelectionDone( GV_SelectionChangeStatus theStatus ) { - emit selectionChanged( theStatus ); + Q_EMIT selectionChanged( theStatus ); } //================================================================ @@ -589,7 +589,7 @@ void GraphicsView_Viewer::onChangeBgColor() //================================================================ void GraphicsView_Viewer::onSelectionCancel() { - emit selectionChanged( GVSCS_Invalid ); + Q_EMIT selectionChanged( GVSCS_Invalid ); } /* diff --git a/src/GraphicsView/GraphicsView_Viewer.h b/src/GraphicsView/GraphicsView_Viewer.h index 8b69d464c..8d3a5aaa3 100644 --- a/src/GraphicsView/GraphicsView_Viewer.h +++ b/src/GraphicsView/GraphicsView_Viewer.h @@ -75,7 +75,7 @@ public: bool isInitialized() const { return myIsInitialized; } void setIsInitialized( bool ); -signals: +Q_SIGNALS: void selectionChanged( GV_SelectionChangeStatus ); void wheelScaleChanged(); @@ -85,7 +85,7 @@ protected: virtual void onTransformationStarted(); virtual void onTransformationFinished(); -protected slots: +protected Q_SLOTS: virtual void onKeyEvent( QKeyEvent* ); virtual void onMouseEvent( QGraphicsSceneMouseEvent* ); virtual void onWheelEvent( QGraphicsSceneWheelEvent* ); diff --git a/src/GuiHelpers/StandardApp_Module.hxx b/src/GuiHelpers/StandardApp_Module.hxx index 89e80b5c6..d2b39937d 100644 --- a/src/GuiHelpers/StandardApp_Module.hxx +++ b/src/GuiHelpers/StandardApp_Module.hxx @@ -75,7 +75,7 @@ public: QString engineIOR() const; virtual void windows( QMap& theMap ) const; -public slots: +public Q_SLOTS: bool deactivateModule( SUIT_Study* ); bool activateModule( SUIT_Study* ); @@ -142,7 +142,7 @@ private: // This part defines slots for test purposes // ========================================================= -protected slots: +protected Q_SLOTS: void OnTest(); }; diff --git a/src/HelpBrowser/qtlocalpeer.cpp b/src/HelpBrowser/qtlocalpeer.cpp index 332b0643f..5f86a80e6 100644 --- a/src/HelpBrowser/qtlocalpeer.cpp +++ b/src/HelpBrowser/qtlocalpeer.cpp @@ -199,5 +199,5 @@ void QtLocalPeer::receiveConnection() socket->waitForBytesWritten(1000); socket->waitForDisconnected(1000); // make sure client reads ack delete socket; - emit messageReceived(message); //### (might take a long time to return) + Q_EMIT messageReceived(message); //### (might take a long time to return) } diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index edc93ceda..2241f9d32 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -550,7 +550,7 @@ void LightApp_Application::createActions() int id = LightApp_Application::UserID + FIRST_HELP_ID; QString aModule; - foreach( aModule, aModuleList ) { + Q_FOREACH( aModule, aModuleList ) { if ( aModule.isEmpty() ) // module title (user name) continue; IMap helpData; // list of help files for the module @@ -567,7 +567,7 @@ void LightApp_Application::createActions() if ( !docSection.isEmpty() ) { helpSubMenu = resMgr->stringValue( docSection, "sub_menu", "" ).arg( aModule ); QStringList listOfParam = resMgr->parameters( docSection ); - foreach( QString paramName, listOfParam ) { + Q_FOREACH( QString paramName, listOfParam ) { QString valueStr = resMgr->stringValue( docSection, paramName ); if ( !valueStr.isEmpty() ) { QFileInfo fi( valueStr ); @@ -606,7 +606,7 @@ void LightApp_Application::createActions() } // create sub-menus hierarchy int menuId = helpMenu; - foreach ( QString subMenu, smenus ) { + Q_FOREACH ( QString subMenu, smenus ) { menuId = createMenu( subMenu, menuId, -1, 0 ); } createMenu( a, menuId, -1, 0 ); @@ -619,7 +619,7 @@ void LightApp_Application::createActions() createMenu( separator(), helpMenu, -1, 5 ); QStringList addHelpItems = resMgr->parameters( "add_help" ); - foreach ( QString addHelpItem, addHelpItems ) { + Q_FOREACH ( QString addHelpItem, addHelpItems ) { QString valueStr = resMgr->stringValue( "add_help", addHelpItem ); if ( !valueStr.isEmpty() && QFile::exists( valueStr ) ) { QAction* a = createAction( id, addHelpItem, @@ -1614,7 +1614,7 @@ void LightApp_Application::onStudyOpened( SUIT_Study* theStudy ) if ( objectBrowser() ) objectBrowser()->openLevels(); - emit studyOpened(); + Q_EMIT studyOpened(); } /*!Protected SLOT. On study saved.*/ @@ -1624,7 +1624,7 @@ void LightApp_Application::onStudySaved( SUIT_Study* s ) if ( mru && s ) mru->insert( s->studyName() ); - emit studySaved(); + Q_EMIT studySaved(); } /*!Protected SLOT. On study closed.*/ @@ -1642,7 +1642,7 @@ void LightApp_Application::onStudyClosed( SUIT_Study* s ) mySelMgr->clearSelected(); // Bug 12944: emit signal only after clear selection - emit studyClosed(); + Q_EMIT studyClosed(); activateModule( "" ); } @@ -1786,7 +1786,7 @@ void LightApp_Application::onPreferenceChanged( QString& modName, QString& secti else preferencesChanged( section, param ); // emit signal to allow additional preferences changing processing - emit preferenceChanged( modName, section, param ); + Q_EMIT preferenceChanged( modName, section, param ); } /*!Remove all windows from study.*/ @@ -2058,7 +2058,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) LightApp_Preferences::Selector, "language", "language" ); QStringList aLangs = SUIT_Session::session()->resourceMgr()->stringValue( "language", "languages", "en" ).split( "," ); QList aIcons; - foreach ( QString aLang, aLangs ) { + Q_FOREACH ( QString aLang, aLangs ) { aIcons << QPixmap( QString( ":/images/%1" ).arg( aLang ) ); } pref->setItemProperty( "strings", aLangs, curLang ); @@ -2190,7 +2190,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) anIndicesList.clear(); txtList.clear(); formats = OCCViewer_Viewer::backgroundData( aValuesList, idList, txtList ); - foreach( int gid, idList ) anIndicesList << gid; + Q_FOREACH( int gid, idList ) anIndicesList << gid; // .... -> 3D viewer background bgId = pref->addPreference( tr( "PREF_3DVIEWER_BACKGROUND" ), bgGroup, LightApp_Preferences::Background, "OCCViewer", "background" ); @@ -2280,7 +2280,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) #ifndef DISABLE_SALOMEOBJECT formats = SVTK_Viewer::backgroundData( aValuesList, idList, txtList ); #endif - foreach( int gid, idList ) anIndicesList << gid; + Q_FOREACH( int gid, idList ) anIndicesList << gid; bgId = pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen, LightApp_Preferences::Background, "VTKViewer", "background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); @@ -2561,10 +2561,10 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( sec == "viewers" && param == "drop_down_buttons" ) { ViewManagerList vmlist = viewManagers(); - foreach( SUIT_ViewManager* vm, vmlist ) + Q_FOREACH( SUIT_ViewManager* vm, vmlist ) { QVector vwlist = vm->getViews(); - foreach( SUIT_ViewWindow* vw, vwlist ) + Q_FOREACH( SUIT_ViewWindow* vw, vwlist ) if ( vw ) vw->setDropDownButtons( resMgr->booleanValue( "viewers", "drop_down_buttons", true ) ); } } @@ -3140,7 +3140,7 @@ void LightApp_Application::updateModuleActions() modName = activeModule()->moduleName(); if ( !isModuleAccessible( modName ) ) { QList apps = SUIT_Session::session()->applications(); - foreach( SUIT_Application* app, apps ) { + Q_FOREACH( SUIT_Application* app, apps ) { LightApp_Application* lapp = dynamic_cast( app ); if ( lapp && lapp != this ) lapp->removeModuleAction( modName ); @@ -3279,7 +3279,7 @@ void LightApp_Application::loadDockWindowsState() QStringList mainToolbarsNames; mainToolbarsNames << "SalomeStandard" << "SalomeModules"; QList mainToolbars = findToolBars( mainToolbarsNames ); - foreach( QToolBar* tb, mainToolbars ) tb->setVisible( true ); + Q_FOREACH( QToolBar* tb, mainToolbars ) tb->setVisible( true ); /* if ( !myWinVis.contains( modName ) && aDefaultVisibility.isEmpty()) return; @@ -3644,7 +3644,7 @@ void LightApp_Application::removeViewManager( SUIT_ViewManager* vm ) LightApp_SelectionMgr* selMgr = selectionMgr(); QList selectors; selMgr->selectors( selectors ); - foreach( SUIT_Selector* selector, selectors ) { + Q_FOREACH( SUIT_Selector* selector, selectors ) { if ( selector->owner() == vm->getViewModel() ) { delete selector; } @@ -3699,7 +3699,7 @@ void LightApp_Application::onCloseAllWindow() QList wndList = desk->windows(); SUIT_ViewWindow* wnd; - foreach( wnd, wndList ) + Q_FOREACH( wnd, wndList ) { if ( wnd ) wnd->close(); @@ -3944,7 +3944,7 @@ void LightApp_Application::clearKnownViewManagers() QStringList aTypesList = viewManagersTypes(); QList aMgrList; viewManagers( aMgrList ); - foreach (SUIT_ViewManager* aMgr, aMgrList) { + Q_FOREACH (SUIT_ViewManager* aMgr, aMgrList) { if (aTypesList.contains(aMgr->getType())) removeViewManager(aMgr); } @@ -4301,7 +4301,7 @@ void LightApp_Application::emitOperationFinished( const QString& theModuleName, const QString& theOperationName, const QStringList& theEntryList ) { - emit operationFinished( theModuleName, theOperationName, theEntryList ); + Q_EMIT operationFinished( theModuleName, theOperationName, theEntryList ); } /*! diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 3e43869f4..edb7e5f23 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -182,14 +182,14 @@ public: virtual bool checkExistingDoc(); -signals: +Q_SIGNALS: void studyOpened(); void studySaved(); void studyClosed(); void preferenceChanged( const QString&, const QString&, const QString& ); void operationFinished( const QString&, const QString&, const QStringList& ); -public slots: +public Q_SLOTS: virtual void onHelpContentsModule(); virtual void onHelpContextModule( const QString&, const QString&, const QString& = QString() ); virtual void onNewDoc(); @@ -230,7 +230,7 @@ protected: virtual QMap activateModuleActions() const; virtual void moduleActionSelected( const int ); -protected slots: +protected Q_SLOTS: virtual void onDesktopActivated(); virtual void onViewManagerRemoved( SUIT_ViewManager* ); virtual void onWindowActivated( SUIT_ViewWindow* theViewWindow ); @@ -253,7 +253,7 @@ protected slots: virtual void onDesktopMessage( const QString& ); -private slots: +private Q_SLOTS: void onSelection(); void onRefresh(); void onDropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ); diff --git a/src/LightApp/LightApp_DataModel.cxx b/src/LightApp/LightApp_DataModel.cxx index 91404aca3..087423aed 100644 --- a/src/LightApp/LightApp_DataModel.cxx +++ b/src/LightApp/LightApp_DataModel.cxx @@ -57,7 +57,7 @@ LightApp_DataModel::~LightApp_DataModel() */ bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList ) { - emit opened(); //TODO: is it really needed? to be removed maybe... + Q_EMIT opened(); //TODO: is it really needed? to be removed maybe... return true; } @@ -66,7 +66,7 @@ bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList ) */ bool LightApp_DataModel::save( QStringList& ) { - emit saved(); + Q_EMIT saved(); return true; } @@ -75,7 +75,7 @@ bool LightApp_DataModel::save( QStringList& ) */ bool LightApp_DataModel::saveAs( const QString&, CAM_Study*, QStringList& ) { - emit saved(); + Q_EMIT saved(); return true; } @@ -93,7 +93,7 @@ bool LightApp_DataModel::dumpPython( const QString&, CAM_Study*, bool, QStringLi */ bool LightApp_DataModel::close() { - emit closed(); + Q_EMIT closed(); return true; } diff --git a/src/LightApp/LightApp_DataModel.h b/src/LightApp/LightApp_DataModel.h index a19963b3c..0cd98589f 100644 --- a/src/LightApp/LightApp_DataModel.h +++ b/src/LightApp/LightApp_DataModel.h @@ -71,7 +71,7 @@ public: void registerColumn( SUIT_DataBrowser*, const QString&, const int ); void unregisterColumn( SUIT_DataBrowser*, const QString& ); -signals: +Q_SIGNALS: void opened(); void saved(); void closed(); diff --git a/src/LightApp/LightApp_Dialog.cxx b/src/LightApp/LightApp_Dialog.cxx index f87686ded..2deba49c7 100644 --- a/src/LightApp/LightApp_Dialog.cxx +++ b/src/LightApp/LightApp_Dialog.cxx @@ -243,7 +243,7 @@ void LightApp_Dialog::clearSelection( const int id ) myObjects[ id ].myNames.clear(); myObjects[ id ].myEdit->setText( QString() ); - emit selectionChanged( id ); + Q_EMIT selectionChanged( id ); } } @@ -568,10 +568,10 @@ void LightApp_Dialog::onToggled( bool on ) if( on ) { updateButtons( id ); - emit objectActivated( id ); + Q_EMIT objectActivated( id ); } else - emit objectDeactivated( id ); + Q_EMIT objectDeactivated( id ); } } @@ -588,7 +588,7 @@ void LightApp_Dialog::updateObject( const int id, bool emit_signal ) filterTypes( id, obj.myNames, obj.myTypes, obj.myIds ); obj.myEdit->setText( selectionDescription( obj.myNames, obj.myTypes, obj.myNI ) ); if( emit_signal ) - emit selectionChanged( id ); + Q_EMIT selectionChanged( id ); } } @@ -860,7 +860,7 @@ void LightApp_Dialog::selectObject( const int id, const QStringList& _names, con obj.myIds = ids; obj.myNames = names; - emit selectionChanged( id ); + Q_EMIT selectionChanged( id ); } /*! @@ -909,7 +909,7 @@ void LightApp_Dialog::onTextChanged( const QString& text ) if( id>=0 && !isReadOnly( id ) ) { QStringList list = text.split( " ", QString::SkipEmptyParts ); - emit objectChanged( id, list ); + Q_EMIT objectChanged( id, list ); } } diff --git a/src/LightApp/LightApp_Dialog.h b/src/LightApp/LightApp_Dialog.h index a64dc37c8..57dd1ba94 100644 --- a/src/LightApp/LightApp_Dialog.h +++ b/src/LightApp/LightApp_Dialog.h @@ -158,7 +158,7 @@ public: //! Set all object selection buttons to inactive state void deactivateAll(); -signals: +Q_SIGNALS: //! selection in certain widget is changed void selectionChanged ( int ); @@ -250,7 +250,7 @@ protected: //! Check the "read only" state of object selection line edit bool isReadOnly( const int ) const; -private slots: +private Q_SLOTS: //! emits if the object selection button changes state void onToggled( bool ); diff --git a/src/LightApp/LightApp_FullScreenHelper.cxx b/src/LightApp/LightApp_FullScreenHelper.cxx index 61b72ad63..c0864fc37 100644 --- a/src/LightApp/LightApp_FullScreenHelper.cxx +++ b/src/LightApp/LightApp_FullScreenHelper.cxx @@ -94,7 +94,7 @@ void LightApp_FullScreenHelper::switchToFullScreen() { QWidget* ob = app->objectBrowser(); QObject* obParent = ob ? ob->parent() : 0; - foreach(QDockWidget* aWidget, aDocWidgets) { + Q_FOREACH(QDockWidget* aWidget, aDocWidgets) { if(aWidget && aWidget->parent() == desktop) { if( aWidget->isVisible() && aWidget != obParent ) { aWidget->hide(); @@ -114,7 +114,7 @@ void LightApp_FullScreenHelper::switchToFullScreen() { QList aToolBars = desktop->findChildren(); myToolBarMap.clear(); - foreach(QToolBar* aWidget, aToolBars ) { + Q_FOREACH(QToolBar* aWidget, aToolBars ) { if( aWidget && aWidget->parent() == desktop ) { if( aWidget->isVisible()) { aWidget->hide(); diff --git a/src/LightApp/LightApp_GLSelector.h b/src/LightApp/LightApp_GLSelector.h index 26a8c6e6a..551363190 100644 --- a/src/LightApp/LightApp_GLSelector.h +++ b/src/LightApp/LightApp_GLSelector.h @@ -49,7 +49,7 @@ public: virtual QString type() const { return GLViewer_Viewer2d::Type(); } -private slots: +private Q_SLOTS: void onSelectionChanged(); protected: diff --git a/src/LightApp/LightApp_GVSelector.h b/src/LightApp/LightApp_GVSelector.h index 58655abbf..8b89670a4 100644 --- a/src/LightApp/LightApp_GVSelector.h +++ b/src/LightApp/LightApp_GVSelector.h @@ -43,7 +43,7 @@ protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); -protected slots: +protected Q_SLOTS: void onSelectionChanged( GV_SelectionChangeStatus ); protected: diff --git a/src/LightApp/LightApp_Module.h b/src/LightApp/LightApp_Module.h index 6572aef1d..0d4c8725f 100644 --- a/src/LightApp/LightApp_Module.h +++ b/src/LightApp/LightApp_Module.h @@ -108,7 +108,7 @@ public: virtual void updateModuleVisibilityState(); -public slots: +public Q_SLOTS: virtual bool activateModule( SUIT_Study* ); virtual bool deactivateModule( SUIT_Study* ); virtual void studyClosed( SUIT_Study* ); @@ -116,7 +116,7 @@ public slots: void MenuItem(); -protected slots: +protected Q_SLOTS: virtual void onModelSaved(); virtual void onModelOpened(); virtual void onModelClosed(); diff --git a/src/LightApp/LightApp_ModuleAction.cxx b/src/LightApp/LightApp_ModuleAction.cxx index 47e5cccb3..82cc0cea3 100755 --- a/src/LightApp/LightApp_ModuleAction.cxx +++ b/src/LightApp/LightApp_ModuleAction.cxx @@ -565,7 +565,7 @@ void LightApp_ModuleAction::activate( int id, bool fromAction ) cb->blockSignals( blocked ); } - emit moduleActivated( activeModule() ); + Q_EMIT moduleActivated( activeModule() ); } /*! diff --git a/src/LightApp/LightApp_ModuleAction.h b/src/LightApp/LightApp_ModuleAction.h index 920b525c1..5b43a4456 100755 --- a/src/LightApp/LightApp_ModuleAction.h +++ b/src/LightApp/LightApp_ModuleAction.h @@ -70,7 +70,7 @@ protected: virtual bool event( QEvent* ); -signals: +Q_SIGNALS: void moduleActivated( const QString& ); private: @@ -82,7 +82,7 @@ private: QAction* active() const; void activate( int, bool = true ); -private slots: +private Q_SLOTS: void onChanged(); void onTriggered( int ); void onComboActivated( int ); @@ -102,7 +102,7 @@ public: QList widgets() const; -signals: +Q_SIGNALS: void activatedId( int ); protected: diff --git a/src/LightApp/LightApp_ModuleDlg.h b/src/LightApp/LightApp_ModuleDlg.h index c6fb5631c..f31484b7f 100644 --- a/src/LightApp/LightApp_ModuleDlg.h +++ b/src/LightApp/LightApp_ModuleDlg.h @@ -45,7 +45,7 @@ public: int addButton( const QString&, const int = -1); -public slots: +public Q_SLOTS: void accept(); private: diff --git a/src/LightApp/LightApp_NameDlg.h b/src/LightApp/LightApp_NameDlg.h index 4a61b17f2..235e5c5e7 100644 --- a/src/LightApp/LightApp_NameDlg.h +++ b/src/LightApp/LightApp_NameDlg.h @@ -49,7 +49,7 @@ public: static QString getName( QWidget* parent = 0, const QString& oldName = QString() ); -protected slots: +protected Q_SLOTS: void accept(); private: diff --git a/src/LightApp/LightApp_OBSelector.h b/src/LightApp/LightApp_OBSelector.h index 1eef13aae..8c84f4e2c 100644 --- a/src/LightApp/LightApp_OBSelector.h +++ b/src/LightApp/LightApp_OBSelector.h @@ -51,7 +51,7 @@ public: unsigned long getModifiedTime() const; void setModified(); -private slots: +private Q_SLOTS: void onSelectionChanged(); protected: diff --git a/src/LightApp/LightApp_OCCSelector.h b/src/LightApp/LightApp_OCCSelector.h index b0c94d880..0ae5790a6 100644 --- a/src/LightApp/LightApp_OCCSelector.h +++ b/src/LightApp/LightApp_OCCSelector.h @@ -58,7 +58,7 @@ public: virtual QString type() const { return OCCViewer_Viewer::Type(); } #endif -private slots: +private Q_SLOTS: virtual void onSelectionChanged(); virtual void onDeselection(); diff --git a/src/LightApp/LightApp_Operation.h b/src/LightApp/LightApp_Operation.h index afc1c4c43..1edb9ade0 100755 --- a/src/LightApp/LightApp_Operation.h +++ b/src/LightApp/LightApp_Operation.h @@ -80,7 +80,7 @@ protected: void update( const int ); void setAutoResumed( const bool ); -private slots: +private Q_SLOTS: virtual void onSelectionDone(); diff --git a/src/LightApp/LightApp_Plot2dSelector.h b/src/LightApp/LightApp_Plot2dSelector.h index 072ef6864..1e5e758f7 100755 --- a/src/LightApp/LightApp_Plot2dSelector.h +++ b/src/LightApp/LightApp_Plot2dSelector.h @@ -43,7 +43,7 @@ public: /*!Return "ObjectBrowser"*/ virtual QString type() const { return "PLot2dViewer"; } -private slots: +private Q_SLOTS: void onSelectionChanged( const QString& ); void onClearSelected(); diff --git a/src/LightApp/LightApp_Preferences.cxx b/src/LightApp/LightApp_Preferences.cxx index 9ae6c6055..caf0519cd 100644 --- a/src/LightApp/LightApp_Preferences.cxx +++ b/src/LightApp/LightApp_Preferences.cxx @@ -103,7 +103,7 @@ void LightApp_Preferences::changedResources( const ResourceMap& map ) QString sec, param; it.key()->resource( sec, param ); QString mod = module( it.key()->id() ); - emit preferenceChanged( mod, sec, param ); + Q_EMIT preferenceChanged( mod, sec, param ); } } diff --git a/src/LightApp/LightApp_Preferences.h b/src/LightApp/LightApp_Preferences.h index cda80799e..02acfb278 100644 --- a/src/LightApp/LightApp_Preferences.h +++ b/src/LightApp/LightApp_Preferences.h @@ -58,10 +58,10 @@ public: protected: void changedResources( const ResourceMap& ); -signals: +Q_SIGNALS: void preferenceChanged( QString&, QString&, QString& ); -private slots: +private Q_SLOTS: void onHelp(); void onApply(); diff --git a/src/LightApp/LightApp_PreferencesDlg.h b/src/LightApp/LightApp_PreferencesDlg.h index 6ed946817..def0e1dcd 100644 --- a/src/LightApp/LightApp_PreferencesDlg.h +++ b/src/LightApp/LightApp_PreferencesDlg.h @@ -51,7 +51,7 @@ public: bool isSaved() { return mySaved; } void setSaved( bool saved ) { mySaved = saved; } -private slots: +private Q_SLOTS: void onHelp(); void onApply(); void onDefault(); diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index dd304ac14..2605a310e 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -234,7 +234,7 @@ void LightApp_SelectionMgr::selectedObjects( QStringList& theList, const QString void LightApp_SelectionMgr::setSelectedObjects( const QStringList& lst, const bool append ) { SUIT_DataOwnerPtrList owners; - foreach( const QString& aValue, lst ) { + Q_FOREACH( const QString& aValue, lst ) { if ( !aValue.isNull() ) owners.append( new LightApp_DataOwner( aValue ) ); } @@ -253,7 +253,7 @@ void LightApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel ) myTimeStamp = QTime::currentTime(); - emit currentSelectionChanged(); + Q_EMIT currentSelectionChanged(); } #ifndef DISABLE_SALOMEOBJECT @@ -340,7 +340,7 @@ void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObj bool append = false; setSelected( remainsOwners, append ); - emit currentSelectionChanged(); + Q_EMIT currentSelectionChanged(); // Bug 17269: To avoid calling of selected(aList) //TColStd_IndexedMapOfInteger anIndexes; diff --git a/src/LightApp/LightApp_SelectionMgr.h b/src/LightApp/LightApp_SelectionMgr.h index a3c6a0d01..37e06fb4d 100644 --- a/src/LightApp/LightApp_SelectionMgr.h +++ b/src/LightApp/LightApp_SelectionMgr.h @@ -91,7 +91,7 @@ public: bool isSelectionCacheEnabled() const; void setSelectionCacheEnabled( bool ); -signals: +Q_SIGNALS: void currentSelectionChanged(); private: diff --git a/src/LightApp/LightApp_Study.cxx b/src/LightApp/LightApp_Study.cxx index 2b4f0f4df..6a2443db2 100644 --- a/src/LightApp/LightApp_Study.cxx +++ b/src/LightApp/LightApp_Study.cxx @@ -67,7 +67,7 @@ bool LightApp_Study::createDocument( const QString& theStr ) bool aRet = CAM_Study::createDocument( theStr ); - emit created( this ); + Q_EMIT created( this ); return aRet; } @@ -97,7 +97,7 @@ bool LightApp_Study::openDocument( const QString& theFileName ) bool res = CAM_Study::openDocument( theFileName ); - emit opened( this ); + Q_EMIT opened( this ); return res; } @@ -128,7 +128,7 @@ bool LightApp_Study::loadDocument( const QString& theStudyName ) ((LightApp_Application*)application())->updateObjectBrowser( false ); bool res = CAM_Study::openDocument( theStudyName ); - emit opened( this ); + Q_EMIT opened( this ); //SRN: BugID IPAL9021: End return res; } @@ -192,7 +192,7 @@ bool LightApp_Study::saveDocumentAs( const QString& theFileName ) res = res && CAM_Study::saveDocumentAs( theFileName ); //SRN: BugID IPAL9377, removed usage of uninitialized variable if ( res ) - emit saved( this ); + Q_EMIT saved( this ); return res; } @@ -219,7 +219,7 @@ bool LightApp_Study::saveDocument() bool res = saveStudyData(studyName()); res = res && CAM_Study::saveDocument(); if (res) - emit saved( this ); + Q_EMIT saved( this ); return res; } @@ -231,7 +231,7 @@ void LightApp_Study::closeDocument(bool permanently) { // Inform everybody that this study is going to close when it's most safe to, // i.e. in the very beginning - emit closed( this ); + Q_EMIT closed( this ); CAM_Study::closeDocument(permanently); diff --git a/src/LightApp/LightApp_Study.h b/src/LightApp/LightApp_Study.h index 6b8334d81..391d75080 100644 --- a/src/LightApp/LightApp_Study.h +++ b/src/LightApp/LightApp_Study.h @@ -128,7 +128,7 @@ protected: virtual CAM_ModuleObject* createModuleObject( LightApp_DataModel* theDataModel, SUIT_DataObject* theParent ) const; -signals: +Q_SIGNALS: void saved ( SUIT_Study* ); void opened ( SUIT_Study* ); void closed ( SUIT_Study* ); diff --git a/src/LightApp/LightApp_VTKSelector.h b/src/LightApp/LightApp_VTKSelector.h index 19c12cda6..cde6cc2e0 100644 --- a/src/LightApp/LightApp_VTKSelector.h +++ b/src/LightApp/LightApp_VTKSelector.h @@ -94,7 +94,7 @@ public: LightApp_VTKSelector( SUIT_SelectionMgr* ); #endif -private slots: +private Q_SLOTS: void onSelectionChanged(); #ifndef DISABLE_VTKVIEWER diff --git a/src/LogWindow/LogWindow.h b/src/LogWindow/LogWindow.h index 98cd38d7a..62e63bc94 100755 --- a/src/LogWindow/LogWindow.h +++ b/src/LogWindow/LogWindow.h @@ -100,7 +100,7 @@ public: void setMenuActions( const int ); int menuActions() const; -protected slots: +protected Q_SLOTS: void onSaveToFile(); void onSelectAll(); void onClear(); diff --git a/src/OCCViewer/OCCViewer_AISSelector.cxx b/src/OCCViewer/OCCViewer_AISSelector.cxx index 0f1ddda73..8e6f2e418 100755 --- a/src/OCCViewer/OCCViewer_AISSelector.cxx +++ b/src/OCCViewer/OCCViewer_AISSelector.cxx @@ -111,14 +111,14 @@ bool OCCViewer_AISSelector::checkSelection ( AIS_StatusOfPick status, myNumSelected = myAISContext->NbCurrents(); /* update after the last selection */ if ( status == AIS_SOP_NothingSelected && !hadSelection ) { - emit selSelectionCancel( addTo ); + Q_EMIT selSelectionCancel( addTo ); } else if ( status == AIS_SOP_NothingSelected && hadSelection ) { - emit selSelectionCancel( addTo ); /* unselected now */ + Q_EMIT selSelectionCancel( addTo ); /* unselected now */ } else if ( status == AIS_SOP_OneSelected || status == AIS_SOP_SeveralSelected ) { - emit selSelectionDone( addTo ); /* selected ( the same object, may be ) */ + Q_EMIT selSelectionDone( addTo ); /* selected ( the same object, may be ) */ } return ( status != AIS_SOP_Error && status != AIS_SOP_NothingSelected ); } diff --git a/src/OCCViewer/OCCViewer_AISSelector.h b/src/OCCViewer/OCCViewer_AISSelector.h index 7d93c8a2a..890d6e432 100755 --- a/src/OCCViewer/OCCViewer_AISSelector.h +++ b/src/OCCViewer/OCCViewer_AISSelector.h @@ -67,7 +67,7 @@ protected: // checks the status of pick and emits 'selSelectionDone' or 'selSelectionCancel'. bool checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo ); -signals: +Q_SIGNALS: // 'selection done' signal void selSelectionDone( bool bAdded ); // 'selection cancelled' signal diff --git a/src/OCCViewer/OCCViewer_AxialScaleDlg.h b/src/OCCViewer/OCCViewer_AxialScaleDlg.h index fa4407603..f9d6cf993 100644 --- a/src/OCCViewer/OCCViewer_AxialScaleDlg.h +++ b/src/OCCViewer/OCCViewer_AxialScaleDlg.h @@ -38,7 +38,7 @@ public: void Update(); -protected slots: +protected Q_SLOTS: bool apply(); void reset(); void accept(); diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx index bc4215764..960b77789 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx @@ -523,7 +523,7 @@ bool OCCViewer_ClipPlaneInteractor::mousePress( QMouseEvent* theEvent, if ( myIsClickable ) { myViewer->getAISContext()->SetSelected( aPlane ); - emit planeClicked( aPlane ); + Q_EMIT planeClicked( aPlane ); } myIsDraggable = isDraggable( aPlane ); @@ -590,7 +590,7 @@ bool OCCViewer_ClipPlaneInteractor::mouseMove( QMouseEvent* theEvent, // performing dragging operation performDragging( myDragPos, myPerformingOp, myInteractedPlane, aView3D ); - emit planeDragged( myInteractedPlane ); + Q_EMIT planeDragged( myInteractedPlane ); return true; } diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h index 43fe819bc..823574dec 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h @@ -77,7 +77,7 @@ public: void setMinMax( const Bnd_Box& ); virtual void setEnabled( const bool ); -signals: + Q_SIGNALS: void planeClicked( const Handle_AIS_Plane& thePlane ); void planeDragged( const Handle_AIS_Plane& thePlane ); diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.h b/src/OCCViewer/OCCViewer_ClippingDlg.h index 13a293f52..e673d8411 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.h +++ b/src/OCCViewer/OCCViewer_ClippingDlg.h @@ -142,10 +142,10 @@ private: OCCViewer_ClipPlaneInteractor* myInteractor; -public slots: +public Q_SLOTS: void onApply(); -private slots: +private Q_SLOTS: void ClickOnNew(); void ClickOnDelete(); diff --git a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx index 195d81485..9dee14fd8 100755 --- a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx +++ b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx @@ -294,7 +294,7 @@ bool OCCViewer_CreateRestoreViewDlg::eventFilter( QObject* anObj, QEvent* anEv ) */ void OCCViewer_CreateRestoreViewDlg::OKpressed() { - emit dlgOk(); + Q_EMIT dlgOk(); accept(); } diff --git a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h index 50265ec98..b0708d9b7 100755 --- a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h +++ b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h @@ -53,14 +53,14 @@ public: viewAspect currentItem() const; virtual bool eventFilter( QObject*, QEvent* ); -public slots: +public Q_SLOTS: void OKpressed(); void clearList(); void editItemText( QListWidgetItem* ); void changeImage( QListWidgetItem* ); void deleteSelectedItems(); -signals: +Q_SIGNALS: void dlgOk(); private: diff --git a/src/OCCViewer/OCCViewer_CubeAxesDlg.h b/src/OCCViewer/OCCViewer_CubeAxesDlg.h index 6f93e2e66..01e79857b 100644 --- a/src/OCCViewer/OCCViewer_CubeAxesDlg.h +++ b/src/OCCViewer/OCCViewer_CubeAxesDlg.h @@ -86,7 +86,7 @@ public: virtual void Update(); -private slots: +private Q_SLOTS: virtual bool onApply(); private: diff --git a/src/OCCViewer/OCCViewer_SetRotationPointDlg.h b/src/OCCViewer/OCCViewer_SetRotationPointDlg.h index 43b36d1ac..ca50163a9 100644 --- a/src/OCCViewer/OCCViewer_SetRotationPointDlg.h +++ b/src/OCCViewer/OCCViewer_SetRotationPointDlg.h @@ -73,7 +73,7 @@ protected: void setEnabled(QGroupBox* theGrp, const bool theState); -protected slots: +protected Q_SLOTS: void onBBCenterChecked(); void onToOrigin(); diff --git a/src/OCCViewer/OCCViewer_ToolTip.cxx b/src/OCCViewer/OCCViewer_ToolTip.cxx index 26ac23c1a..ee847545d 100644 --- a/src/OCCViewer/OCCViewer_ToolTip.cxx +++ b/src/OCCViewer/OCCViewer_ToolTip.cxx @@ -86,11 +86,11 @@ void OCCViewer_ToolTip::onToolTip( QPoint p, QString& str, QFont& f, QRect& txtR QString txt; Handle( SelectMgr_EntityOwner ) owner = aCont->DetectedOwner(); if( !owner.IsNull() ) - emit toolTipFor( owner, txt ); + Q_EMIT toolTipFor( owner, txt ); Handle_AIS_InteractiveObject obj = aCont->DetectedInteractive(); if( txt.isEmpty() && !obj.IsNull() ) - emit toolTipFor( obj, txt ); + Q_EMIT toolTipFor( obj, txt ); if( txt.isEmpty() ) return; diff --git a/src/OCCViewer/OCCViewer_ToolTip.h b/src/OCCViewer/OCCViewer_ToolTip.h index df4ba7d45..b478dd314 100644 --- a/src/OCCViewer/OCCViewer_ToolTip.h +++ b/src/OCCViewer/OCCViewer_ToolTip.h @@ -43,7 +43,7 @@ public: QFont font() const; void setFont( const QFont& ); -signals: +Q_SIGNALS: /*! Called when owner is detected; allows to redefine tooltip text for owner */ @@ -53,7 +53,7 @@ signals: */ void toolTipFor( const Handle_AIS_InteractiveObject&, QString& ); -public slots: +public Q_SLOTS: void onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ); private: diff --git a/src/OCCViewer/OCCViewer_ViewFrame.cxx b/src/OCCViewer/OCCViewer_ViewFrame.cxx index cc20fd473..056a313fd 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.cxx +++ b/src/OCCViewer/OCCViewer_ViewFrame.cxx @@ -80,7 +80,7 @@ OCCViewer_ViewWindow* OCCViewer_ViewFrame::getView( const int i ) const void OCCViewer_ViewFrame::setViewManager( SUIT_ViewManager* theMgr ) { OCCViewer_ViewWindow::setViewManager(theMgr); - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->setViewManager(theMgr); } } @@ -284,7 +284,7 @@ OCCViewer_ViewPort3d* OCCViewer_ViewFrame::getViewPort(int theView) //************************************************************************************** void OCCViewer_ViewFrame::updateEnabledDrawMode() { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH (OCCViewer_ViewWindow* aView, myViews) { aView->updateEnabledDrawMode(); } } @@ -293,7 +293,7 @@ void OCCViewer_ViewFrame::updateEnabledDrawMode() void OCCViewer_ViewFrame::setCuttingPlane( bool on, const double x , const double y , const double z, const double dx, const double dy, const double dz) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->setCuttingPlane(on, x, y, z, dx, dy, dz); aView->update(); } @@ -302,7 +302,7 @@ void OCCViewer_ViewFrame::setCuttingPlane( bool on, const double x , const doubl //************************************************************************************** void OCCViewer_ViewFrame::setCuttingPlane( bool on, const gp_Pln thePln ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->setCuttingPlane(on, thePln); aView->update(); } @@ -311,7 +311,7 @@ void OCCViewer_ViewFrame::setCuttingPlane( bool on, const gp_Pln thePln ) //************************************************************************************** void OCCViewer_ViewFrame::setInteractionStyle( const int i ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->setInteractionStyle(i); } } @@ -319,7 +319,7 @@ void OCCViewer_ViewFrame::setInteractionStyle( const int i ) //************************************************************************************** void OCCViewer_ViewFrame::setZoomingStyle( const int i ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH (OCCViewer_ViewWindow* aView, myViews) { aView->setZoomingStyle(i); } } @@ -366,7 +366,7 @@ void OCCViewer_ViewFrame::setBackgroundColor( const QColor& theColor ) if (myPopupRequestedView) myPopupRequestedView->setBackgroundColor(theColor); else { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) aView->setBackgroundColor(theColor); } @@ -377,7 +377,7 @@ void OCCViewer_ViewFrame::setBackground( const Qtx::BackgroundData& theBackgroun if (myPopupRequestedView) myPopupRequestedView->setBackground(theBackground); else { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) aView->setBackground(theBackground); } @@ -386,14 +386,14 @@ void OCCViewer_ViewFrame::setBackground( const Qtx::BackgroundData& theBackgroun void OCCViewer_ViewFrame::onViewFitAll() { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->onViewFitAll(); } } void OCCViewer_ViewFrame::onFitAll() { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->onFitAll(); } } @@ -404,7 +404,7 @@ QColor OCCViewer_ViewFrame::backgroundColor() const if (myPopupRequestedView) return myPopupRequestedView->backgroundColor(); - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) return aView->backgroundColor(); } @@ -416,7 +416,7 @@ Qtx::BackgroundData OCCViewer_ViewFrame::background() const if (myPopupRequestedView) return myPopupRequestedView->background(); - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) return aView->background(); } @@ -428,7 +428,7 @@ void OCCViewer_ViewFrame::showStaticTrihedron( bool on ) if ( myPopupRequestedView ) myPopupRequestedView->showStaticTrihedron( on ); else { - foreach ( OCCViewer_ViewWindow* aView, myViews ) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->showStaticTrihedron( on ); } } @@ -436,7 +436,7 @@ void OCCViewer_ViewFrame::showStaticTrihedron( bool on ) QImage OCCViewer_ViewFrame::dumpView() { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) return aView->dumpView(); } @@ -445,7 +445,7 @@ QImage OCCViewer_ViewFrame::dumpView() bool OCCViewer_ViewFrame::dumpViewToFormat( const QImage& image, const QString& fileName, const QString& format ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { if (aView->isVisible()) return aView->dumpViewToFormat( image, fileName, format ); } @@ -469,7 +469,7 @@ void OCCViewer_ViewFrame::onDumpView() void OCCViewer_ViewFrame::setDropDownButtons( bool on ) { - foreach( OCCViewer_ViewWindow* aView, myViews ) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->setDropDownButtons( on ); } OCCViewer_ViewWindow::setDropDownButtons( on ); @@ -481,7 +481,7 @@ QString OCCViewer_ViewFrame::getVisualParameters() QStringList splitParams; if( mySplitMode != -1 && myViewsMode.count() != 0 ) { splitParams << QString::number( mySplitMode ); - foreach ( int aViewMode, myViewsMode ) + Q_FOREACH( int aViewMode, myViewsMode ) splitParams << QString::number( aViewMode ); params.append( splitParams.join("*") ); } @@ -556,14 +556,14 @@ void OCCViewer_ViewFrame::updateWindowTitle(OCCViewer_ViewWindow* theView) void OCCViewer_ViewFrame::enableSelection( bool isEnabled ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->enableSelection(isEnabled); } } void OCCViewer_ViewFrame::enablePreselection( bool isEnabled ) { - foreach (OCCViewer_ViewWindow* aView, myViews) { + Q_FOREACH( OCCViewer_ViewWindow* aView, myViews ) { aView->enablePreselection(isEnabled); } } diff --git a/src/OCCViewer/OCCViewer_ViewFrame.h b/src/OCCViewer/OCCViewer_ViewFrame.h index 0f10e19f0..6fb545cab 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.h +++ b/src/OCCViewer/OCCViewer_ViewFrame.h @@ -95,7 +95,7 @@ public: virtual SUIT_CameraProperties cameraProperties(); -public slots: +public Q_SLOTS: virtual void onFrontView() { getView(MAIN_VIEW)->onFrontView(); } virtual void onViewFitAll(); virtual void onBackView() { getView(MAIN_VIEW)->onBackView(); } @@ -133,7 +133,7 @@ protected: virtual QImage dumpView(); virtual bool dumpViewToFormat( const QImage&, const QString&, const QString& ); -private slots: +private Q_SLOTS: void onContextMenuRequested(QContextMenuEvent*); private: diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 7300cebec..31f521816 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -318,7 +318,7 @@ void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* t myEndPnt.setX(theEvent->x()); myEndPnt.setY(theEvent->y()); bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier); - if (!aHasShift) emit deselection(); + if (!aHasShift) Q_EMIT deselection(); if (myStartPnt == myEndPnt) { @@ -359,7 +359,7 @@ void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* t myAISContext->UpdateCurrentViewer(); } - emit selectionChanged(); + Q_EMIT selectionChanged(); } /*! @@ -375,7 +375,7 @@ void OCCViewer_Viewer::onKeyPress(SUIT_ViewWindow* theWindow, QKeyEvent* theEven if (!aView || aView->interactionStyle() != SUIT_ViewModel::KEY_FREE) return; - emit deselection(); + Q_EMIT deselection(); if ( !isPreselectionEnabled() ) { Handle(V3d_View) aView3d = aView->getViewPort()->getView(); @@ -386,7 +386,7 @@ void OCCViewer_Viewer::onKeyPress(SUIT_ViewWindow* theWindow, QKeyEvent* theEven myAISContext->Select(); - emit selectionChanged(); + Q_EMIT selectionChanged(); } void OCCViewer_Viewer::onViewClosed(OCCViewer_ViewPort3d*) @@ -665,7 +665,7 @@ void OCCViewer_Viewer::setObjectsSelected(const AIS_ListOfInteractive& theList) */ void OCCViewer_Viewer::performSelectionChanged() { - emit selectionChanged(); + Q_EMIT selectionChanged(); } /*! diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index d29df5315..1db97f022 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -179,11 +179,11 @@ public: void initView( OCCViewer_ViewWindow* view ); -signals: +Q_SIGNALS: void selectionChanged(); void deselection(); -protected slots: +protected Q_SLOTS: virtual void onMousePress(SUIT_ViewWindow*, QMouseEvent*); virtual void onMouseMove(SUIT_ViewWindow*, QMouseEvent*); virtual void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*); diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 06ac8a4a7..2c99527d6 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -330,7 +330,7 @@ void OCCViewer_ViewPort::setBackgroundColor( const QColor& color ) pal.setColor( QPalette::Background, color ); setPalette( pal ); repaint(); - emit vpChangeBGColor( color ); + Q_EMIT vpChangeBGColor( color ); } /*! @@ -379,7 +379,7 @@ void OCCViewer_ViewPort::setTransformEnabled( bool enable ) */ void OCCViewer_ViewPort::mousePressEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -387,7 +387,7 @@ void OCCViewer_ViewPort::mousePressEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -395,7 +395,7 @@ void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) */ void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -403,7 +403,7 @@ void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + Q_EMIT vpMouseEvent( e ); } /*! @@ -411,7 +411,7 @@ void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + Q_EMIT vpKeyEvent( e ); } /*! @@ -419,7 +419,7 @@ void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e ) */ void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + Q_EMIT vpKeyEvent( e ); } /*! @@ -430,7 +430,7 @@ void OCCViewer_ViewPort::paintEvent( QPaintEvent* ) if ( myPaintersRedrawing ) { QPainter p( this ); - emit vpDrawExternal( &p ); + Q_EMIT vpDrawExternal( &p ); myPaintersRedrawing = false; } } diff --git a/src/OCCViewer/OCCViewer_ViewPort.h b/src/OCCViewer/OCCViewer_ViewPort.h index 3dd6056d8..ca19995fa 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.h +++ b/src/OCCViewer/OCCViewer_ViewPort.h @@ -95,13 +95,13 @@ protected: // void onCreatePopup( QPopupMenu* ); // void onDestroyPopup( QPopupMenu* ); -public slots: +public Q_SLOTS: virtual bool synchronize( OCCViewer_ViewPort* ); -protected slots: +protected Q_SLOTS: virtual void onChangeBackground(); -signals: +Q_SIGNALS: void vpKeyEvent( QKeyEvent* ); void vpMouseEvent( QMouseEvent* ); void vpDrawExternal( QPainter* ); diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 110076d13..59e719fa2 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -96,7 +96,7 @@ OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_V */ OCCViewer_ViewPort3d::~OCCViewer_ViewPort3d() { - emit vpClosed(this); + Q_EMIT vpClosed(this); Handle(V3d_View) aView = activeView(); if (!aView.IsNull()) aView->Remove(); @@ -134,7 +134,7 @@ bool OCCViewer_ViewPort3d::mapView( const Handle(V3d_View)& view ) view->View()->Deactivate(); } - emit( vpMapped(this) ); + Q_EMIT( vpMapped(this) ); return true; } @@ -304,7 +304,7 @@ void OCCViewer_ViewPort3d::setBackground( const Qtx::BackgroundData& bgData ) if ( bgData.isValid() ) { myBackground = bgData; updateBackground(); - emit vpChangeBackground( myBackground ); + Q_EMIT vpChangeBackground( myBackground ); } } @@ -468,7 +468,7 @@ void OCCViewer_ViewPort3d::fitRect( const QRect& rect ) { if ( !activeView().IsNull() ) { activeView()->WindowFit( rect.left(), rect.top(), rect.right(), rect.bottom() ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } } @@ -498,7 +498,7 @@ void OCCViewer_ViewPort3d::zoom( int x0, int y0, int x, int y ) else #endif activeView()->Zoom( x0 + y0, 0, x + y, 0 ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } } @@ -509,7 +509,7 @@ void OCCViewer_ViewPort3d::setCenter( int x, int y ) { if ( !activeView().IsNull() ) { activeView()->Place( x, y, myScale ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } } @@ -520,7 +520,7 @@ void OCCViewer_ViewPort3d::pan( int dx, int dy ) { if ( !activeView().IsNull() ) { activeView()->Pan( dx, dy, 1.0 ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } } @@ -601,7 +601,7 @@ void OCCViewer_ViewPort3d::rotate( int x, int y, default: break; } - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } // setZSize( getZSize() ); } @@ -617,7 +617,7 @@ void OCCViewer_ViewPort3d::endRotation() activeView()->SetZSize( 0.0 ); #endif activeView()->Update(); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } } @@ -677,7 +677,7 @@ void OCCViewer_ViewPort3d::fitAll( bool keepScale, bool withZ, bool upd ) activeView()->FitAll( margin, withZ, upd ); #endif activeView()->SetZSize(0.); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } /*! @@ -688,7 +688,7 @@ void OCCViewer_ViewPort3d::reset() // double zsize = getZSize(); if ( !activeView().IsNull() ) { activeView()->Reset(); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); // setZSize( zsize ); } } @@ -705,7 +705,7 @@ void OCCViewer_ViewPort3d::rotateXY( double degrees ) double X, Y, Z; activeView()->Convert( x, y, X, Y, Z ); activeView()->Rotate( 0, 0, degrees * M_PI / 180., X, Y, Z ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } /*! @@ -717,7 +717,7 @@ void OCCViewer_ViewPort3d::setAxialScale( double xScale, double yScale, double z return; activeView()->SetAxialScale( xScale, yScale, zScale ); - emit vpTransformed( this ); + Q_EMIT vpTransformed( this ); } /*! diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.h b/src/OCCViewer/OCCViewer_ViewPort3d.h index 9cc4b3de6..ec5874a86 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.h +++ b/src/OCCViewer/OCCViewer_ViewPort3d.h @@ -94,12 +94,12 @@ public: void showStaticTrihedron( bool ); -signals: +Q_SIGNALS: void vpChangeBackground( const Qtx::BackgroundData& ); void vpClosed(OCCViewer_ViewPort3d*); void vpMapped(OCCViewer_ViewPort3d*); -public slots: +public Q_SLOTS: virtual bool synchronize( OCCViewer_ViewPort* ); protected: diff --git a/src/OCCViewer/OCCViewer_ViewSketcher.h b/src/OCCViewer/OCCViewer_ViewSketcher.h index 06606c3ee..99eee0023 100755 --- a/src/OCCViewer/OCCViewer_ViewSketcher.h +++ b/src/OCCViewer/OCCViewer_ViewSketcher.h @@ -69,7 +69,7 @@ public: virtual bool isDefault() const; virtual bool eventFilter( QObject*, QEvent* ); -private slots: +private Q_SLOTS: void onDrawViewPort(); protected: diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index d8002d637..d74996233 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -360,7 +360,7 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e ) return true; case QEvent::MouseButtonDblClick: - emit mouseDoubleClicked(this, (QMouseEvent*)e); + Q_EMIT mouseDoubleClicked(this, (QMouseEvent*)e); return true; case QEvent::Wheel: @@ -381,12 +381,12 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e ) { QContextMenuEvent * aEvent = (QContextMenuEvent*)e; if ( aEvent->reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( aEvent ); + Q_EMIT contextMenuRequested( aEvent ); } return true; case QEvent::KeyPress: - emit keyPressed(this, (QKeyEvent*) e); + Q_EMIT keyPressed(this, (QKeyEvent*) e); return true; default: @@ -427,18 +427,18 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent ) switch ( myOperation ) { case WINDOWFIT: if ( theEvent->button() == Qt::LeftButton ) - emit vpTransformationStarted ( WINDOWFIT ); + Q_EMIT vpTransformationStarted ( WINDOWFIT ); break; case PANGLOBAL: if ( theEvent->button() == Qt::LeftButton ) - emit vpTransformationStarted ( PANGLOBAL ); + Q_EMIT vpTransformationStarted ( PANGLOBAL ); break; case ZOOMVIEW: if ( theEvent->button() == Qt::LeftButton ) { myViewPort->startZoomAtPoint( myStartX, myStartY ); - emit vpTransformationStarted ( ZOOMVIEW ); + Q_EMIT vpTransformationStarted ( ZOOMVIEW ); } break; @@ -448,7 +448,7 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent ) activateZoom(); } else if ( theEvent->button() == Qt::LeftButton ) - emit vpTransformationStarted ( PANVIEW ); + Q_EMIT vpTransformationStarted ( PANVIEW ); break; case ROTATE: @@ -458,7 +458,7 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent ) } else if ( theEvent->button() == Qt::LeftButton ) { myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint); - emit vpTransformationStarted ( ROTATE ); + Q_EMIT vpTransformationStarted ( ROTATE ); } break; @@ -536,12 +536,12 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent ) } } else - emit mousePressed(this, theEvent); + Q_EMIT mousePressed(this, theEvent); break; } /* notify that we start a transformation */ if ( transformRequested() ) - emit vpTransformationStarted ( myOperation ); + Q_EMIT vpTransformationStarted ( myOperation ); } if ( transformRequested() ) setTransformInProcess( true ); @@ -909,7 +909,7 @@ void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent ) default: if ( myRotationPointSelection || isSketcherStyle() ) { - emit mouseMoving( this, theEvent ); + Q_EMIT mouseMoving( this, theEvent ); } else { @@ -930,7 +930,7 @@ void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent ) myViewPort->setCursor( handCursor ); } } - emit mouseMoving( this, theEvent ); + Q_EMIT mouseMoving( this, theEvent ); } else if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD && aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) || @@ -962,7 +962,7 @@ void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent ) } } else - emit mouseMoving( this, theEvent ); + Q_EMIT mouseMoving( this, theEvent ); } } } @@ -988,12 +988,12 @@ void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent) } } - emit mouseReleased(this, theEvent); + Q_EMIT mouseReleased(this, theEvent); if(theEvent->button() == Qt::RightButton && prevState == -1) { QContextMenuEvent aEvent( QContextMenuEvent::Mouse, theEvent->pos(), theEvent->globalPos() ); - emit contextMenuRequested( &aEvent ); + Q_EMIT contextMenuRequested( &aEvent ); } } break; @@ -1067,7 +1067,7 @@ void OCCViewer_ViewWindow::resetState() } if ( transformRequested() ) - emit vpTransformationFinished (myOperation); + Q_EMIT vpTransformationFinished (myOperation); setTransformInProcess( false ); setTransformRequested( NOTHING ); @@ -1462,11 +1462,11 @@ void OCCViewer_ViewWindow::onViewFitAll() */ void OCCViewer_ViewWindow::onFrontView() { - emit vpTransformationStarted ( FRONTVIEW ); + Q_EMIT vpTransformationStarted ( FRONTVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xpos); onViewFitAll(); - emit vpTransformationFinished ( FRONTVIEW ); + Q_EMIT vpTransformationFinished ( FRONTVIEW ); } /*! @@ -1474,11 +1474,11 @@ void OCCViewer_ViewWindow::onFrontView() */ void OCCViewer_ViewWindow::onBackView() { - emit vpTransformationStarted ( BACKVIEW ); + Q_EMIT vpTransformationStarted ( BACKVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xneg); onViewFitAll(); - emit vpTransformationFinished ( BACKVIEW ); + Q_EMIT vpTransformationFinished ( BACKVIEW ); } /*! @@ -1486,11 +1486,11 @@ void OCCViewer_ViewWindow::onBackView() */ void OCCViewer_ViewWindow::onTopView() { - emit vpTransformationStarted ( TOPVIEW ); + Q_EMIT vpTransformationStarted ( TOPVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zpos); onViewFitAll(); - emit vpTransformationFinished ( TOPVIEW ); + Q_EMIT vpTransformationFinished ( TOPVIEW ); } /*! @@ -1498,11 +1498,11 @@ void OCCViewer_ViewWindow::onTopView() */ void OCCViewer_ViewWindow::onBottomView() { - emit vpTransformationStarted ( BOTTOMVIEW ); + Q_EMIT vpTransformationStarted ( BOTTOMVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zneg); onViewFitAll(); - emit vpTransformationFinished ( BOTTOMVIEW ); + Q_EMIT vpTransformationFinished ( BOTTOMVIEW ); } /*! @@ -1510,11 +1510,11 @@ void OCCViewer_ViewWindow::onBottomView() */ void OCCViewer_ViewWindow::onLeftView() { - emit vpTransformationStarted ( LEFTVIEW ); + Q_EMIT vpTransformationStarted ( LEFTVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Yneg); onViewFitAll(); - emit vpTransformationFinished ( LEFTVIEW ); + Q_EMIT vpTransformationFinished ( LEFTVIEW ); } /*! @@ -1522,11 +1522,11 @@ void OCCViewer_ViewWindow::onLeftView() */ void OCCViewer_ViewWindow::onRightView() { - emit vpTransformationStarted ( RIGHTVIEW ); + Q_EMIT vpTransformationStarted ( RIGHTVIEW ); Handle(V3d_View) aView3d = myViewPort->getView(); if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Ypos); onViewFitAll(); - emit vpTransformationFinished ( RIGHTVIEW ); + Q_EMIT vpTransformationFinished ( RIGHTVIEW ); } /*! @@ -1534,9 +1534,9 @@ void OCCViewer_ViewWindow::onRightView() */ void OCCViewer_ViewWindow::onClockWiseView() { - emit vpTransformationStarted ( CLOCKWISEVIEW ); + Q_EMIT vpTransformationStarted ( CLOCKWISEVIEW ); myViewPort->rotateXY( 90. ); - emit vpTransformationFinished ( CLOCKWISEVIEW ); + Q_EMIT vpTransformationFinished ( CLOCKWISEVIEW ); } /*! @@ -1544,9 +1544,9 @@ void OCCViewer_ViewWindow::onClockWiseView() */ void OCCViewer_ViewWindow::onAntiClockWiseView() { - emit vpTransformationStarted ( ANTICLOCKWISEVIEW ); + Q_EMIT vpTransformationStarted ( ANTICLOCKWISEVIEW ); myViewPort->rotateXY( -90. ); - emit vpTransformationFinished ( ANTICLOCKWISEVIEW ); + Q_EMIT vpTransformationFinished ( ANTICLOCKWISEVIEW ); } /*! @@ -1556,13 +1556,13 @@ void OCCViewer_ViewWindow::onAntiClockWiseView() */ void OCCViewer_ViewWindow::onResetView() { - emit vpTransformationStarted( RESETVIEW ); + Q_EMIT vpTransformationStarted( RESETVIEW ); bool upd = myViewPort->getView()->SetImmediateUpdate( false ); myViewPort->getView()->Reset( false ); myViewPort->fitAll( false, true, false ); myViewPort->getView()->SetImmediateUpdate( upd ); myViewPort->getView()->Update(); - emit vpTransformationFinished( RESETVIEW ); + Q_EMIT vpTransformationFinished( RESETVIEW ); } /*! @@ -1570,9 +1570,9 @@ void OCCViewer_ViewWindow::onResetView() */ void OCCViewer_ViewWindow::onFitAll() { - emit vpTransformationStarted( FITALLVIEW ); + Q_EMIT vpTransformationStarted( FITALLVIEW ); myViewPort->fitAll(); - emit vpTransformationFinished( FITALLVIEW ); + Q_EMIT vpTransformationFinished( FITALLVIEW ); } /*! @@ -1615,7 +1615,7 @@ void OCCViewer_ViewWindow::onCloneView() { SUIT_ViewWindow* vw = myManager->createViewWindow(); //vw->show(); - emit viewCloned( vw ); + Q_EMIT viewCloned( vw ); } /*! @@ -2300,7 +2300,7 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters ) Qtx::BackgroundData bgData; if ( parameters.contains( '=' ) ) // new format - "scale=1.000e+00*centerX=0.000e+00..." { - foreach( QString param, data ) { + Q_FOREACH( QString param, data ) { QString paramName = param.section( '=', 0, 0 ).trimmed(); QString paramValue = param.section( '=', 1, 1 ).trimmed(); if ( paramName == "scale" ) params.scale = paramValue.toDouble(); @@ -2325,7 +2325,7 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters ) { QStringList ClipPlaneData = paramValue.split( ';' ); OCCViewer_ClipPlane aPlane; - foreach( QString ClipPlaneParam, ClipPlaneData ) + Q_FOREACH( QString ClipPlaneParam, ClipPlaneData ) { QString ClipPlane_paramName = ClipPlaneParam.section( '~', 0, 0 ).trimmed(); QString ClipPlane_paramValue = ClipPlaneParam.section( '~', 1, 1 ).trimmed(); @@ -2442,7 +2442,7 @@ void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters ) */ void OCCViewer_ViewWindow::showEvent( QShowEvent* theEvent ) { - emit Show( theEvent ); + Q_EMIT Show( theEvent ); } /*! @@ -2454,7 +2454,7 @@ void OCCViewer_ViewWindow::showEvent( QShowEvent* theEvent ) */ void OCCViewer_ViewWindow::hideEvent( QHideEvent* theEvent ) { - emit Hide( theEvent ); + Q_EMIT Hide( theEvent ); } @@ -2650,7 +2650,7 @@ void OCCViewer_ViewWindow::setReturnedTo3dView(bool isVisible3dView) toolMgr()->show( ReturnTo3dViewId ); else toolMgr()->hide( ReturnTo3dViewId ); - if ( isVisible3dView ) emit returnedTo3d( ); + if ( isVisible3dView ) Q_EMIT returnedTo3d( ); } @@ -2666,7 +2666,7 @@ void OCCViewer_ViewWindow::setMaximized(bool toMaximize, bool toSendSignal) anAction->setStatusTip( tr( "DSC_MINIMIZE_VIEW" ) ); if ( anAction2 && my2dMode != No2dMode ) toolMgr()->show( ReturnTo3dViewId ); if (toSendSignal) { - emit maximized( this, true ); + Q_EMIT maximized( this, true ); } } else { @@ -2676,7 +2676,7 @@ void OCCViewer_ViewWindow::setMaximized(bool toMaximize, bool toSendSignal) anAction->setStatusTip( tr( "DSC_MAXIMIZE_VIEW" ) ); if ( anAction2 && my2dMode != No2dMode ) toolMgr()->hide( ReturnTo3dViewId ); if (toSendSignal) { - emit maximized( this, false ); + Q_EMIT maximized( this, false ); } } } diff --git a/src/OCCViewer/OCCViewer_ViewWindow.h b/src/OCCViewer/OCCViewer_ViewWindow.h index 421e43f04..8b12b7185 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.h +++ b/src/OCCViewer/OCCViewer_ViewWindow.h @@ -235,7 +235,7 @@ public: virtual SUIT_CameraProperties cameraProperties(); -public slots: +public Q_SLOTS: virtual void onFrontView(); virtual void onViewFitAll(); virtual void onBackView(); @@ -278,7 +278,7 @@ public slots: virtual void onMaximizedView(); virtual void returnTo3dView(); -signals: +Q_SIGNALS: void vpTransformationStarted(OCCViewer_ViewWindow::OperationType type); void vpTransformationFinished(OCCViewer_ViewWindow::OperationType type); void viewCloned( SUIT_ViewWindow* ); @@ -288,7 +288,7 @@ signals: void maximized( OCCViewer_ViewWindow*, bool ); void returnedTo3d( ); -protected slots: +protected Q_SLOTS: void synchronize( SUIT_ViewWindow* ); public: diff --git a/src/OCCViewer/OCCViewer_ViewportInputFilter.h b/src/OCCViewer/OCCViewer_ViewportInputFilter.h index 96cfcec8a..54cce76f5 100644 --- a/src/OCCViewer/OCCViewer_ViewportInputFilter.h +++ b/src/OCCViewer/OCCViewer_ViewportInputFilter.h @@ -70,7 +70,7 @@ protected: protected: bool eventFilter( QObject*, QEvent* ); -protected slots: +protected Q_SLOTS: void onViewCreated( SUIT_ViewWindow* ); void onViewRemoved( SUIT_ViewWindow* ); diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 20634584a..f0383cc27 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -463,7 +463,7 @@ void OB_Browser::select( const QModelIndexList& indexes, const bool on, const bo } myView->blockSignals( blocked ); - emit( selectionChanged() ); + Q_EMIT( selectionChanged() ); } /*! @@ -594,7 +594,7 @@ void OB_Browser::updateTree( SUIT_DataObject* obj, const bool autoOpen ) setModified(); if ( selNum != numberOfSelected() ) - emit selectionChanged(); + Q_EMIT selectionChanged(); // QTime t2 = QTime::currentTime(); // qDebug( QString( "update tree time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) ); @@ -639,7 +639,7 @@ void OB_Browser::replaceTree( SUIT_DataObject* src, SUIT_DataObject* trg ) setModified(); if ( selNum != numberOfSelected() ) - emit selectionChanged(); + Q_EMIT selectionChanged(); } */ /*! @@ -896,12 +896,12 @@ void OB_Browser::onExpandAll() disconnect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), this, SLOT( onExpanded( const QModelIndex& ) ) ); - foreach ( index, indexes ) { + Q_FOREACH ( index, indexes ) { myView->expandAll( index ); } connect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), this, SLOT( onExpanded( const QModelIndex& ) ) ); - emit(onExpanded( index)); + Q_EMIT(onExpanded( index)); } /*! @@ -914,7 +914,7 @@ void OB_Browser::onCollapseAll() QModelIndexList indexes = selectedIndexes(); QModelIndex index; - foreach ( index, indexes ) { + Q_FOREACH ( index, indexes ) { myView->collapseAll( index ); } } @@ -952,7 +952,7 @@ void OB_Browser::onDropped( QPtrList items, QListViewItem* item, } if ( !lst.isEmpty() ) - emit dropped( lst, obj, action ); + Q_EMIT dropped( lst, obj, action ); } */ /*! @@ -1186,7 +1186,7 @@ void OB_Browser::openBranch( QListViewItem* item, const int level ) void OB_Browser::onDoubleClicked( QListViewItem* item ) { if ( item ) - emit doubleClicked( dataObject( item ) ); + Q_EMIT doubleClicked( dataObject( item ) ); } */ diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index 442d9b81b..911bc22e0 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -118,12 +118,12 @@ public: typedef QMap MapOfOpenStates; void openStates( bool isGet, MapOfOpenStates&, const QModelIndex& theIndex, int theColumn ); -signals: +Q_SIGNALS: void selectionChanged(); //void doubleClicked( SUIT_DataObject* ); //void dropped( DataObjectList, SUIT_DataObject*, int ); -private slots: +private Q_SLOTS: void onExpandAll(); void onCollapseAll(); virtual void onExpanded( const QModelIndex& ) {} diff --git a/src/Plot2d/Plot2d_AnalyticalCurveDlg.cxx b/src/Plot2d/Plot2d_AnalyticalCurveDlg.cxx index 9c2a83143..09233b01e 100755 --- a/src/Plot2d/Plot2d_AnalyticalCurveDlg.cxx +++ b/src/Plot2d/Plot2d_AnalyticalCurveDlg.cxx @@ -260,7 +260,7 @@ Plot2d_AnalyticalCurveDlg::~Plot2d_AnalyticalCurveDlg() void Plot2d_AnalyticalCurveDlg::init() { AnalyticalCurveList curves = myContainer->getAnalyticalCurves(); - foreach ( Plot2d_AnalyticalCurve* curve, curves ) { + Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) { QListWidgetItem* item = new QListWidgetItem( curve->getName() ); item->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); item->setCheckState( curve->isActive() ? Qt::Checked : Qt::Unchecked ); @@ -361,7 +361,7 @@ void Plot2d_AnalyticalCurveDlg::apply() { f->updateAnalyticalCurves(); AnalyticalCurveList curves = myContainer->getAnalyticalCurves(); - foreach ( Plot2d_AnalyticalCurve* curve, curves ) { + Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) { initPropsFromCurve(curve); } selectionChanged(); @@ -424,7 +424,7 @@ void Plot2d_AnalyticalCurveDlg::addCurve() void Plot2d_AnalyticalCurveDlg::removeCurve() { QList items = myCurvesList->selectedItems(); - foreach( QListWidgetItem* item, items ) { + Q_FOREACH( QListWidgetItem* item, items ) { Plot2d_AnalyticalCurve* curve = (Plot2d_AnalyticalCurve*)( item->data( Qt::UserRole ).value() ); delete item; if ( propStatus( curve ) == ItemAdded ) { diff --git a/src/Plot2d/Plot2d_AnalyticalCurveDlg.h b/src/Plot2d/Plot2d_AnalyticalCurveDlg.h index cfa12f7f7..2ffaa4200 100755 --- a/src/Plot2d/Plot2d_AnalyticalCurveDlg.h +++ b/src/Plot2d/Plot2d_AnalyticalCurveDlg.h @@ -84,7 +84,7 @@ private: QColor propColor( Plot2d_AnalyticalCurve* = 0, const QColor& def = QColor() ); bool propAutoAssign( Plot2d_AnalyticalCurve* = 0, bool def = true ); -private slots: +private Q_SLOTS: void addCurve(); void removeCurve(); void updateCurve(); @@ -122,7 +122,7 @@ class Plot2d_AnalyticalCurveDlg::Updater : public QObject public: Updater( QWidget* parent ); ~Updater(); -signals: +Q_SIGNALS: void update(); }; diff --git a/src/Plot2d/Plot2d_FitDataDlg.h b/src/Plot2d/Plot2d_FitDataDlg.h index cc85ef826..3ffbad1c4 100755 --- a/src/Plot2d/Plot2d_FitDataDlg.h +++ b/src/Plot2d/Plot2d_FitDataDlg.h @@ -56,7 +56,7 @@ public: // gets mode : 0 - Fit all; 1 - Fit horizontal, 2 - Fit vertical int getMode(); -protected slots: +protected Q_SLOTS: // called when range mode changed void onModeChanged(int); diff --git a/src/Plot2d/Plot2d_PlotItems.cxx b/src/Plot2d/Plot2d_PlotItems.cxx index 73fd3b40c..725ddc10d 100644 --- a/src/Plot2d/Plot2d_PlotItems.cxx +++ b/src/Plot2d/Plot2d_PlotItems.cxx @@ -281,7 +281,7 @@ class Plot2d_QwtPlotCurve::Plot2d_DeviationData { public: Plot2d_DeviationData(const double *min, const double *max,const QList& idx) { - foreach(int index,idx) { + Q_FOREACH(int index,idx) { myMin[index] = min[index]; myMax[index] = max[index]; } diff --git a/src/Plot2d/Plot2d_SetupCurveDlg.h b/src/Plot2d/Plot2d_SetupCurveDlg.h index ca3699e69..65fa6eb41 100644 --- a/src/Plot2d/Plot2d_SetupCurveDlg.h +++ b/src/Plot2d/Plot2d_SetupCurveDlg.h @@ -56,7 +56,7 @@ public: QColor getColor() const; -private slots: +private Q_SLOTS: void updatePreview(); private: diff --git a/src/Plot2d/Plot2d_SetupViewDlg.h b/src/Plot2d/Plot2d_SetupViewDlg.h index d6ecb76eb..4794edae9 100755 --- a/src/Plot2d/Plot2d_SetupViewDlg.h +++ b/src/Plot2d/Plot2d_SetupViewDlg.h @@ -110,7 +110,7 @@ public: bool isSetAsDefault(); -protected slots: +protected Q_SLOTS: void onMainTitleChecked(); void onXTitleChecked(); void onYTitleChecked(); diff --git a/src/Plot2d/Plot2d_ToolTip.h b/src/Plot2d/Plot2d_ToolTip.h index c8640b61c..a2574cb54 100644 --- a/src/Plot2d/Plot2d_ToolTip.h +++ b/src/Plot2d/Plot2d_ToolTip.h @@ -40,7 +40,7 @@ public: virtual bool eventFilter( QObject*, QEvent* ); -public slots: +public Q_SLOTS: void onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ); private: diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 1fd36d09b..cf8e99c71 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -293,7 +293,7 @@ void Plot2d_ViewFrame::DisplayAll() { objectList olist; getObjects( olist ); - foreach ( Plot2d_Object* o, olist ) + Q_FOREACH ( Plot2d_Object* o, olist ) updateObject( o, false ); myPlot->replot(); if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); @@ -1124,7 +1124,7 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) void Plot2d_ViewFrame::displayCurves( const curveList& curves, bool update ) { objectList objects; - foreach ( Plot2d_Curve* curve, curves ) + Q_FOREACH ( Plot2d_Curve* curve, curves ) objects << curve; displayObjects( objects, update ); } @@ -1143,7 +1143,7 @@ void Plot2d_ViewFrame::eraseCurve( Plot2d_Curve* curve, bool update ) void Plot2d_ViewFrame::eraseCurves( const curveList& curves, bool update ) { objectList objects; - foreach ( Plot2d_Curve* curve, curves ) + Q_FOREACH ( Plot2d_Curve* curve, curves ) objects << curve; eraseObjects( objects, update ); } @@ -1296,7 +1296,7 @@ QwtPlotItem* Plot2d_ViewFrame::displayObject( Plot2d_Object* object, bool update void Plot2d_ViewFrame::displayObjects( const objectList& objects, bool update ) { //myPlot->setUpdatesEnabled( false ); // call this function deprecate update of legend - foreach ( Plot2d_Object* object, objects ) + Q_FOREACH ( Plot2d_Object* object, objects ) displayObject( object, false ); fitAll(); //myPlot->setUpdatesEnabled( true ); @@ -1340,7 +1340,7 @@ void Plot2d_ViewFrame::eraseBasicObject( QwtPlotItem *object, bool update ) */ void Plot2d_ViewFrame::eraseObjects( const objectList& objects, bool update ) { - foreach ( Plot2d_Object* object, objects ) + Q_FOREACH ( Plot2d_Object* object, objects ) eraseObject( object, false ); // fitAll(); @@ -1351,7 +1351,7 @@ void Plot2d_ViewFrame::eraseObjects( const objectList& objects, bool update ) void Plot2d_ViewFrame::eraseBasicObjects( const QList &objects, bool update) { - foreach ( QwtPlotItem* object, objects ) + Q_FOREACH ( QwtPlotItem* object, objects ) eraseBasicObject( object, false ); // fitAll(); if ( update ) @@ -1609,7 +1609,7 @@ void Plot2d_ViewFrame::getFitRangeByMarkers(double& xMin, double& xMax, return; if(picker->pMarkers.empty()) return; - foreach(QwtPlotMarker *mrker,picker->pMarkers) + Q_FOREACH(QwtPlotMarker *mrker,picker->pMarkers) { bool isV2 = mrker->yAxis() == QwtPlot::yRight; xMin = qMin( xMin, mrker->xValue() ); @@ -1990,7 +1990,7 @@ void Plot2d_ViewFrame::setCurveType( int curveType, bool update ) } if ( update ) myPlot->replot(); - emit vpCurveChanged(); + Q_EMIT vpCurveChanged(); } /*! @@ -2438,7 +2438,7 @@ void Plot2d_ViewFrame::setHorScaleMode( const int mode, bool update ) if ( update ) fitAll(); - emit vpModeHorChanged(); + Q_EMIT vpModeHorChanged(); } /*! @@ -2488,7 +2488,7 @@ void Plot2d_ViewFrame::setVerScaleMode( const int mode, bool update ) if ( update ) fitAll(); - emit vpModeVerChanged(); + Q_EMIT vpModeVerChanged(); } /*! @@ -2511,7 +2511,7 @@ void Plot2d_ViewFrame::setNormLMaxMode( bool mode, bool update ) processFiltering(true); if ( update ) fitAll(); - emit vpNormLModeChanged(); + Q_EMIT vpNormLModeChanged(); } /*! @@ -2534,7 +2534,7 @@ void Plot2d_ViewFrame::setNormLMinMode( bool mode, bool update ) processFiltering(true); if ( update ) fitAll(); - emit vpNormLModeChanged(); + Q_EMIT vpNormLModeChanged(); } /*! @@ -2557,7 +2557,7 @@ void Plot2d_ViewFrame::setNormRMaxMode( bool mode, bool update ) processFiltering(true); if ( update ) fitAll(); - emit vpNormRModeChanged(); + Q_EMIT vpNormRModeChanged(); } /*! @@ -2580,7 +2580,7 @@ void Plot2d_ViewFrame::setNormRMinMode( bool mode, bool update ) processFiltering(true); if ( update ) fitAll(); - emit vpNormRModeChanged(); + Q_EMIT vpNormRModeChanged(); } /*! @@ -2725,7 +2725,7 @@ void Plot2d_ViewFrame::plotMouseReleased( const QMouseEvent& me ) { QContextMenuEvent aEvent( QContextMenuEvent::Mouse, me.pos(), me.globalPos() ); - emit contextMenuRequested( &aEvent ); + Q_EMIT contextMenuRequested( &aEvent ); } else { #ifndef NO_ANALYTICAL_CURVES @@ -4062,7 +4062,7 @@ Plot2d_Curve* Plot2d_ViewFrame::getClosestCurve( QPoint p, double& distance, int \brief Deselect all analytical curves. */ void Plot2d_ViewFrame::deselectAnalyticalCurves() { - foreach(Plot2d_AnalyticalCurve* c, myAnalyticalCurves) { + Q_FOREACH(Plot2d_AnalyticalCurve* c, myAnalyticalCurves) { c->setSelected(false); } } diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 0a6f20214..4e16e124f 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -270,7 +270,7 @@ protected: QString getXmlVisualParameters(); bool setXmlVisualParameters(const QString&); -public slots: +public Q_SLOTS: void onViewPan(); void onViewZoom(); void onViewFitAll(); @@ -295,7 +295,7 @@ protected: bool plotMouseMoved( const QMouseEvent& ); void plotMouseReleased( const QMouseEvent& ); -signals: +Q_SIGNALS: void vpModeHorChanged(); void vpModeVerChanged(); void vpNormLModeChanged(); diff --git a/src/Plot2d/Plot2d_ViewManager.cxx b/src/Plot2d/Plot2d_ViewManager.cxx index 1ee5059e4..680cde6f5 100755 --- a/src/Plot2d/Plot2d_ViewManager.cxx +++ b/src/Plot2d/Plot2d_ViewManager.cxx @@ -107,7 +107,7 @@ Plot2d_ViewWindow* Plot2d_ViewManager::cloneView( Plot2d_ViewWindow* srcWnd ) newWnd = ( Plot2d_ViewWindow* )vw; if( newWnd && srcWnd ) - emit cloneView( srcWnd->getViewFrame(), newWnd->getViewFrame() ); + Q_EMIT cloneView( srcWnd->getViewFrame(), newWnd->getViewFrame() ); return newWnd; } diff --git a/src/Plot2d/Plot2d_ViewManager.h b/src/Plot2d/Plot2d_ViewManager.h index e2af983d1..13bcfcb1a 100755 --- a/src/Plot2d/Plot2d_ViewManager.h +++ b/src/Plot2d/Plot2d_ViewManager.h @@ -48,13 +48,13 @@ public: protected: bool insertView(SUIT_ViewWindow* theView); -public slots: +public Q_SLOTS: void createView(); -protected slots: +protected Q_SLOTS: void onCloneView(); -signals: +Q_SIGNALS: void cloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* ); }; diff --git a/src/Plot2d/Plot2d_ViewModel.cxx b/src/Plot2d/Plot2d_ViewModel.cxx index 23e5893f0..a147fed80 100755 --- a/src/Plot2d/Plot2d_ViewModel.cxx +++ b/src/Plot2d/Plot2d_ViewModel.cxx @@ -213,7 +213,7 @@ void Plot2d_Viewer::onCloneView( Plot2d_ViewFrame* clonedVF, Plot2d_ViewFrame* n // emits signal if ( p && p->inherits( "SUIT_ViewWindow" ) ) - emit viewCloned( (SUIT_ViewWindow*)p ); + Q_EMIT viewCloned( (SUIT_ViewWindow*)p ); } } diff --git a/src/Plot2d/Plot2d_ViewModel.h b/src/Plot2d/Plot2d_ViewModel.h index 34ffd843a..c8e0447c3 100755 --- a/src/Plot2d/Plot2d_ViewModel.h +++ b/src/Plot2d/Plot2d_ViewModel.h @@ -54,10 +54,10 @@ public: void clearPrs(); void setAutoDel(bool theDel); -signals: +Q_SIGNALS: void viewCloned( SUIT_ViewWindow* ); -protected slots: +protected Q_SLOTS: void onChangeBgColor(); void onDumpView(); void onShowToolbar(); diff --git a/src/Plot2d/Plot2d_ViewWindow.cxx b/src/Plot2d/Plot2d_ViewWindow.cxx index 9b3629d50..e7d0ae8bc 100755 --- a/src/Plot2d/Plot2d_ViewWindow.cxx +++ b/src/Plot2d/Plot2d_ViewWindow.cxx @@ -185,13 +185,13 @@ bool Plot2d_ViewWindow::eventFilter( QObject* watched, QEvent* e ) if ( watched == myViewFrame ) { switch( e->type() ) { case QEvent::MouseButtonPress: - emit mousePressed( this, (QMouseEvent*)e ); + Q_EMIT mousePressed( this, (QMouseEvent*)e ); return true; case QEvent::MouseButtonRelease: - emit mouseReleased( this, (QMouseEvent*)e ); + Q_EMIT mouseReleased( this, (QMouseEvent*)e ); return true; case QEvent::MouseMove: - emit mouseMoving( this, (QMouseEvent*)e ); + Q_EMIT mouseMoving( this, (QMouseEvent*)e ); return true; default: break; diff --git a/src/Plot2d/Plot2d_ViewWindow.h b/src/Plot2d/Plot2d_ViewWindow.h index 2eba31c07..8ff6cdc7d 100755 --- a/src/Plot2d/Plot2d_ViewWindow.h +++ b/src/Plot2d/Plot2d_ViewWindow.h @@ -82,7 +82,7 @@ public: virtual void RefreshDumpImage(); -public slots: +public Q_SLOTS: void onChangeHorMode(); void onChangeVerMode(); void onChangeCurveMode(); @@ -113,7 +113,7 @@ protected: const QString& ); virtual QString filter() const; -signals: +Q_SIGNALS: void cloneView(); private: diff --git a/src/PyConsole/PyConsole_Editor.h b/src/PyConsole/PyConsole_Editor.h index c3e5ca1dd..1ab9fb25e 100644 --- a/src/PyConsole/PyConsole_Editor.h +++ b/src/PyConsole/PyConsole_Editor.h @@ -60,7 +60,7 @@ public: virtual QSize sizeHint() const; -public slots: +public Q_SLOTS: void cut(); void paste(); void clear(); diff --git a/src/PyConsole/PyConsole_EnhEditor.cxx b/src/PyConsole/PyConsole_EnhEditor.cxx index 20a5ef1c5..cdbfced82 100644 --- a/src/PyConsole/PyConsole_EnhEditor.cxx +++ b/src/PyConsole/PyConsole_EnhEditor.cxx @@ -285,9 +285,9 @@ void PyConsole_EnhEditor::customEvent( QEvent* event ) cursor.insertText(first_match); _tab_mode = false; if (doc == QString("")) - emit updateDoc(formatDocHTML("(no documentation available)\n")); + Q_EMIT updateDoc(formatDocHTML("(no documentation available)\n")); else - emit updateDoc(formatDocHTML(doc)); + Q_EMIT updateDoc(formatDocHTML(doc)); } else { @@ -302,7 +302,7 @@ void PyConsole_EnhEditor::customEvent( QEvent* event ) if (base == matches[0]) { doc = formatDocHTML(doc); - emit updateDoc(doc); + Q_EMIT updateDoc(doc); } // Print all matching completion in a "undo-able" block diff --git a/src/PyConsole/PyConsole_EnhEditor.h b/src/PyConsole/PyConsole_EnhEditor.h index c18738f29..e0d4118c2 100644 --- a/src/PyConsole/PyConsole_EnhEditor.h +++ b/src/PyConsole/PyConsole_EnhEditor.h @@ -41,7 +41,7 @@ public: PyConsole_EnhEditor(PyConsole_EnhInterp * interp, QWidget * parent=0); virtual ~PyConsole_EnhEditor() {} -signals: +Q_SIGNALS: /** * Signal emitted by the editor widget when the doc string should be updated. * @param doc a HTML block with the formatted doc string. diff --git a/src/PyInterp/PyInterp_Watcher.h b/src/PyInterp/PyInterp_Watcher.h index e3705bc17..ec3e0b407 100755 --- a/src/PyInterp/PyInterp_Watcher.h +++ b/src/PyInterp/PyInterp_Watcher.h @@ -42,7 +42,7 @@ public: PyInterp_Watcher() : QObject( 0 ) {} virtual ~PyInterp_Watcher() {} -public slots: +public Q_SLOTS: void onDestroyed( QObject* o ) { PyInterp_Dispatcher::Get()->objectDestroyed( o ); } }; diff --git a/src/QDS/QDS_CheckBox.cxx b/src/QDS/QDS_CheckBox.cxx index a280a6601..94f616634 100644 --- a/src/QDS/QDS_CheckBox.cxx +++ b/src/QDS/QDS_CheckBox.cxx @@ -150,7 +150,7 @@ QWidget* QDS_CheckBox::createControl( QWidget* parent ) */ void QDS_CheckBox::onParamChanged() { - emit paramChanged(); + Q_EMIT paramChanged(); } /*! diff --git a/src/QDS/QDS_CheckBox.h b/src/QDS/QDS_CheckBox.h index e6553ce6f..653d148ff 100644 --- a/src/QDS/QDS_CheckBox.h +++ b/src/QDS/QDS_CheckBox.h @@ -42,10 +42,10 @@ public: virtual void clear(); -signals: +Q_SIGNALS: void toggled( bool ); -private slots: +private Q_SLOTS: void onParamChanged(); void onStateChanged( int ); diff --git a/src/QDS/QDS_ComboBox.cxx b/src/QDS/QDS_ComboBox.cxx index 151187491..b1a4f4873 100644 --- a/src/QDS/QDS_ComboBox.cxx +++ b/src/QDS/QDS_ComboBox.cxx @@ -418,10 +418,10 @@ void QDS_ComboBox::setString( const QString& txt ) { onParamChanged(); QString str = getString(); - emit activated( integerValue() ); - emit activated( str ); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT activated( integerValue() ); + Q_EMIT activated( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } } @@ -541,9 +541,9 @@ void QDS_ComboBox::unitSystemChanged( const QString& system ) void QDS_ComboBox::onTextChanged( const QString& /*txt*/ ) { onParamChanged(); - emit paramChanged(); + Q_EMIT paramChanged(); QString str = getString(); - emit paramChanged( str ); + Q_EMIT paramChanged( str ); } /*! @@ -564,10 +564,10 @@ void QDS_ComboBox::onActivated( int idx ) { onParamChanged(); QString str = getString(); - emit activated( id ); - emit activated( str ); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT activated( id ); + Q_EMIT activated( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } } diff --git a/src/QDS/QDS_ComboBox.h b/src/QDS/QDS_ComboBox.h index 2d11c8634..3036d3e99 100644 --- a/src/QDS/QDS_ComboBox.h +++ b/src/QDS/QDS_ComboBox.h @@ -69,11 +69,11 @@ public: int stringToValue( const QString& ) const; QString valueToString( const int ) const; -signals: +Q_SIGNALS: void activated( int ); void activated( const QString& ); -protected slots: +protected Q_SLOTS: virtual void onActivated( int ); virtual void onTextChanged( const QString& ); diff --git a/src/QDS/QDS_Datum.cxx b/src/QDS/QDS_Datum.cxx index f1eafc136..8323a3b6c 100644 --- a/src/QDS/QDS_Datum.cxx +++ b/src/QDS/QDS_Datum.cxx @@ -689,8 +689,8 @@ void QDS_Datum::reset() onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! @@ -708,8 +708,8 @@ void QDS_Datum::clear() onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } } @@ -773,8 +773,8 @@ void QDS_Datum::setStringValue( const QString& txt ) onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! @@ -801,8 +801,8 @@ void QDS_Datum::setDoubleValue( const double num ) onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! @@ -829,8 +829,8 @@ void QDS_Datum::setIntegerValue( const int num ) onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! diff --git a/src/QDS/QDS_Datum.h b/src/QDS/QDS_Datum.h index 538d3cd4b..be7e948aa 100644 --- a/src/QDS/QDS_Datum.h +++ b/src/QDS/QDS_Datum.h @@ -123,17 +123,17 @@ public: bool isCustomTr() const; void enableCustomTr( const bool ); -signals: +Q_SIGNALS: void paramChanged(); void paramChanged( QString& ); -public slots: +public Q_SLOTS: void setEnabled( bool ); -protected slots: +protected Q_SLOTS: virtual void onParamChanged(); -private slots: +private Q_SLOTS: void onInitDatum(); void onDestroyed( QObject* ); diff --git a/src/QDS/QDS_LineEdit.cxx b/src/QDS/QDS_LineEdit.cxx index 9666c4b4c..668dc781c 100644 --- a/src/QDS/QDS_LineEdit.cxx +++ b/src/QDS/QDS_LineEdit.cxx @@ -247,8 +247,8 @@ void QDS_LineEdit::onTextChanged( const QString& /*txt*/ ) onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! diff --git a/src/QDS/QDS_LineEdit.h b/src/QDS/QDS_LineEdit.h index 7d87c0aa8..af112a51d 100644 --- a/src/QDS/QDS_LineEdit.h +++ b/src/QDS/QDS_LineEdit.h @@ -49,13 +49,13 @@ public: virtual QString getString() const; -signals: +Q_SIGNALS: void returnPressed(); -protected slots: +protected Q_SLOTS: virtual void onParamChanged(); -private slots: +private Q_SLOTS: void onTextChanged( const QString& ); protected: diff --git a/src/QDS/QDS_RadioBox.cxx b/src/QDS/QDS_RadioBox.cxx index 8c51bfefb..82a6a474d 100644 --- a/src/QDS/QDS_RadioBox.cxx +++ b/src/QDS/QDS_RadioBox.cxx @@ -284,9 +284,9 @@ void QDS_RadioBox::setString( const QString& txt ) { onParamChanged(); QString str = getString(); - emit activated( newId ); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT activated( newId ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } } @@ -410,9 +410,9 @@ void QDS_RadioBox::onToggled( bool on ) return; onParamChanged(); - emit paramChanged(); + Q_EMIT paramChanged(); QString str = getString(); - emit paramChanged( str ); + Q_EMIT paramChanged( str ); } /*! @@ -474,8 +474,8 @@ void QDS_RadioBox::updateRadioBox() { onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } } diff --git a/src/QDS/QDS_RadioBox.h b/src/QDS/QDS_RadioBox.h index 98e589baa..1e35f3f6c 100644 --- a/src/QDS/QDS_RadioBox.h +++ b/src/QDS/QDS_RadioBox.h @@ -60,10 +60,10 @@ public: virtual QString getString() const; -signals: +Q_SIGNALS: void activated( int ); -protected slots: +protected Q_SLOTS: virtual void onToggled( bool ); protected: diff --git a/src/QDS/QDS_SpinBox.cxx b/src/QDS/QDS_SpinBox.cxx index d10f7e064..5d62cefc9 100644 --- a/src/QDS/QDS_SpinBox.cxx +++ b/src/QDS/QDS_SpinBox.cxx @@ -126,8 +126,8 @@ void QDS_SpinBox::onValueChanged( int val ) { onParamChanged(); QString str = QString::number( val ); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! diff --git a/src/QDS/QDS_SpinBox.h b/src/QDS/QDS_SpinBox.h index a2b158196..c401ba6f6 100644 --- a/src/QDS/QDS_SpinBox.h +++ b/src/QDS/QDS_SpinBox.h @@ -40,7 +40,7 @@ public: virtual QString getString() const; -private slots: +private Q_SLOTS: void onValueChanged( int ); protected: diff --git a/src/QDS/QDS_SpinBoxDbl.cxx b/src/QDS/QDS_SpinBoxDbl.cxx index 1e495535d..3c33225b8 100644 --- a/src/QDS/QDS_SpinBoxDbl.cxx +++ b/src/QDS/QDS_SpinBoxDbl.cxx @@ -135,8 +135,8 @@ void QDS_SpinBoxDbl::onValueChanged( double ) onParamChanged(); QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! diff --git a/src/QDS/QDS_SpinBoxDbl.h b/src/QDS/QDS_SpinBoxDbl.h index 88c742891..149ca8699 100644 --- a/src/QDS/QDS_SpinBoxDbl.h +++ b/src/QDS/QDS_SpinBoxDbl.h @@ -40,7 +40,7 @@ public: virtual QString getString() const; -private slots: +private Q_SLOTS: void onValueChanged( double ); protected: diff --git a/src/QDS/QDS_TextEdit.cxx b/src/QDS/QDS_TextEdit.cxx index c7fe1552f..914c1dbb1 100644 --- a/src/QDS/QDS_TextEdit.cxx +++ b/src/QDS/QDS_TextEdit.cxx @@ -116,8 +116,8 @@ void QDS_TextEdit::onTextChanged() QString str = getString(); - emit paramChanged(); - emit paramChanged( str ); + Q_EMIT paramChanged(); + Q_EMIT paramChanged( str ); } /*! diff --git a/src/QDS/QDS_TextEdit.h b/src/QDS/QDS_TextEdit.h index 14bd835d2..4fb7cbb3d 100644 --- a/src/QDS/QDS_TextEdit.h +++ b/src/QDS/QDS_TextEdit.h @@ -37,10 +37,10 @@ public: virtual QString getString() const; -signals: +Q_SIGNALS: void returnPressed(); -private slots: +private Q_SLOTS: void onTextChanged(); protected: diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index 9036354bc..88e7fba83 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -1260,7 +1260,7 @@ QString Qtx::gradientToString( const QLinearGradient& gradient ) } QGradientStops stops = gradient.stops(); QGradientStop stop; - foreach ( stop, stops ) + Q_FOREACH ( stop, stops ) { data << QString::number( stop.first ); data << colorToString( stop.second ); @@ -1299,7 +1299,7 @@ QString Qtx::gradientToString( const QRadialGradient& gradient ) } QGradientStops stops = gradient.stops(); QGradientStop stop; - foreach ( stop, stops ) + Q_FOREACH ( stop, stops ) { data << QString::number( stop.first ); data << colorToString( stop.second ); @@ -1336,7 +1336,7 @@ QString Qtx::gradientToString( const QConicalGradient& gradient ) } QGradientStops stops = gradient.stops(); QGradientStop stop; - foreach ( stop, stops ) + Q_FOREACH ( stop, stops ) { data << QString::number( stop.first ); data << colorToString( stop.second ); @@ -1631,7 +1631,7 @@ Qtx::BackgroundData Qtx::stringToBackground( const QString& str ) else { QMap dmap; // background data - foreach( QString d, data ) { + Q_FOREACH( QString d, data ) { QStringList items = d.split( kwSep, QString::KeepEmptyParts ); if ( items.count() > 0 ) { QString kw = items.takeFirst().trimmed().toLower(); // keyword diff --git a/src/Qtx/QtxActionGroup.cxx b/src/Qtx/QtxActionGroup.cxx index aebae6374..43bc41b7c 100644 --- a/src/Qtx/QtxActionGroup.cxx +++ b/src/Qtx/QtxActionGroup.cxx @@ -205,7 +205,7 @@ void QtxActionGroup::onTriggered( QAction* a ) } } - emit selected( a ); + Q_EMIT selected( a ); } /*! diff --git a/src/Qtx/QtxActionGroup.h b/src/Qtx/QtxActionGroup.h index dd2470256..5cb60026f 100644 --- a/src/Qtx/QtxActionGroup.h +++ b/src/Qtx/QtxActionGroup.h @@ -48,14 +48,14 @@ public: void setEnabled( bool ); -public slots: +public Q_SLOTS: void setExclusive( const bool ); void setUsesDropDown( const bool ); -signals: +Q_SIGNALS: void selected( QAction* ); -private slots: +private Q_SLOTS: void onActivated( int ); void onTriggered( QAction* ); diff --git a/src/Qtx/QtxActionMenuMgr.cxx b/src/Qtx/QtxActionMenuMgr.cxx index c6b8affc4..a850dad0d 100644 --- a/src/Qtx/QtxActionMenuMgr.cxx +++ b/src/Qtx/QtxActionMenuMgr.cxx @@ -586,7 +586,7 @@ void QtxActionMenuMgr::onAboutToShow() { QMenu* m = ::qobject_cast( sender() ); if ( m ) - emit menuAboutToShow( m ); + Q_EMIT menuAboutToShow( m ); } /*! @@ -598,7 +598,7 @@ void QtxActionMenuMgr::onAboutToHide() { QMenu* m = ::qobject_cast( sender() ); if ( m ) - emit menuAboutToHide( m ); + Q_EMIT menuAboutToHide( m ); } /*! @@ -902,7 +902,7 @@ void QtxActionMenuMgr::updateMenu( MenuNode* startNode, const bool rec, const bo } } QList alist = mw->actions(); - foreach( a, alist ) mw->removeAction( a ); + Q_FOREACH( a, alist ) mw->removeAction( a ); // collect all registered menus by group id QMap idMap; @@ -958,7 +958,7 @@ void QtxActionMenuMgr::updateMenu( MenuNode* startNode, const bool rec, const bo // rebuild menu: 2. insert back all foreign actions for( formapit = foreign.begin(); formapit != foreign.end(); ++formapit ) { preva = formapit.key(); - foreach( a, formapit.value() ) + Q_FOREACH( a, formapit.value() ) mw->insertAction( preva, a ); } diff --git a/src/Qtx/QtxActionMenuMgr.h b/src/Qtx/QtxActionMenuMgr.h index cea6ddedd..41847dd5e 100644 --- a/src/Qtx/QtxActionMenuMgr.h +++ b/src/Qtx/QtxActionMenuMgr.h @@ -103,12 +103,12 @@ public: bool isEmptyEnabled( const int ) const; void setEmptyEnabled( const int, const bool ); -private slots: +private Q_SLOTS: void onAboutToShow(); void onAboutToHide(); void onDestroyed( QObject* ); -signals: +Q_SIGNALS: void menuAboutToShow( QMenu* ); void menuAboutToHide( QMenu* ); diff --git a/src/Qtx/QtxActionMgr.h b/src/Qtx/QtxActionMgr.h index 2007ab69b..de32efea8 100644 --- a/src/Qtx/QtxActionMgr.h +++ b/src/Qtx/QtxActionMgr.h @@ -89,7 +89,7 @@ protected: void triggerUpdate(); virtual void updateContent(); -private slots: +private Q_SLOTS: void onUpdateContent(); private: diff --git a/src/Qtx/QtxActionSet.cxx b/src/Qtx/QtxActionSet.cxx index 23e3f4336..5cb6d683d 100644 --- a/src/Qtx/QtxActionSet.cxx +++ b/src/Qtx/QtxActionSet.cxx @@ -243,8 +243,8 @@ void QtxActionSet::onActionTriggered( bool /*on*/ ) int id = actionId( a ); if ( id != -1 ) - emit triggered( id ); - emit triggered( a ); + Q_EMIT triggered( id ); + Q_EMIT triggered( a ); } /*! diff --git a/src/Qtx/QtxActionSet.h b/src/Qtx/QtxActionSet.h index cbce7a8b8..154a310ed 100644 --- a/src/Qtx/QtxActionSet.h +++ b/src/Qtx/QtxActionSet.h @@ -53,11 +53,11 @@ public: void clear(); -signals: +Q_SIGNALS: void triggered( int ); void triggered( QAction* ); -private slots: +private Q_SLOTS: void onChanged(); void onActionTriggered( bool = false ); diff --git a/src/Qtx/QtxActionToolMgr.h b/src/Qtx/QtxActionToolMgr.h index 5f2b6e136..7efcda3e7 100644 --- a/src/Qtx/QtxActionToolMgr.h +++ b/src/Qtx/QtxActionToolMgr.h @@ -114,7 +114,7 @@ public: int find( QToolBar* ) const; -protected slots: +protected Q_SLOTS: void onToolBarDestroyed(); protected: diff --git a/src/Qtx/QtxBackgroundTool.h b/src/Qtx/QtxBackgroundTool.h index 1ef40f2f1..155118aae 100644 --- a/src/Qtx/QtxBackgroundTool.h +++ b/src/Qtx/QtxBackgroundTool.h @@ -73,7 +73,7 @@ private: void init( Qt::Orientation ); void internalUpdate(); -private slots: +private Q_SLOTS: void updateState(); void browse(); diff --git a/src/Qtx/QtxBiColorTool.h b/src/Qtx/QtxBiColorTool.h index a21928198..67a4c15fc 100644 --- a/src/Qtx/QtxBiColorTool.h +++ b/src/Qtx/QtxBiColorTool.h @@ -55,7 +55,7 @@ public: QLabel* label(); -private slots: +private Q_SLOTS: void updateState(); private: diff --git a/src/Qtx/QtxColorButton.cxx b/src/Qtx/QtxColorButton.cxx index 0424a691c..a05ca2977 100644 --- a/src/Qtx/QtxColorButton.cxx +++ b/src/Qtx/QtxColorButton.cxx @@ -208,7 +208,7 @@ void QtxColorButton::onAboutToShow() */ void QtxColorButton::onClicked( bool ) { - emit clicked( color() ); + Q_EMIT clicked( color() ); } /*! @@ -240,7 +240,7 @@ void QtxColorButton::onToggled( bool on ) updateState(); if ( old != color() ) - emit changed( color() ); + Q_EMIT changed( color() ); } /*! @@ -280,7 +280,7 @@ void QtxColorButton::onDialogClicked( bool ) setColor( c ); if ( old != color() ) - emit changed( color() ); + Q_EMIT changed( color() ); } /*! diff --git a/src/Qtx/QtxColorButton.h b/src/Qtx/QtxColorButton.h index 6f520faad..b9c5e04bf 100644 --- a/src/Qtx/QtxColorButton.h +++ b/src/Qtx/QtxColorButton.h @@ -51,11 +51,11 @@ public: QString autoText() const; void setAutoText( const QString& ); -signals: +Q_SIGNALS: void clicked( QColor ); void changed( QColor ); -private slots: +private Q_SLOTS: void onClicked( bool ); void onToggled( bool ); diff --git a/src/Qtx/QtxComboBox.cxx b/src/Qtx/QtxComboBox.cxx index b53411ea4..01242e679 100755 --- a/src/Qtx/QtxComboBox.cxx +++ b/src/Qtx/QtxComboBox.cxx @@ -244,7 +244,7 @@ void QtxComboBox::onCurrentChanged( int idx ) if ( idx != -1 ) { resetClear(); - emit activatedId( id( idx ) ); + Q_EMIT activatedId( id( idx ) ); } } diff --git a/src/Qtx/QtxComboBox.h b/src/Qtx/QtxComboBox.h index 1ded8976a..165261ac0 100755 --- a/src/Qtx/QtxComboBox.h +++ b/src/Qtx/QtxComboBox.h @@ -58,10 +58,10 @@ public: bool hasId( const int ) const; void setId( const int, const int ); -signals: +Q_SIGNALS: void activatedId( int ); -private slots: +private Q_SLOTS: void onCurrentChanged( int ); protected: diff --git a/src/Qtx/QtxDialog.cxx b/src/Qtx/QtxDialog.cxx index 192bfdae8..6bd9abfdf 100755 --- a/src/Qtx/QtxDialog.cxx +++ b/src/Qtx/QtxDialog.cxx @@ -1315,14 +1315,14 @@ void QtxDialog::keyPressEvent( QKeyEvent* e ) if ( testButtonFlags( OK ) || testButtonFlags( Yes ) ) accept(); else if ( testButtonFlags( Apply ) && isButtonEnabled( Apply ) ) - emit dlgApply(); + Q_EMIT dlgApply(); e->accept(); } if ( e->key() == Qt::Key_F1 && testButtonFlags( Help ) && isButtonEnabled( Help ) ) { e->accept(); - emit dlgHelp(); + Q_EMIT dlgHelp(); } if ( e->key() == Qt::Key_Tab && e->modifiers() & Qt::ControlModifier ) @@ -1450,19 +1450,19 @@ void QtxDialog::emitSignal() switch ( id ) { case OK: - emit dlgOk(); + Q_EMIT dlgOk(); break; case Cancel: - emit dlgCancel(); + Q_EMIT dlgCancel(); break; case Close: - emit dlgClose(); + Q_EMIT dlgClose(); break; case Yes: - emit dlgYes(); + Q_EMIT dlgYes(); break; case No: - emit dlgNo(); + Q_EMIT dlgNo(); break; } } @@ -1505,7 +1505,7 @@ void QtxDialog::onButton() { int id = buttonId( (QAbstractButton*)sender() ); if ( id != -1 ) - emit dlgButton( id ); + Q_EMIT dlgButton( id ); } /*! diff --git a/src/Qtx/QtxDialog.h b/src/Qtx/QtxDialog.h index 7aaf48358..5e7e8b778 100755 --- a/src/Qtx/QtxDialog.h +++ b/src/Qtx/QtxDialog.h @@ -127,7 +127,7 @@ public: uint setAlignment( uint align ); static void setUnits( QLabel*, const QString& ); -signals: +Q_SIGNALS: void dlgButton( int ); void dlgParamChanged(); @@ -140,15 +140,15 @@ signals: void dlgClose(); void dlgCancel(); -public slots: +public Q_SLOTS: void update(); virtual void setVisible( bool ); -protected slots: +protected Q_SLOTS: virtual void accept(); virtual void reject(); -private slots: +private Q_SLOTS: void onAccept(); void onReject(); void onButton(); diff --git a/src/Qtx/QtxDockAction.h b/src/Qtx/QtxDockAction.h index de6337be7..81443a0f4 100755 --- a/src/Qtx/QtxDockAction.h +++ b/src/Qtx/QtxDockAction.h @@ -64,7 +64,7 @@ public: QMainWindow* mainWindow() const; -private slots: +private Q_SLOTS: void onAboutToShow(); protected: diff --git a/src/Qtx/QtxDockWidget.cxx b/src/Qtx/QtxDockWidget.cxx index 041bdc77e..570c1a6e5 100644 --- a/src/Qtx/QtxDockWidget.cxx +++ b/src/Qtx/QtxDockWidget.cxx @@ -475,7 +475,7 @@ void QtxDockWidget::updateState() myOrientation = o; - emit orientationChanged( myOrientation ); + Q_EMIT orientationChanged( myOrientation ); } /*! diff --git a/src/Qtx/QtxDockWidget.h b/src/Qtx/QtxDockWidget.h index 6055b2d53..56068c49b 100644 --- a/src/Qtx/QtxDockWidget.h +++ b/src/Qtx/QtxDockWidget.h @@ -47,10 +47,10 @@ public: Qt::Orientation orientation() const; -signals: +Q_SIGNALS: void orientationChanged( Qt::Orientation ); -public slots: +public Q_SLOTS: virtual void setVisible( bool ); protected: diff --git a/src/Qtx/QtxDoubleSpinBox.h b/src/Qtx/QtxDoubleSpinBox.h index 644430b01..0fd3d2df1 100644 --- a/src/Qtx/QtxDoubleSpinBox.h +++ b/src/Qtx/QtxDoubleSpinBox.h @@ -51,7 +51,7 @@ public: virtual QValidator::State validate( QString&, int& ) const; -protected slots: +protected Q_SLOTS: virtual void onTextChanged( const QString& ); protected: diff --git a/src/Qtx/QtxDoubleSpinSlider.cxx b/src/Qtx/QtxDoubleSpinSlider.cxx index 3de754387..308ad1e5f 100644 --- a/src/Qtx/QtxDoubleSpinSlider.cxx +++ b/src/Qtx/QtxDoubleSpinSlider.cxx @@ -82,7 +82,7 @@ void QtxDoubleSpinSlider::DoubleSpinHasChanged( double theValue ) mySlider->blockSignals( true ); mySlider->setValue( aNewValue ); mySlider->blockSignals( false ); - emit valueChanged( theValue ); + Q_EMIT valueChanged( theValue ); } /*! diff --git a/src/Qtx/QtxDoubleSpinSlider.h b/src/Qtx/QtxDoubleSpinSlider.h index 8718fffc8..a68022530 100644 --- a/src/Qtx/QtxDoubleSpinSlider.h +++ b/src/Qtx/QtxDoubleSpinSlider.h @@ -50,13 +50,13 @@ public: void setUnit( QString& ); -public slots: +public Q_SLOTS: void setValue( int ); -private slots: +private Q_SLOTS: void DoubleSpinHasChanged( double ); -signals: +Q_SIGNALS: void valueChanged( double ); private: diff --git a/src/Qtx/QtxFontEdit.cxx b/src/Qtx/QtxFontEdit.cxx index 490ac683a..9ac9c5784 100644 --- a/src/Qtx/QtxFontEdit.cxx +++ b/src/Qtx/QtxFontEdit.cxx @@ -155,7 +155,7 @@ void QtxFontEdit::setCurrentFont( const QFont& fnt ) myI->blockSignals( false ); myU->blockSignals( false ); - emit( changed( currentFont() ) ); + Q_EMIT( changed( currentFont() ) ); } /*! @@ -212,7 +212,7 @@ void QtxFontEdit::setFontFamily( const QString& fam ) { myCustomFams->setCurrentIndex( myCustomFams->findText( fam ) ); if ( !myCustomFams->signalsBlocked() ) - emit( changed( currentFont() ) ); + Q_EMIT( changed( currentFont() ) ); } } @@ -288,12 +288,12 @@ void QtxFontEdit::onFontChanged( const QFont& /*f*/ ) mySize->blockSignals( blocked ); if ( !myFamily->signalsBlocked() ) - emit( changed( currentFont() ) ); + Q_EMIT( changed( currentFont() ) ); } void QtxFontEdit::onPropertyChanged() { - emit( changed( currentFont() ) ); + Q_EMIT( changed( currentFont() ) ); } /*! diff --git a/src/Qtx/QtxFontEdit.h b/src/Qtx/QtxFontEdit.h index d91f7174a..7acd679dc 100644 --- a/src/Qtx/QtxFontEdit.h +++ b/src/Qtx/QtxFontEdit.h @@ -85,10 +85,10 @@ public: void setSizes( const QList& = QList() ); QList sizes() const; -signals: +Q_SIGNALS: void changed( const QFont& ); -private slots: +private Q_SLOTS: void onPreview( bool ); void onFontChanged( const QFont& ); void onPropertyChanged(); diff --git a/src/Qtx/QtxGroupBox.h b/src/Qtx/QtxGroupBox.h index 90fd5d8ac..84bc157b3 100644 --- a/src/Qtx/QtxGroupBox.h +++ b/src/Qtx/QtxGroupBox.h @@ -50,7 +50,7 @@ public: QWidget* widget() const; void setWidget( QWidget* ); -public slots: +public Q_SLOTS: virtual void setVisible( bool ); protected: diff --git a/src/Qtx/QtxIntSpinBox.h b/src/Qtx/QtxIntSpinBox.h index 6946fd804..5cc7c0b90 100755 --- a/src/Qtx/QtxIntSpinBox.h +++ b/src/Qtx/QtxIntSpinBox.h @@ -44,7 +44,7 @@ public: virtual void stepBy( int ); -protected slots: +protected Q_SLOTS: virtual void onTextChanged( const QString& ); protected: diff --git a/src/Qtx/QtxIntSpinSlider.cxx b/src/Qtx/QtxIntSpinSlider.cxx index 60713a2c9..eaed07b4b 100644 --- a/src/Qtx/QtxIntSpinSlider.cxx +++ b/src/Qtx/QtxIntSpinSlider.cxx @@ -80,7 +80,7 @@ void QtxIntSpinSlider::IntSpinHasChanged( int theValue ) mySlider->blockSignals( true ); mySlider->setValue( theValue ); mySlider->blockSignals( false ); - emit valueChanged( theValue ); + Q_EMIT valueChanged( theValue ); } /*! diff --git a/src/Qtx/QtxIntSpinSlider.h b/src/Qtx/QtxIntSpinSlider.h index 48663e582..68d752b96 100644 --- a/src/Qtx/QtxIntSpinSlider.h +++ b/src/Qtx/QtxIntSpinSlider.h @@ -46,13 +46,13 @@ public: void setUnit( QString& ); -public slots: +public Q_SLOTS: void setValue( int ); -signals: +Q_SIGNALS: void valueChanged( int ); -private slots: +private Q_SLOTS: void IntSpinHasChanged( int ); private: diff --git a/src/Qtx/QtxListAction.cxx b/src/Qtx/QtxListAction.cxx index 087c0d854..3b3fab87f 100755 --- a/src/Qtx/QtxListAction.cxx +++ b/src/Qtx/QtxListAction.cxx @@ -888,7 +888,7 @@ void QtxListAction::onMultiple( const int numActions ) myFrame->hide(); if ( numActions > 0 ) - emit triggered( numActions ); + Q_EMIT triggered( numActions ); } /*! @@ -905,7 +905,7 @@ void QtxListAction::onTriggered( bool /*on*/ ) if ( idx < 0 ) return; - emit triggered( idx + 1 ); + Q_EMIT triggered( idx + 1 ); } /*! diff --git a/src/Qtx/QtxListAction.h b/src/Qtx/QtxListAction.h index 1ec747c66..bbf3104dd 100755 --- a/src/Qtx/QtxListAction.h +++ b/src/Qtx/QtxListAction.h @@ -70,10 +70,10 @@ public: void setLinesNumber( const int ); void setCharsNumber( const int ); -signals: +Q_SIGNALS: void triggered( int ); -private slots: +private Q_SLOTS: void onChanged(); void onMultiple( const int ); void onSingle( bool = false ); diff --git a/src/Qtx/QtxListBox.cxx b/src/Qtx/QtxListBox.cxx index 2ef7f25c6..c75511931 100755 --- a/src/Qtx/QtxListBox.cxx +++ b/src/Qtx/QtxListBox.cxx @@ -191,8 +191,8 @@ void QtxListBox::endEdition( const bool action ) setCurrentItem( cur ); - emit itemEdited( idx ); - emit itemEdited( item( idx ) ); + Q_EMIT itemEdited( idx ); + Q_EMIT itemEdited( item( idx ) ); } } @@ -293,7 +293,7 @@ void QtxListBox::moveItem( const int idx, const int step ) updateEditor(); if ( idx != pos ) - emit itemMoved( idx, pos ); + Q_EMIT itemMoved( idx, pos ); } /*! diff --git a/src/Qtx/QtxListBox.h b/src/Qtx/QtxListBox.h index f194e4509..2ca422238 100755 --- a/src/Qtx/QtxListBox.h +++ b/src/Qtx/QtxListBox.h @@ -74,12 +74,12 @@ public: void createItem( const int = -1 ); void deleteItem( const int = -1 ); -signals: +Q_SIGNALS: void itemEdited( int ); void itemEdited( QListWidgetItem* ); void itemMoved( int, int ); -public slots: +public Q_SLOTS: virtual void setEditEnabled( bool ); virtual void setDefaultEditAction( bool ); virtual void setModificationEnabled( bool ); @@ -88,7 +88,7 @@ public slots: virtual void setValidator( const QValidator* ); virtual void setContentsPos( int, int ); -private slots: +private Q_SLOTS: void onContentsMoving( int, int ); protected: diff --git a/src/Qtx/QtxMRUAction.cxx b/src/Qtx/QtxMRUAction.cxx index 520cea17a..6b121a6d7 100755 --- a/src/Qtx/QtxMRUAction.cxx +++ b/src/Qtx/QtxMRUAction.cxx @@ -438,7 +438,7 @@ void QtxMRUAction::onActivated() QString link = a->data().toString(); if ( !link.isEmpty() && myLinks.contains( link ) ) - emit activated( link ); + Q_EMIT activated( link ); } void QtxMRUAction::onCleared( bool ) diff --git a/src/Qtx/QtxMRUAction.h b/src/Qtx/QtxMRUAction.h index 641b3d945..5964548b5 100755 --- a/src/Qtx/QtxMRUAction.h +++ b/src/Qtx/QtxMRUAction.h @@ -88,13 +88,13 @@ public: virtual void loadLinks( QtxResourceMgr*, const QString&, const bool = true ); virtual void saveLinks( QtxResourceMgr*, const QString&, const bool = true ) const; -public slots: +public Q_SLOTS: void clear(); -signals: +Q_SIGNALS: void activated( const QString& ); -private slots: +private Q_SLOTS: void onActivated(); void onAboutToShow(); void onCleared( bool ); diff --git a/src/Qtx/QtxMainWindow.h b/src/Qtx/QtxMainWindow.h index 186d10b19..a4460825d 100644 --- a/src/Qtx/QtxMainWindow.h +++ b/src/Qtx/QtxMainWindow.h @@ -63,7 +63,7 @@ public: protected: virtual bool event( QEvent* ); -private slots: +private Q_SLOTS: void onDestroyed( QObject* ); private: diff --git a/src/Qtx/QtxMenu.h b/src/Qtx/QtxMenu.h index 1f7c4b10e..3e45195c9 100644 --- a/src/Qtx/QtxMenu.h +++ b/src/Qtx/QtxMenu.h @@ -59,7 +59,7 @@ public: virtual void setTitleMode( const TitleMode ); virtual void setTitleAlignment( const Qt::Alignment ); -public slots: +public Q_SLOTS: virtual void setVisible( bool ); private: diff --git a/src/Qtx/QtxMultiAction.h b/src/Qtx/QtxMultiAction.h index 4a4fb6311..d43a6a9f5 100644 --- a/src/Qtx/QtxMultiAction.h +++ b/src/Qtx/QtxMultiAction.h @@ -44,7 +44,7 @@ public: void setActiveAction( QAction* ); QAction* activeAction() const; -private slots: +private Q_SLOTS: void onClicked( bool ); void onTriggered( QAction* ); void onActionChanged(); diff --git a/src/Qtx/QtxPagePrefMgr.h b/src/Qtx/QtxPagePrefMgr.h index 8dbde3298..3855c819d 100644 --- a/src/Qtx/QtxPagePrefMgr.h +++ b/src/Qtx/QtxPagePrefMgr.h @@ -69,12 +69,12 @@ public: virtual void updateContents(); -signals: +Q_SIGNALS: void resourceChanged( int ); void resourceChanged( QString&, QString& ); void resourcesChanged( const QMap& ); -public slots: +public Q_SLOTS: virtual void setVisible( bool ); protected: @@ -171,7 +171,7 @@ public: bool isFixedSize() const; void setFixedSize( const bool ); -private slots: +private Q_SLOTS: void onItemSelectionChanged(); protected: @@ -458,7 +458,7 @@ protected: virtual QVariant optionValue( const QString& ) const; virtual void setOptionValue( const QString&, const QVariant& ); -private slots: +private Q_SLOTS: void setIcon( int ); private: diff --git a/src/Qtx/QtxPathDialog.cxx b/src/Qtx/QtxPathDialog.cxx index 08e91c0af..498b070dd 100755 --- a/src/Qtx/QtxPathDialog.cxx +++ b/src/Qtx/QtxPathDialog.cxx @@ -274,7 +274,7 @@ void QtxPathDialog::onBrowse() fileNameChanged( id, fName ); if ( id == defaultEntry() ) - emit fileNameChanged( fName ); + Q_EMIT fileNameChanged( fName ); } /*! @@ -297,7 +297,7 @@ void QtxPathDialog::onReturnPressed() fileNameChanged( id, fileName( id ) ); if ( id == defaultEntry() ) - emit fileNameChanged( fileName() ); + Q_EMIT fileNameChanged( fileName() ); } /*! diff --git a/src/Qtx/QtxPathDialog.h b/src/Qtx/QtxPathDialog.h index 6cc44f5ca..9dcfa7690 100755 --- a/src/Qtx/QtxPathDialog.h +++ b/src/Qtx/QtxPathDialog.h @@ -58,16 +58,16 @@ public: QString filter() const; void setFilter( const QString& ); -signals: +Q_SIGNALS: void fileNameChanged( QString ); -public slots: +public Q_SLOTS: virtual void setVisible( bool ); -protected slots: +protected Q_SLOTS: void validate(); -private slots: +private Q_SLOTS: void onBrowse(); void onReturnPressed(); void onTextChanged( const QString& ); diff --git a/src/Qtx/QtxPathEdit.h b/src/Qtx/QtxPathEdit.h index 19ffb09e2..e79a7fcac 100644 --- a/src/Qtx/QtxPathEdit.h +++ b/src/Qtx/QtxPathEdit.h @@ -47,7 +47,7 @@ public: QString pathFilter() const; void setPathFilter( const QString& ); -private slots: +private Q_SLOTS: void onBrowse( bool = false ); protected: diff --git a/src/Qtx/QtxPathListEdit.h b/src/Qtx/QtxPathListEdit.h index 8094de992..b60b0fad7 100644 --- a/src/Qtx/QtxPathListEdit.h +++ b/src/Qtx/QtxPathListEdit.h @@ -70,7 +70,7 @@ public: bool eventFilter( QObject*, QEvent* ); -protected slots: +protected Q_SLOTS: void onUp( bool = false ); void onDown( bool = false ); void onInsert( bool = false ); diff --git a/src/Qtx/QtxPopupMgr.h b/src/Qtx/QtxPopupMgr.h index fbf05eacf..be977faf9 100644 --- a/src/Qtx/QtxPopupMgr.h +++ b/src/Qtx/QtxPopupMgr.h @@ -93,7 +93,7 @@ private: bool result( QtxEvalParser* p ) const; QVariant parameter( const QString&, const int = -1 ) const; -private slots: +private Q_SLOTS: void onSelectionDestroyed( QObject* ); private: diff --git a/src/Qtx/QtxSearchTool.h b/src/Qtx/QtxSearchTool.h index 872250d9c..65c1ddca2 100644 --- a/src/Qtx/QtxSearchTool.h +++ b/src/Qtx/QtxSearchTool.h @@ -117,14 +117,14 @@ public: virtual bool event( QEvent* ); virtual bool eventFilter( QObject*, QEvent* ); -public slots: +public Q_SLOTS: virtual void find(); virtual void findNext(); virtual void findPrevious(); virtual void findFirst(); virtual void findLast(); -private slots: +private Q_SLOTS: void find( const QString&, int = fAny ); void modifierSwitched(); diff --git a/src/Qtx/QtxShortcutEdit.h b/src/Qtx/QtxShortcutEdit.h index 82eae009c..57636418e 100755 --- a/src/Qtx/QtxShortcutEdit.h +++ b/src/Qtx/QtxShortcutEdit.h @@ -44,7 +44,7 @@ public: static bool isValidKey( int ); -private slots: +private Q_SLOTS: void onCliked(); void onEditingFinished(); @@ -76,7 +76,7 @@ protected: virtual void focusOutEvent( QFocusEvent* ); virtual bool checkUniqueness( QTreeWidgetItem*, const QString& ); -private slots: +private Q_SLOTS: void onCurrentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* ); private: diff --git a/src/Qtx/QtxSlider.cxx b/src/Qtx/QtxSlider.cxx index 006fc576c..b292e4cb3 100644 --- a/src/Qtx/QtxSlider.cxx +++ b/src/Qtx/QtxSlider.cxx @@ -81,7 +81,7 @@ QtxSlider::~QtxSlider() */ void QtxSlider::SliderHasMoved( int theValue ) { - emit valueUpdated( theValue ); + Q_EMIT valueUpdated( theValue ); } /*! diff --git a/src/Qtx/QtxSlider.h b/src/Qtx/QtxSlider.h index fea077223..b69f31be8 100644 --- a/src/Qtx/QtxSlider.h +++ b/src/Qtx/QtxSlider.h @@ -48,10 +48,10 @@ public: void setSingleStep( int ); -private slots: +private Q_SLOTS: void SliderHasMoved( int ); -signals: +Q_SIGNALS: void valueUpdated( int ); protected: diff --git a/src/Qtx/QtxSplash.h b/src/Qtx/QtxSplash.h index 4fa71ead0..93eaf192d 100644 --- a/src/Qtx/QtxSplash.h +++ b/src/Qtx/QtxSplash.h @@ -125,7 +125,7 @@ public: void readSettings( QtxResourceMgr*, const QString& = QString() ); -public slots: +public Q_SLOTS: void setMessage( const QString&, const int, const QColor& = QColor() ); diff --git a/src/Qtx/QtxTable.cxx b/src/Qtx/QtxTable.cxx index 6959b811f..d16a2f088 100644 --- a/src/Qtx/QtxTable.cxx +++ b/src/Qtx/QtxTable.cxx @@ -283,8 +283,8 @@ void QtxTable::endHeaderEdit( const bool accept ) if ( oldTxt != newTxt ) { - emit headerEdited( hdr, sec ); - emit headerEdited( hdr == horizontalHeader() ? Horizontal : Vertical, sec ); + Q_EMIT headerEdited( hdr, sec ); + Q_EMIT headerEdited( hdr == horizontalHeader() ? Horizontal : Vertical, sec ); } } diff --git a/src/Qtx/QtxTable.h b/src/Qtx/QtxTable.h index bfe8ea03e..c545a201f 100644 --- a/src/Qtx/QtxTable.h +++ b/src/Qtx/QtxTable.h @@ -52,15 +52,15 @@ public: virtual bool eventFilter( QObject*, QEvent* ); -signals: +Q_SIGNALS: void headerEdited( QHeader*, int ); void headerEdited( Orientation, int ); -public slots: +public Q_SLOTS: virtual void hide(); virtual void setHeaderEditable( Orientation, bool ); -private slots: +private Q_SLOTS: void onScrollBarMoved( int ); void onHeaderSizeChange( int, int, int ); diff --git a/src/Qtx/QtxToolBar.h b/src/Qtx/QtxToolBar.h index e9afef242..dda284481 100644 --- a/src/Qtx/QtxToolBar.h +++ b/src/Qtx/QtxToolBar.h @@ -45,7 +45,7 @@ public: QMainWindow* mainWindow() const; -public slots: +public Q_SLOTS: virtual void setVisible( bool ); protected: diff --git a/src/Qtx/QtxToolTip.cxx b/src/Qtx/QtxToolTip.cxx index 58e7cd041..0a5df5f68 100755 --- a/src/Qtx/QtxToolTip.cxx +++ b/src/Qtx/QtxToolTip.cxx @@ -177,7 +177,7 @@ void QtxToolTip::maybeTip( const QPoint& pos ) QRect textRegion, theRegion( -1, -1, -1, -1 ); QFont theFnt = font(); - emit maybeTip( pos, text, theFnt, textRegion, theRegion ); + Q_EMIT maybeTip( pos, text, theFnt, textRegion, theRegion ); if ( theRegion.isValid() ) { diff --git a/src/Qtx/QtxToolTip.h b/src/Qtx/QtxToolTip.h index 4e15b7709..a973c25ae 100755 --- a/src/Qtx/QtxToolTip.h +++ b/src/Qtx/QtxToolTip.h @@ -55,10 +55,10 @@ public: int wakeUpDelayTime() const { return myWakeUpDelayTime; } int showDelayTime() const { return myShowDelayTime; } -signals: +Q_SIGNALS: void maybeTip( QPoint, QString&, QFont&, QRect&, QRect& ); -protected slots: +protected Q_SLOTS: void onSleepTimeOut(); void onWakeUpTimeOut(); diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index 9de54fd24..25fd6e8a0 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -317,7 +317,7 @@ void QtxTreeView::selectionChanged( const QItemSelection& selected, const QItemSelection& deselected ) { QTreeView::selectionChanged( selected, deselected ); - emit( selectionChanged() ); + Q_EMIT( selectionChanged() ); } /*! @@ -376,7 +376,7 @@ void QtxTreeView::setOpened( const QModelIndex& index, const int levels, bool op */ void QtxTreeView::emitSortingEnabled( bool enabled ) { - emit( sortingEnabled( enabled ) ); + Q_EMIT( sortingEnabled( enabled ) ); } void QtxTreeView::setModel( QAbstractItemModel* m ) diff --git a/src/Qtx/QtxTreeView.h b/src/Qtx/QtxTreeView.h index 66d2ca386..580615fce 100644 --- a/src/Qtx/QtxTreeView.h +++ b/src/Qtx/QtxTreeView.h @@ -55,7 +55,7 @@ public: virtual void setModel( QAbstractItemModel* ); -protected slots: +protected Q_SLOTS: void onHeaderClicked( int ); void rowsAboutToBeRemoved( const QModelIndex&, int, int ); void selectionChanged( const QItemSelection&, const QItemSelection& ); @@ -64,7 +64,7 @@ protected slots: protected: void setOpened( const QModelIndex&, const int, bool ); -signals: +Q_SIGNALS: void sortingEnabled( bool ); void selectionChanged(); diff --git a/src/Qtx/QtxWorkspace.h b/src/Qtx/QtxWorkspace.h index df664cacb..55e553da4 100644 --- a/src/Qtx/QtxWorkspace.h +++ b/src/Qtx/QtxWorkspace.h @@ -39,7 +39,7 @@ public: QtxWorkspace( QWidget* = 0 ); virtual ~QtxWorkspace(); -public slots: +public Q_SLOTS: void tileVertical(); void tileHorizontal(); }; diff --git a/src/Qtx/QtxWorkspaceAction.h b/src/Qtx/QtxWorkspaceAction.h index 56552ab99..6decfbf47 100644 --- a/src/Qtx/QtxWorkspaceAction.h +++ b/src/Qtx/QtxWorkspaceAction.h @@ -70,13 +70,13 @@ public: void perform( const int ); -public slots: +public Q_SLOTS: void tile(); void cascade(); void tileVertical(); void tileHorizontal(); -private slots: +private Q_SLOTS: void onAboutToShow(); void onTriggered( int ); diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 99bc305f9..cf0ee805b 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -664,7 +664,7 @@ void QtxWorkstackArea::onContextMenuRequested( QPoint p ) if ( idx != -1 ) wid = widget( myBar->tabId( idx ) ); - emit contextMenuRequested( wid, p ); + Q_EMIT contextMenuRequested( wid, p ); } /*! @@ -953,7 +953,7 @@ void QtxWorkstackArea::customEvent( QEvent* e ) { case ActivateWidget: myBar->updateActiveState(); - emit activated( activeWidget() ); + Q_EMIT activated( activeWidget() ); break; case FocusWidget: if ( activeWidget() ) @@ -1005,7 +1005,7 @@ void QtxWorkstackArea::focusInEvent( QFocusEvent* e ) myBar->updateActiveState(); - emit activated( activeWidget() ); + Q_EMIT activated( activeWidget() ); } /*! @@ -1016,7 +1016,7 @@ void QtxWorkstackArea::mousePressEvent( QMouseEvent* e ) { QFrame::mousePressEvent( e ); - emit activated( activeWidget() ); + Q_EMIT activated( activeWidget() ); } /*! @@ -1037,7 +1037,7 @@ void QtxWorkstackArea::onCurrentChanged( int /*idx*/ ) { updateCurrent(); - emit activated( activeWidget() ); + Q_EMIT activated( activeWidget() ); } /*! @@ -1249,13 +1249,13 @@ void QtxWorkstackArea::updateState() if ( isEmpty() ) { hide(); - emit deactivated( this ); + Q_EMIT deactivated( this ); } else { show(); if ( prev != activeWidget() ) - emit activated( activeWidget() ); + Q_EMIT activated( activeWidget() ); } } @@ -1436,16 +1436,16 @@ bool QtxWorkstackChild::eventFilter( QObject* o, QEvent* e ) if ( o->isWidgetType() ) { if ( e->type() == QEvent::WindowTitleChange || e->type() == QEvent::WindowIconChange ) - emit captionChanged( this ); + Q_EMIT captionChanged( this ); if ( !e->spontaneous() && e->type() == QEvent::ShowToParent ) - emit shown( this ); + Q_EMIT shown( this ); if ( !e->spontaneous() && e->type() == QEvent::HideToParent ) - emit hidden( this ); + Q_EMIT hidden( this ); if ( e->type() == QEvent::FocusIn ) - emit activated( this ); + Q_EMIT activated( this ); } return QWidget::eventFilter( o, e ); } @@ -1614,7 +1614,7 @@ void QtxWorkstackTabBar::mouseMoveEvent( QMouseEvent* e ) if ( myId != -1 && !tabRect( indexOf( myId ) ).contains( e->pos() ) ) { myId = -1; - emit dragActiveTab(); + Q_EMIT dragActiveTab(); } QTabBar::mouseMoveEvent( e ); @@ -1643,7 +1643,7 @@ void QtxWorkstackTabBar::mouseReleaseEvent( QMouseEvent* e ) myId = -1; if ( e->button() == Qt::RightButton ) - emit contextMenuRequested( e->globalPos() ); + Q_EMIT contextMenuRequested( e->globalPos() ); } /*! @@ -1653,7 +1653,7 @@ void QtxWorkstackTabBar::mouseReleaseEvent( QMouseEvent* e ) void QtxWorkstackTabBar::contextMenuEvent( QContextMenuEvent* e ) { if ( e->reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( e->globalPos() ); + Q_EMIT contextMenuRequested( e->globalPos() ); } /*! @@ -2950,7 +2950,7 @@ void QtxWorkstack::setActiveArea( QtxWorkstackArea* area ) myWin = myArea->activeWidget(); if ( myWin && oldCur != myWin ) - emit windowActivated( myWin ); + Q_EMIT windowActivated( myWin ); } /*! @@ -3161,7 +3161,7 @@ void QtxWorkstack::setOpaqueResize( bool opaque ) QList splitList; splitters( mySplit, splitList, true ); splitList << mySplit; - foreach( QSplitter* split, splitList ) + Q_FOREACH( QSplitter* split, splitList ) split->setOpaqueResize( opaque ); } diff --git a/src/Qtx/QtxWorkstack.h b/src/Qtx/QtxWorkstack.h index cff622656..8f1adbee1 100644 --- a/src/Qtx/QtxWorkstack.h +++ b/src/Qtx/QtxWorkstack.h @@ -121,14 +121,14 @@ public: void SetRelativePosition( QWidget* wid, const Qt::Orientation o, const double pos ); void SetRelativePositionInSplitter( QWidget* wid, const double pos ); -signals: +Q_SIGNALS: void windowActivated( QWidget* ); -public slots: +public Q_SLOTS: void splitVertical(); void splitHorizontal(); -private slots: +private Q_SLOTS: void onRename(); void onCloseWindow(); void onDestroyed( QObject* ); @@ -244,12 +244,12 @@ public: void saveState( QDataStream& ) const; bool restoreState( QDataStream&, QMap& ); -signals: +Q_SIGNALS: void activated( QWidget* ); void contextMenuRequested( QWidget*, QPoint ); void deactivated( QtxWorkstackArea* ); -private slots: +private Q_SLOTS: void onClose(); void onCurrentChanged( int ); @@ -320,13 +320,13 @@ public: virtual bool eventFilter( QObject*, QEvent* ); -signals: +Q_SIGNALS: void shown( QtxWorkstackChild* ); void hidden( QtxWorkstackChild* ); void activated( QtxWorkstackChild* ); void captionChanged( QtxWorkstackChild* ); -private slots: +private Q_SLOTS: void onDestroyed( QObject* ); protected: @@ -354,11 +354,11 @@ public: void updateActiveState(); -signals: +Q_SIGNALS: void dragActiveTab(); void contextMenuRequested( QPoint ); -private slots: +private Q_SLOTS: void onCurrentChanged( int ); protected: diff --git a/src/Qtx/QtxWorkstackAction.cxx b/src/Qtx/QtxWorkstackAction.cxx index bce4e418d..c2017ab52 100644 --- a/src/Qtx/QtxWorkstackAction.cxx +++ b/src/Qtx/QtxWorkstackAction.cxx @@ -917,9 +917,9 @@ void QtxSplitDlg::onSynchronize( ) myNBSelectedViews = aCheckedNumber; } else if( myDlgMode == CreateSubViews ) { - foreach( QComboBox* aBox, myComboBox ) + Q_FOREACH( QComboBox* aBox, myComboBox ) aBox->setVisible( true ); - foreach( QLabel* aLabel, myLabels ) + Q_FOREACH( QLabel* aLabel, myLabels ) aLabel->setVisible( true ); for( int i = myViewsNB; i < 4; i++ ) { diff --git a/src/Qtx/QtxWorkstackAction.h b/src/Qtx/QtxWorkstackAction.h index 22d3bd73d..1b4d47fd9 100644 --- a/src/Qtx/QtxWorkstackAction.h +++ b/src/Qtx/QtxWorkstackAction.h @@ -74,7 +74,7 @@ public: void perform( const int ); -private slots: +private Q_SLOTS: void onAboutToShow(); void onTriggered( int ); @@ -135,7 +135,7 @@ private : QMap myMapComboBoxMode; QMap myMapModeIsBusy; -private slots: +private Q_SLOTS: void onChangeIcons(); void onSplitChanged(int); diff --git a/src/QxScene/QxScene_ViewManager.h b/src/QxScene/QxScene_ViewManager.h index a2fe48c68..a74f38e94 100644 --- a/src/QxScene/QxScene_ViewManager.h +++ b/src/QxScene/QxScene_ViewManager.h @@ -38,7 +38,7 @@ public: protected: bool insertView(SUIT_ViewWindow* theView); virtual void closeView(SUIT_ViewWindow* theView); -public slots: +public Q_SLOTS: void createView(); }; diff --git a/src/QxScene/QxScene_ViewModel.h b/src/QxScene/QxScene_ViewModel.h index f543b130f..f981b2cc2 100644 --- a/src/QxScene/QxScene_ViewModel.h +++ b/src/QxScene/QxScene_ViewModel.h @@ -45,7 +45,7 @@ class QXSCENE_EXPORT QxScene_Viewer: public SUIT_ViewModel protected: void initView(QxScene_ViewWindow* view); - protected slots: + protected Q_SLOTS: void onShowToolbar(); void onChangeBgColor(); diff --git a/src/QxScene/QxScene_ViewWindow.cxx b/src/QxScene/QxScene_ViewWindow.cxx index 8272a4d60..c36169893 100644 --- a/src/QxScene/QxScene_ViewWindow.cxx +++ b/src/QxScene/QxScene_ViewWindow.cxx @@ -275,7 +275,7 @@ bool QxScene_ViewWindow::closeRequested() { DEBTRACE("QxScene_ViewWindow::closeRequested"); bool isClosed = true; - emit tryClose(isClosed, this); + Q_EMIT tryClose(isClosed, this); DEBTRACE("isClosed=" << isClosed); return isClosed; } diff --git a/src/QxScene/QxScene_ViewWindow.h b/src/QxScene/QxScene_ViewWindow.h index 139d1c6ed..c42137906 100644 --- a/src/QxScene/QxScene_ViewWindow.h +++ b/src/QxScene/QxScene_ViewWindow.h @@ -62,7 +62,7 @@ class QXSCENE_EXPORT QxScene_ViewWindow : public SUIT_ViewWindow { virtual void initLayout(); - void contextPopupEvent(QContextMenuEvent* theEvent) { emit contextMenuRequested( theEvent); } + void contextPopupEvent(QContextMenuEvent* theEvent) { Q_EMIT contextMenuRequested( theEvent); } void setScene(QGraphicsScene* scene) { _scene = scene; } QGraphicsScene* getScene() { return _scene; } @@ -70,10 +70,10 @@ class QXSCENE_EXPORT QxScene_ViewWindow : public SUIT_ViewWindow { QGraphicsView* getSceneView() { return _sceneView; } virtual bool closeRequested(); - signals: + Q_SIGNALS: void tryClose(bool &isClosed, QxScene_ViewWindow* window); - public slots: + public Q_SLOTS: void onViewFitAll(); void onViewFitArea(); void onViewZoom(); diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.cxx index d8c21b005..6cf8cdd91 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.cxx @@ -339,7 +339,7 @@ void PyModuleHelper::XmlHandler::activateMenus( bool enable ) { if ( module() ) { QtxActionMenuMgr* mgr = module()->menuMgr(); - foreach( int id, myMenuItems ) mgr->setEmptyEnabled( id, enable ); + Q_FOREACH( int id, myMenuItems ) mgr->setEmptyEnabled( id, enable ); } } @@ -895,7 +895,7 @@ bool PyModuleHelper::activate( SUIT_Study* study ) if ( view ) activeViewChanged( view ); // get all view currently opened in the study and connect their signals to // the corresponding slots of the class. - foreach ( view, d->windows() ) connectView( view ); + Q_FOREACH ( view, d->windows() ) connectView( view ); } else { // hide menus / toolbars in case of error diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.h b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.h index b2adf2131..a7242de2a 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyModule.h @@ -82,7 +82,7 @@ public: QMap windows() const; QStringList viewManagers() const; -public slots: +public Q_SLOTS: void initialize( CAM_Application* ); bool activate( SUIT_Study* study ); bool deactivate( SUIT_Study* study ); diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx index 46cffcc0c..f2bb6f521 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx @@ -2277,10 +2277,10 @@ static SUIT_ViewWindow* getWnd( const int id ) if ( app ) { ViewManagerList vmlist = app->viewManagers(); - foreach( SUIT_ViewManager* vm, vmlist ) + Q_FOREACH( SUIT_ViewManager* vm, vmlist ) { QVector vwlist = vm->getViews(); - foreach ( SUIT_ViewWindow* vw, vwlist ) + Q_FOREACH ( SUIT_ViewWindow* vw, vwlist ) { if ( id == vw->getId() ) { @@ -2386,7 +2386,7 @@ public: { QList wndlist = tabDesk->windows(); SUIT_ViewWindow* wnd; - foreach ( wnd, wndlist ) + Q_FOREACH ( wnd, wndlist ) myResult.append( wnd->getId() ); } } @@ -2548,7 +2548,7 @@ public: ViewManagerList vmList; app->viewManagers( myType, vmList ); SUIT_ViewManager* viewMgr; - foreach ( viewMgr, vmList ) + Q_FOREACH ( viewMgr, vmList ) { QVector vec = viewMgr->getViews(); for ( int i = 0, n = vec.size(); i < n; i++ ) @@ -3065,7 +3065,7 @@ public: { QWidgetList wgList = wStack->windowList( wnd ); QWidget* wg; - foreach ( wg, wgList ) + Q_FOREACH ( wg, wgList ) { SUIT_ViewWindow* tmpWnd = dynamic_cast( wg ); if ( tmpWnd && tmpWnd != wnd ) @@ -3612,7 +3612,7 @@ public: { QList wndlist = tabDesk->windows(); SUIT_ViewWindow* wnd; - foreach ( wnd, wndlist ) + Q_FOREACH ( wnd, wndlist ) { Plot2d_ViewWindow* aP2d = dynamic_cast(wnd); if(aP2d) diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h index 2747c0f7c..869f7df6c 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.h @@ -60,10 +60,10 @@ public: void ClearIObjects(); void ClearFilters(); -signals: +Q_SIGNALS: void currentSelectionChanged(); -private slots: +private Q_SLOTS: void onSelMgrDestroyed(); private: diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip index 4da473a0a..17788bf98 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip @@ -52,7 +52,7 @@ public: private: SALOME_Selection( QObject* /TransferThis/ ); -signals: +Q_SIGNALS: void currentSelectionChanged(); }; @@ -167,7 +167,7 @@ public: void clear(); -signals: +Q_SIGNALS: void triggered( int ); void triggered( QAction* ); @@ -198,11 +198,11 @@ public: void add( QAction* ); -public slots: +public Q_SLOTS: void setExclusive( const bool ); void setUsesDropDown( const bool ); -signals: +Q_SIGNALS: void selected( QAction* ); private: diff --git a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx index eb14a5384..350852e0f 100644 --- a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx +++ b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx @@ -447,7 +447,7 @@ void SALOMEGUI_Swig::Display( const char* theEntry ) aStudy->children( myEntry, entries ); else entries.append( myEntry ); - foreach( QString entry, entries ) + Q_FOREACH( QString entry, entries ) d->Display( aStudy->referencedToEntry( entry ), false, 0 ); } } @@ -479,7 +479,7 @@ void SALOMEGUI_Swig::DisplayOnly( const char* theEntry ) if ( anApp && aStudy ) { QStringList comps; aStudy->components( comps ); - foreach( QString comp, comps ) { + Q_FOREACH( QString comp, comps ) { LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true ); if ( d ) d->EraseAll( false, false, 0 ); } @@ -492,7 +492,7 @@ void SALOMEGUI_Swig::DisplayOnly( const char* theEntry ) aStudy->children( myEntry, entries ); else entries.append( myEntry ); - foreach( QString entry, entries ) + Q_FOREACH( QString entry, entries ) d->Display( aStudy->referencedToEntry( entry ), false, 0 ); } } @@ -529,7 +529,7 @@ void SALOMEGUI_Swig::Erase( const char* theEntry ) aStudy->children( myEntry, entries ); else entries.append( myEntry ); - foreach( QString entry, entries ) + Q_FOREACH( QString entry, entries ) d->Erase( aStudy->referencedToEntry( entry ), false, false, 0 ); } } @@ -558,12 +558,12 @@ void SALOMEGUI_Swig::DisplayAll() if ( anApp && aStudy ) { QStringList comps; aStudy->components( comps ); - foreach( QString comp, comps ) { + Q_FOREACH( QString comp, comps ) { LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true ); if ( d ) { QStringList entries; aStudy->children( aStudy->centry( comp ), entries ); - foreach( QString entry, entries ) + Q_FOREACH( QString entry, entries ) d->Display( aStudy->referencedToEntry( entry ), false, 0 ); } } @@ -589,7 +589,7 @@ void SALOMEGUI_Swig::EraseAll() if ( anApp && aStudy ) { QStringList comps; aStudy->components( comps ); - foreach( QString comp, comps ) { + Q_FOREACH( QString comp, comps ) { LightApp_Displayer* d = LightApp_Displayer::FindDisplayer( anApp->moduleTitle( comp ), true ); if ( d ) d->EraseAll( false, false, 0 ); } diff --git a/src/SPlot2d/SPlot2d_ViewModel.cxx b/src/SPlot2d/SPlot2d_ViewModel.cxx index 4bb3a4c03..6b3a63580 100644 --- a/src/SPlot2d/SPlot2d_ViewModel.cxx +++ b/src/SPlot2d/SPlot2d_ViewModel.cxx @@ -409,7 +409,7 @@ void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index ) bool isAnalytical = false; AnalyticalCurveList curves = aViewFrame->getAnalyticalCurves(); - foreach ( Plot2d_AnalyticalCurve* curve, curves ) { + Q_FOREACH ( Plot2d_AnalyticalCurve* curve, curves ) { if(plotItem == curve->plotItem()) { isAnalytical = true; curve->setSelected(true); @@ -419,7 +419,7 @@ void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index ) } if(isAnalytical) { myDeselectAnalytical = false; - emit clearSelected(); + Q_EMIT clearSelected(); aViewFrame->updateAnalyticalCurves(); myDeselectAnalytical = true; return; @@ -440,7 +440,7 @@ void SPlot2d_Viewer::onClicked( const QVariant& itemInfo, int index ) } if(!anEntry.isEmpty()) - emit legendSelected( anEntry ); + Q_EMIT legendSelected( anEntry ); } } @@ -458,7 +458,7 @@ void SPlot2d_Viewer::setObjectsSelected( SALOME_ListIO& theList ) { SPlot2d_Histogram* h = 0; SPlot2d_Curve* c =0; - foreach ( Plot2d_Object* o, allObjects ) { + Q_FOREACH ( Plot2d_Object* o, allObjects ) { isSelected = false; Handle(SALOME_InteractiveObject) io; diff --git a/src/SPlot2d/SPlot2d_ViewModel.h b/src/SPlot2d/SPlot2d_ViewModel.h index 141a4e7d0..986dd1052 100644 --- a/src/SPlot2d/SPlot2d_ViewModel.h +++ b/src/SPlot2d/SPlot2d_ViewModel.h @@ -83,10 +83,10 @@ public: Plot2d_ViewFrame* getActiveViewFrame(); Handle(SALOME_InteractiveObject) FindIObject( const char* Entry ); -protected slots: +protected Q_SLOTS: virtual void onClicked( const QVariant&, int ); -signals: +Q_SIGNALS: void legendSelected( const QString& ); void clearSelected(); private: diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 032840bb5..75dd986d0 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -756,7 +756,7 @@ void STD_Application::addViewManager( SUIT_ViewManager* vm ) this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) ); vm->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); - emit viewManagerAdded( vm ); + Q_EMIT viewManagerAdded( vm ); } /* if ( !activeViewManager() && myViewMgrs.count() == 1 ) @@ -772,7 +772,7 @@ void STD_Application::removeViewManager( SUIT_ViewManager* vm ) vm->closeAllViews(); - emit viewManagerRemoved( vm ); + Q_EMIT viewManagerRemoved( vm ); vm->disconnectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); disconnect( vm, SIGNAL( activated( SUIT_ViewManager* ) ), @@ -839,7 +839,7 @@ void STD_Application::setActiveViewManager( SUIT_ViewManager* vm ) return; myActiveViewMgr = vm; - emit viewManagerActivated( vm ); + Q_EMIT viewManagerActivated( vm ); } /*!Public slot. */ diff --git a/src/STD/STD_Application.h b/src/STD/STD_Application.h index 8e5703b01..bcb3896f6 100755 --- a/src/STD/STD_Application.h +++ b/src/STD/STD_Application.h @@ -104,7 +104,7 @@ public: virtual void updateDesktopTitle(); -signals: +Q_SIGNALS: /*!emit that view manager added*/ void viewManagerAdded( SUIT_ViewManager* ); /*!emit that view manager removed*/ @@ -112,7 +112,7 @@ signals: /*!emit that view manager activated*/ void viewManagerActivated( SUIT_ViewManager* ); -public slots: +public Q_SLOTS: virtual void onNewDoc(); virtual bool onNewDoc( const QString& ); @@ -137,7 +137,7 @@ public slots: virtual void onDesktopClosing( SUIT_Desktop*, QCloseEvent* ); virtual void onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ); -private slots: +private Q_SLOTS: virtual void onViewManagerActivated( SUIT_ViewManager* ); protected: diff --git a/src/STD/STD_MDIDesktop.cxx b/src/STD/STD_MDIDesktop.cxx index 71e650eb1..c1871f05c 100755 --- a/src/STD/STD_MDIDesktop.cxx +++ b/src/STD/STD_MDIDesktop.cxx @@ -158,7 +158,7 @@ QtxWorkspace* STD_MDIDesktop::workspace() const void STD_MDIDesktop::onWindowActivated( QWidget* w ) { if ( w && w->inherits( "SUIT_ViewWindow" ) ) - emit windowActivated( (SUIT_ViewWindow*)w ); + Q_EMIT windowActivated( (SUIT_ViewWindow*)w ); } /*! diff --git a/src/STD/STD_MDIDesktop.h b/src/STD/STD_MDIDesktop.h index b1e07d136..5c8c91239 100755 --- a/src/STD/STD_MDIDesktop.h +++ b/src/STD/STD_MDIDesktop.h @@ -55,7 +55,7 @@ public: QtxWorkspace* workspace() const; -private slots: +private Q_SLOTS: void onWindowActivated( QWidget* ); protected: diff --git a/src/STD/STD_TabDesktop.cxx b/src/STD/STD_TabDesktop.cxx index a58bb2927..53be93ba4 100644 --- a/src/STD/STD_TabDesktop.cxx +++ b/src/STD/STD_TabDesktop.cxx @@ -180,7 +180,7 @@ QtxWorkstack* STD_TabDesktop::workstack() const void STD_TabDesktop::onWindowActivated( QWidget* w ) { if ( w && w->inherits( "SUIT_ViewWindow" ) ) - emit windowActivated( (SUIT_ViewWindow*)w ); + Q_EMIT windowActivated( (SUIT_ViewWindow*)w ); } /*! diff --git a/src/STD/STD_TabDesktop.h b/src/STD/STD_TabDesktop.h index 4f956803b..6bc127bd8 100644 --- a/src/STD/STD_TabDesktop.h +++ b/src/STD/STD_TabDesktop.h @@ -55,7 +55,7 @@ public: QtxWorkstack* workstack() const; -private slots: +private Q_SLOTS: void onWindowActivated( QWidget* ); void onArrangeViews(); diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index d169503cb..6d34c7c1b 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -99,7 +99,7 @@ bool SUIT_Application::isPossibleToClose( bool& ) */ void SUIT_Application::closeApplication() { - emit applicationClosed( this ); + Q_EMIT applicationClosed( this ); } /*! @@ -214,7 +214,7 @@ void SUIT_Application::putInfo( const QString& msg, const int msec ) QTimer::singleShot( msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, this, SLOT( onInfoClear() ) ); if ( prev != msg ) - emit infoChanged( msg ); + Q_EMIT infoChanged( msg ); } /*! @@ -228,7 +228,7 @@ void SUIT_Application::onInfoClear() bool changed = !myStatusLabel->text().isEmpty(); myStatusLabel->clear(); if ( changed ) - emit infoChanged( QString() ); + Q_EMIT infoChanged( QString() ); } /*! @@ -686,7 +686,7 @@ QAction* SUIT_Application::separator() void SUIT_Application::onDesktopActivated() { - emit activated( this ); + Q_EMIT activated( this ); } /*! diff --git a/src/SUIT/SUIT_Application.h b/src/SUIT/SUIT_Application.h index 8b5d9d031..95e783cea 100755 --- a/src/SUIT/SUIT_Application.h +++ b/src/SUIT/SUIT_Application.h @@ -115,16 +115,16 @@ public: virtual void viewManagers( const QString&, QList& ) const = 0; QAction* action( const int ) const; -signals: +Q_SIGNALS: void applicationClosed( SUIT_Application* ); void activated( SUIT_Application* ); void infoChanged( QString ); -public slots: +public Q_SLOTS: virtual void updateCommandsStatus(); virtual void onHelpContextModule( const QString&, const QString&, const QString& = QString() ); -private slots: +private Q_SLOTS: void onInfoClear(); protected: @@ -174,7 +174,7 @@ protected: const bool = false, QObject* = 0, const char* = 0, const QString& = QString() ); -protected slots: +protected Q_SLOTS: virtual void onDesktopActivated(); private: diff --git a/src/SUIT/SUIT_DataBrowser.cxx b/src/SUIT/SUIT_DataBrowser.cxx index 73d716a49..c90e8d33f 100644 --- a/src/SUIT/SUIT_DataBrowser.cxx +++ b/src/SUIT/SUIT_DataBrowser.cxx @@ -207,7 +207,7 @@ void SUIT_DataBrowser::getSelected( DataObjectList& lst ) const QModelIndexList sel = selectedIndexes(); QModelIndex idx; - foreach( idx, sel ) { + Q_FOREACH( idx, sel ) { SUIT_DataObject* obj = m->object( idx ); if ( obj ) lst.append( obj ); @@ -258,7 +258,7 @@ void SUIT_DataBrowser::setSelected( const DataObjectList& lst, const bool append QModelIndexList indexes; SUIT_DataObject* obj; - foreach( obj, lst ) { + Q_FOREACH( obj, lst ) { QModelIndex index = m->index( obj ); if ( index.isValid() ) indexes.append( index ); @@ -443,7 +443,7 @@ void SUIT_DataBrowser::onClicked( const QModelIndex& index ) if ( m ) { SUIT_DataObject* obj = m->object( index ); if ( obj ) { - emit( clicked( obj ) ); + Q_EMIT( clicked( obj ) ); m->emitClicked(obj, index); } } @@ -461,7 +461,7 @@ void SUIT_DataBrowser::onDblClicked( const QModelIndex& index ) if ( m ) { SUIT_DataObject* obj = m->object( index ); - if ( obj ) emit( doubleClicked( obj ) ); + if ( obj ) Q_EMIT( doubleClicked( obj ) ); } } diff --git a/src/SUIT/SUIT_DataBrowser.h b/src/SUIT/SUIT_DataBrowser.h index 46cce83dc..344625dde 100644 --- a/src/SUIT/SUIT_DataBrowser.h +++ b/src/SUIT/SUIT_DataBrowser.h @@ -78,13 +78,13 @@ protected: private: void init( SUIT_DataObject* ); -signals: +Q_SIGNALS: void requestUpdate(); void requestRename(); void clicked( SUIT_DataObject* ); void doubleClicked( SUIT_DataObject* ); -private slots: +private Q_SLOTS: void onModelUpdated(); void onClicked( const QModelIndex& ); void onDblClicked( const QModelIndex& ); diff --git a/src/SUIT/SUIT_DataObject.cxx b/src/SUIT/SUIT_DataObject.cxx index a29c763d1..314e84b4e 100755 --- a/src/SUIT/SUIT_DataObject.cxx +++ b/src/SUIT/SUIT_DataObject.cxx @@ -933,7 +933,7 @@ SUIT_DataObject::Signal::~Signal() void SUIT_DataObject::Signal::emitCreated( SUIT_DataObject* object ) { if ( object ) - emit created( object ); + Q_EMIT created( object ); } /*! @@ -951,7 +951,7 @@ void SUIT_DataObject::Signal::emitDestroyed( SUIT_DataObject* object ) myDelLaterObjects.removeAll( object ); else // object is being destroyed directly or via deleteLater() - emit destroyed( object ); + Q_EMIT destroyed( object ); } } @@ -962,7 +962,7 @@ void SUIT_DataObject::Signal::emitDestroyed( SUIT_DataObject* object ) */ void SUIT_DataObject::Signal::emitInserted( SUIT_DataObject* object, SUIT_DataObject* parent ) { - emit( inserted( object, parent ) ); + Q_EMIT( inserted( object, parent ) ); } /*! @@ -972,7 +972,7 @@ void SUIT_DataObject::Signal::emitInserted( SUIT_DataObject* object, SUIT_DataOb */ void SUIT_DataObject::Signal::emitRemoved( SUIT_DataObject* object, SUIT_DataObject* parent ) { - emit( removed( object, parent ) ); + Q_EMIT( removed( object, parent ) ); } /*! @@ -981,7 +981,7 @@ void SUIT_DataObject::Signal::emitRemoved( SUIT_DataObject* object, SUIT_DataObj */ void SUIT_DataObject::Signal::emitModified( SUIT_DataObject* object ) { - emit( modified( object ) ); + Q_EMIT( modified( object ) ); } /*! diff --git a/src/SUIT/SUIT_DataObject.h b/src/SUIT/SUIT_DataObject.h index 945dbc87e..ed96932b5 100755 --- a/src/SUIT/SUIT_DataObject.h +++ b/src/SUIT/SUIT_DataObject.h @@ -179,7 +179,7 @@ private: void deleteLater( SUIT_DataObject* ); -signals: +Q_SIGNALS: void created( SUIT_DataObject* ); void destroyed( SUIT_DataObject* ); void inserted( SUIT_DataObject*, SUIT_DataObject* ); diff --git a/src/SUIT/SUIT_Desktop.cxx b/src/SUIT/SUIT_Desktop.cxx index a6ace9444..300148d7c 100755 --- a/src/SUIT/SUIT_Desktop.cxx +++ b/src/SUIT/SUIT_Desktop.cxx @@ -79,10 +79,10 @@ bool SUIT_Desktop::event( QEvent* e ) switch ( e->type() ) { case QEvent::WindowActivate: - emit activated(); + Q_EMIT activated(); break; case QEvent::WindowDeactivate: - emit deactivated(); + Q_EMIT deactivated(); break; default: break; @@ -96,7 +96,7 @@ bool SUIT_Desktop::event( QEvent* e ) */ void SUIT_Desktop::closeEvent( QCloseEvent* e ) { - emit closing( this, e ); + Q_EMIT closing( this, e ); e->ignore(); } @@ -206,7 +206,7 @@ void SUIT_Desktop::logoClear() */ void SUIT_Desktop::emitActivated() { - emit activated(); + Q_EMIT activated(); } /*! @@ -214,5 +214,5 @@ void SUIT_Desktop::emitActivated() */ void SUIT_Desktop::emitMessage( const QString& theMessage ) { - emit message( theMessage ); + Q_EMIT message( theMessage ); } diff --git a/src/SUIT/SUIT_Desktop.h b/src/SUIT/SUIT_Desktop.h index aa4c24f66..07aac833c 100755 --- a/src/SUIT/SUIT_Desktop.h +++ b/src/SUIT/SUIT_Desktop.h @@ -72,7 +72,7 @@ public: void emitActivated(); void emitMessage( const QString& ); -signals: +Q_SIGNALS: void activated(); void deactivated(); void windowActivated( SUIT_ViewWindow* ); diff --git a/src/SUIT/SUIT_ExceptionHandler.cxx b/src/SUIT/SUIT_ExceptionHandler.cxx index 3ce19f192..1cfadc4f9 100755 --- a/src/SUIT/SUIT_ExceptionHandler.cxx +++ b/src/SUIT/SUIT_ExceptionHandler.cxx @@ -85,7 +85,7 @@ void SUIT_ExceptionHandler::removeCleanUpRoutine(CleanUpFunction p) void SUIT_ExceptionHandler::cleanUp() { - foreach( QtCleanUpFunction f, myCleanUpFunctions ) + Q_FOREACH( QtCleanUpFunction f, myCleanUpFunctions ) { f(); } diff --git a/src/SUIT/SUIT_FileDlg.cxx b/src/SUIT/SUIT_FileDlg.cxx index 6a2c2d943..d650eff8d 100755 --- a/src/SUIT/SUIT_FileDlg.cxx +++ b/src/SUIT/SUIT_FileDlg.cxx @@ -486,7 +486,7 @@ bool SUIT_FileDlg::acceptData() } if ( bOk ) - emit filesSelected( files ); + Q_EMIT filesSelected( files ); return bOk; } diff --git a/src/SUIT/SUIT_FileDlg.h b/src/SUIT/SUIT_FileDlg.h index ba7c4ea2a..95c908864 100755 --- a/src/SUIT/SUIT_FileDlg.h +++ b/src/SUIT/SUIT_FileDlg.h @@ -107,7 +107,7 @@ protected: void addFilter( const QString& ); static bool hasWildCards( const QString& ); -protected slots: +protected Q_SLOTS: void accept(); void quickDir( const QString& ); void addQuickDir(); diff --git a/src/SUIT/SUIT_LicenseDlg.h b/src/SUIT/SUIT_LicenseDlg.h index ef1960b91..67cba3e45 100755 --- a/src/SUIT/SUIT_LicenseDlg.h +++ b/src/SUIT/SUIT_LicenseDlg.h @@ -36,7 +36,7 @@ public: SUIT_LicenseDlg( bool firstShow = true, QWidget* = 0, const char* = 0, bool = true ); virtual ~SUIT_LicenseDlg(); -private slots: +private Q_SLOTS: void onAgree(); void onCancel(); void onPrint(); diff --git a/src/SUIT/SUIT_Operation.cxx b/src/SUIT/SUIT_Operation.cxx index f2e103f62..762aa28a6 100755 --- a/src/SUIT/SUIT_Operation.cxx +++ b/src/SUIT/SUIT_Operation.cxx @@ -176,7 +176,7 @@ void SUIT_Operation::start() else { startOperation(); - emit started( this ); + Q_EMIT started( this ); } } @@ -194,10 +194,10 @@ void SUIT_Operation::abort() { abortOperation(); myState = Waiting; - emit aborted( this ); + Q_EMIT aborted( this ); stopOperation(); - emit stopped( this ); + Q_EMIT stopped( this ); } } @@ -215,10 +215,10 @@ void SUIT_Operation::commit() { commitOperation(); myState = Waiting; - emit committed( this ); + Q_EMIT committed( this ); stopOperation(); - emit stopped( this ); + Q_EMIT stopped( this ); } } @@ -237,7 +237,7 @@ void SUIT_Operation::resume() { resumeOperation(); myState = Running; - emit resumed( this ); + Q_EMIT resumed( this ); } } @@ -256,7 +256,7 @@ void SUIT_Operation::suspend() { suspendOperation(); myState = Suspended; - emit suspended( this ); + Q_EMIT suspended( this ); } } @@ -278,7 +278,7 @@ bool SUIT_Operation::isReadyToStart() const */ void SUIT_Operation::startOperation() { - emit callSlot(); + Q_EMIT callSlot(); commit(); } diff --git a/src/SUIT/SUIT_Operation.h b/src/SUIT/SUIT_Operation.h index 44b8201a1..82165011b 100755 --- a/src/SUIT/SUIT_Operation.h +++ b/src/SUIT/SUIT_Operation.h @@ -112,7 +112,7 @@ public: int execStatus() const; -signals: +Q_SIGNALS: void started( SUIT_Operation* ); void aborted( SUIT_Operation* ); void committed( SUIT_Operation* ); @@ -123,7 +123,7 @@ signals: void callSlot(); -public slots: +public Q_SLOTS: void start(); void abort(); void commit(); diff --git a/src/SUIT/SUIT_PopupClient.cxx b/src/SUIT/SUIT_PopupClient.cxx index 876be3668..297158517 100644 --- a/src/SUIT/SUIT_PopupClient.cxx +++ b/src/SUIT/SUIT_PopupClient.cxx @@ -86,5 +86,5 @@ SUIT_PopupClient::Signal::~Signal() */ void SUIT_PopupClient::Signal::sendSignal( SUIT_PopupClient* client, QContextMenuEvent* e ) { - emit contextMenuRequest( client, e ); + Q_EMIT contextMenuRequest( client, e ); } diff --git a/src/SUIT/SUIT_PopupClient.h b/src/SUIT/SUIT_PopupClient.h index 75088a9f0..0ebc28f8c 100644 --- a/src/SUIT/SUIT_PopupClient.h +++ b/src/SUIT/SUIT_PopupClient.h @@ -68,7 +68,7 @@ public: void sendSignal( SUIT_PopupClient*, QContextMenuEvent* ); -signals: +Q_SIGNALS: void contextMenuRequest( SUIT_PopupClient*, QContextMenuEvent* ); }; diff --git a/src/SUIT/SUIT_ResourceMgr.cxx b/src/SUIT/SUIT_ResourceMgr.cxx index dd2d9024f..2e4cdb24a 100755 --- a/src/SUIT/SUIT_ResourceMgr.cxx +++ b/src/SUIT/SUIT_ResourceMgr.cxx @@ -132,7 +132,7 @@ QString SUIT_ResourceMgr::findAppropriateUserFile( const QString& fname ) const if ( d.exists() ) { d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); QStringList l = d.entryList(); - foreach( QString ll, l ) + Q_FOREACH( QString ll, l ) all_files << d.absoluteFilePath( ll ); } // backward compatibility: check also user's home directory (if it differs from above one) @@ -140,7 +140,7 @@ QString SUIT_ResourceMgr::findAppropriateUserFile( const QString& fname ) const if ( home.exists() && d.canonicalPath() != home.canonicalPath() ) { home.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); QStringList l = home.entryList(); - foreach( QString ll, l ) + Q_FOREACH( QString ll, l ) all_files << home.absoluteFilePath( ll ); } diff --git a/src/SUIT/SUIT_SelectionMgr.cxx b/src/SUIT/SUIT_SelectionMgr.cxx index 48d5331b1..f6b4153c6 100755 --- a/src/SUIT/SUIT_SelectionMgr.cxx +++ b/src/SUIT/SUIT_SelectionMgr.cxx @@ -163,7 +163,7 @@ void SUIT_SelectionMgr::selectionChanged( SUIT_Selector* sel ) } myIsSelChangeEnabled = true; - emit selectionChanged(); + Q_EMIT selectionChanged(); } /*! diff --git a/src/SUIT/SUIT_SelectionMgr.h b/src/SUIT/SUIT_SelectionMgr.h index 9d6721d62..550bf62ae 100755 --- a/src/SUIT/SUIT_SelectionMgr.h +++ b/src/SUIT/SUIT_SelectionMgr.h @@ -81,7 +81,7 @@ public: bool isSynchronizing() const; -signals: +Q_SIGNALS: void selectionChanged(); protected: diff --git a/src/SUIT/SUIT_Session.cxx b/src/SUIT/SUIT_Session.cxx index dc60507a9..5258c663c 100755 --- a/src/SUIT/SUIT_Session.cxx +++ b/src/SUIT/SUIT_Session.cxx @@ -224,7 +224,7 @@ SUIT_ResourceMgr* SUIT_Session::resourceMgr() const */ void SUIT_Session::onApplicationClosed( SUIT_Application* theApp ) { - emit applicationClosed( theApp ); + Q_EMIT applicationClosed( theApp ); myAppList.removeAll( theApp ); delete theApp; diff --git a/src/SUIT/SUIT_Session.h b/src/SUIT/SUIT_Session.h index f4040c550..597e83bc9 100755 --- a/src/SUIT/SUIT_Session.h +++ b/src/SUIT/SUIT_Session.h @@ -81,13 +81,13 @@ public: void insertApplication( SUIT_Application* ); -signals: +Q_SIGNALS: void applicationClosed( SUIT_Application* ); protected: virtual SUIT_ResourceMgr* createResourceMgr( const QString& ) const; -private slots: +private Q_SLOTS: void onApplicationClosed( SUIT_Application* ); void onApplicationActivated( SUIT_Application* ); diff --git a/src/SUIT/SUIT_ShortcutMgr.h b/src/SUIT/SUIT_ShortcutMgr.h index e26d96f34..5e828b55a 100644 --- a/src/SUIT/SUIT_ShortcutMgr.h +++ b/src/SUIT/SUIT_ShortcutMgr.h @@ -54,7 +54,7 @@ protected: SUIT_ShortcutMgr(); virtual ~SUIT_ShortcutMgr(); -private slots: +private Q_SLOTS: void onActionDestroyed( QObject* ); private: diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index e9e9f818c..8a4b4bcda 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -185,7 +185,7 @@ void SUIT_Study::update() */ void SUIT_Study::sendChangesNotification() { - emit studyModified( this ); + Q_EMIT studyModified( this ); } /*! @@ -310,7 +310,7 @@ bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck ) theOp->setState( SUIT_Operation::Running ); myOperations.append( theOp ); - emit theOp->started( theOp ); + Q_EMIT theOp->started( theOp ); operationStarted( theOp ); theOp->startOperation(); @@ -334,7 +334,7 @@ bool SUIT_Study::abort( SUIT_Operation* theOp ) theOp->abortOperation(); operationAborted( theOp ); - emit theOp->aborted( theOp ); + Q_EMIT theOp->aborted( theOp ); stop( theOp ); @@ -358,11 +358,11 @@ bool SUIT_Study::commit( SUIT_Operation* theOp ) theOp->commitOperation(); operationCommited( theOp ); - emit theOp->committed( theOp ); + Q_EMIT theOp->committed( theOp ); stop( theOp ); - emit studyModified( this ); + Q_EMIT studyModified( this ); return true; } @@ -382,7 +382,7 @@ bool SUIT_Study::suspend( SUIT_Operation* theOp ) theOp->setState( SUIT_Operation::Suspended ); theOp->suspendOperation(); - emit theOp->suspended( theOp ); + Q_EMIT theOp->suspended( theOp ); return true; } @@ -413,7 +413,7 @@ bool SUIT_Study::resume( SUIT_Operation* theOp ) myOperations.removeAll( theOp ); myOperations.append( theOp ); - emit theOp->resumed( theOp ); + Q_EMIT theOp->resumed( theOp ); return true; } @@ -446,7 +446,7 @@ void SUIT_Study::stop( SUIT_Operation* theOp ) theOp->stopOperation(); operationStopped( theOp ); - emit theOp->stopped( theOp ); + Q_EMIT theOp->stopped( theOp ); if ( aResultOp ) resume( aResultOp ); diff --git a/src/SUIT/SUIT_Study.h b/src/SUIT/SUIT_Study.h index 706d98aa3..515eaf18a 100755 --- a/src/SUIT/SUIT_Study.h +++ b/src/SUIT/SUIT_Study.h @@ -81,7 +81,7 @@ public: virtual void restoreState(int savePoint); -signals: +Q_SIGNALS: void studyModified( SUIT_Study* ); protected: diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index 6ac1d67b3..16636f00a 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -595,7 +595,7 @@ void SUIT_TreeModel::setAppropriate( const QString& name, const Qtx::Appropriate for ( int i = 0, n = myColumns.size(); i < n; i++ ) { if ( myColumns[i].myName == name && myColumns[i].myAppropriate != appr ) { myColumns[i].myAppropriate = appr; - emit headerDataChanged( Qt::Horizontal, i, i ); + Q_EMIT headerDataChanged( Qt::Horizontal, i, i ); break; } } @@ -639,7 +639,7 @@ void SUIT_TreeModel::setHeaderFlags( const QString& name, const Qtx::HeaderViewF for ( int i = 0, n = myColumns.size(); i < n; i++ ) { if ( myColumns[i].myName == name && myColumns[i].myHeaderFlags != flags ) { myColumns[i].myHeaderFlags = flags; - emit headerDataChanged( Qt::Horizontal, i, i ); + Q_EMIT headerDataChanged( Qt::Horizontal, i, i ); break; } } @@ -699,7 +699,7 @@ void SUIT_TreeModel::setVisibilityState( const QString& id, Qtx::VisibilityState } if ( !lst.isEmpty() ) { QModelIndex idx = index( lst.first().row(), SUIT_DataObject::VisibilityId, lst.first().parent() ); - emit dataChanged( idx, idx ); + Q_EMIT dataChanged( idx, idx ); } } } @@ -711,7 +711,7 @@ void SUIT_TreeModel::setVisibilityState( const QString& id, Qtx::VisibilityState */ void SUIT_TreeModel::setVisibilityStateForAll( Qtx::VisibilityState state ) { - foreach( QString id, myVisibilityMap.keys() ) + Q_FOREACH( QString id, myVisibilityMap.keys() ) setVisibilityState( id, state ); } @@ -767,7 +767,7 @@ void SUIT_TreeModel::setRoot( SUIT_DataObject* r ) //initialize(); reset(); - emit modelUpdated(); + Q_EMIT modelUpdated(); } /*! @@ -936,14 +936,14 @@ bool SUIT_TreeModel::setData( const QModelIndex& index, // checked state if ( obj->isCheckable( index.column() ) ) { obj->setOn( value.toBool(), index.column() ); - emit( dataChanged( index, index ) ); + Q_EMIT( dataChanged( index, index ) ); return true; } break; case EditRole: { QString val = value.toString(); if ( !val.isEmpty() && obj->setName(val) ) { - emit( dataChanged( index, index ) ); + Q_EMIT( dataChanged( index, index ) ); return true; } return false; @@ -1283,7 +1283,7 @@ void SUIT_TreeModel::emitClicked( SUIT_DataObject* obj, const QModelIndex& index id = inf.myIds[0]; if( inf.myIds.contains( obj_group_id ) ) id = inf.myIds[obj_group_id]; - emit clicked(obj, id); + Q_EMIT clicked(obj, id); } /*! @@ -1389,7 +1389,7 @@ void SUIT_TreeModel::updateTree( SUIT_DataObject* obj ) treeItem( obj ), SUIT_TreeModel::TreeSync( this ) ); } - emit modelUpdated(); + Q_EMIT modelUpdated(); } /*! @@ -1592,7 +1592,7 @@ void SUIT_TreeModel::updateItem( SUIT_TreeModel::TreeItem* item, bool emitLayout - emit layoutChanged */ - emit layoutAboutToBeChanged(); + Q_EMIT layoutAboutToBeChanged(); // Remember the QModelIndex that will change QModelIndexList fromIndexes; @@ -1603,10 +1603,10 @@ void SUIT_TreeModel::updateItem( SUIT_TreeModel::TreeItem* item, bool emitLayout } //changePersistentIndexList(fromIndexes, toIndexes); // Limitation: can lead to loss of selection - emit dataChanged( toIndexes.first(), toIndexes.last() ); + Q_EMIT dataChanged( toIndexes.first(), toIndexes.last() ); obj->setModified(false); if ( emitLayoutChanged ) - emit layoutChanged(); + Q_EMIT layoutChanged(); } /*! @@ -1683,7 +1683,7 @@ void SUIT_TreeModel::onModified( SUIT_DataObject* obj ) { QModelIndex firstIdx = index( obj, 0 ); QModelIndex lastIdx = index( obj, columnCount() - 1 ); - emit dataChanged( firstIdx, lastIdx ); + Q_EMIT dataChanged( firstIdx, lastIdx ); obj->setModified(false); } } @@ -1709,7 +1709,7 @@ QMimeData* SUIT_TreeModel::mimeData( const QModelIndexList& indexes ) const QDataStream stream( &encodedData, QIODevice::WriteOnly ); - foreach ( QModelIndex index, indexes ) { + Q_FOREACH ( QModelIndex index, indexes ) { QString id = objectId( index ); // we have to check only 0 column in order to avoid repeating items in the drag object // - QTreeView tries to drag indices for all visible columns @@ -1758,7 +1758,7 @@ bool SUIT_TreeModel::dropMimeData( const QMimeData* data, Qt::DropAction action, } // emit signal - emit dropped( objects, pobj, row, action ); + Q_EMIT dropped( objects, pobj, row, action ); // return true if there's any to drop return !objects.isEmpty(); diff --git a/src/SUIT/SUIT_TreeModel.h b/src/SUIT/SUIT_TreeModel.h index df77a3841..cf11b7312 100755 --- a/src/SUIT/SUIT_TreeModel.h +++ b/src/SUIT/SUIT_TreeModel.h @@ -186,11 +186,11 @@ public: virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); -public slots: +public Q_SLOTS: virtual void updateTree( const QModelIndex& ); virtual void updateTree( SUIT_DataObject* = 0 ); -signals: +Q_SIGNALS: void modelUpdated(); void clicked( SUIT_DataObject*, int ); void dropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ); @@ -209,7 +209,7 @@ private: void updateItem( TreeItem*, bool emitLayoutChanged ); void removeItem( TreeItem* ); -private slots: +private Q_SLOTS: void onInserted( SUIT_DataObject*, SUIT_DataObject* ); void onRemoved( SUIT_DataObject*, SUIT_DataObject* ); void onModified( SUIT_DataObject* ); @@ -288,12 +288,12 @@ public: QAbstractItemDelegate* delegate() const; -public slots: +public Q_SLOTS: virtual void updateTree( const QModelIndex& ); virtual void updateTree( SUIT_DataObject* = 0 ); void setSortingEnabled( bool ); -signals: +Q_SIGNALS: void modelUpdated(); void clicked( SUIT_DataObject*, int ); void dropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ); diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index 2a2b3765c..a36e73554 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -169,7 +169,7 @@ SUIT_ViewWindow* SUIT_ViewManager::createViewWindow() //it is done automatically during creation of view aView->setViewManager( this ); - emit viewCreated( aView ); + Q_EMIT viewCreated( aView ); // Special treatment for the case when is the first one in this view manager // -> call onWindowActivated() directly, because somebody may always want @@ -281,7 +281,7 @@ void SUIT_ViewManager::closeView( SUIT_ViewWindow* theView ) if ( !view->testAttribute( Qt::WA_DeleteOnClose ) ) return; - emit deleteView( view ); + Q_EMIT deleteView( view ); removeView( view ); if ( view ) @@ -298,7 +298,7 @@ void SUIT_ViewManager::removeView( SUIT_ViewWindow* theView ) if ( myActiveView == theView ) myActiveView = 0; if ( !myViews.count() ) - emit lastViewClosed( this ); + Q_EMIT lastViewClosed( this ); } /*! @@ -333,7 +333,7 @@ void SUIT_ViewManager::setShown( const bool on ) /*!Emit on \a theEvent mouse pressed in \a theView.*/ void SUIT_ViewManager::onMousePressed(SUIT_ViewWindow* theView, QMouseEvent* theEvent) { - emit mousePress(theView, theEvent); + Q_EMIT mousePress(theView, theEvent); } /*!Emit activated for view \a view. @@ -345,7 +345,7 @@ void SUIT_ViewManager::onWindowActivated(SUIT_ViewWindow* view) for (uint i = 0; i < aSize; i++) { if (myViews[i] && myViews[i] == view) { myActiveView = view; - emit activated( this ); + Q_EMIT activated( this ); return; } } diff --git a/src/SUIT/SUIT_ViewManager.h b/src/SUIT/SUIT_ViewManager.h index 030fe6509..8865318e8 100755 --- a/src/SUIT/SUIT_ViewManager.h +++ b/src/SUIT/SUIT_ViewManager.h @@ -85,11 +85,11 @@ public: int getGlobalId() const; -public slots: +public Q_SLOTS: void createView(); void closeAllViews(); -signals: +Q_SIGNALS: void lastViewClosed(SUIT_ViewManager*); void tryCloseView(SUIT_ViewWindow*); void deleteView(SUIT_ViewWindow*); @@ -103,13 +103,13 @@ signals: void keyRelease(SUIT_ViewWindow*, QKeyEvent*); void activated(SUIT_ViewManager*); -protected slots: +protected Q_SLOTS: void onWindowActivated(SUIT_ViewWindow*); void onClosingView( SUIT_ViewWindow* ); void onMousePressed(SUIT_ViewWindow*, QMouseEvent* ); void onDeleteStudy(); -private slots: +private Q_SLOTS: void onContextMenuRequested( QContextMenuEvent* e ); protected: diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index 5da71e9ad..2a7893151 100755 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -140,8 +140,8 @@ void SUIT_ViewWindow::setDestructiveClose( const bool on ) void SUIT_ViewWindow::closeEvent( QCloseEvent* e ) { e->ignore(); - emit tryClosing( this ); - if ( closable() ) emit closing( this ); + Q_EMIT tryClosing( this ); + if ( closable() ) Q_EMIT closing( this ); } /*! Context menu requested for event \a e. @@ -156,7 +156,7 @@ void SUIT_ViewWindow::contextMenuEvent( QContextMenuEvent* e ) return; if ( e->reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( e ); + Q_EMIT contextMenuRequested( e ); } /*! Post events on dump view. @@ -284,7 +284,7 @@ void SUIT_ViewWindow::setDropDownButtons( bool on ) if ( alist.isEmpty() ) continue; int idx = toolMgr()->index( toolMgr()->actionId( alist[0] ), tid ); if ( idx == -1 ) continue; - foreach ( QAction* a, alist ) toolMgr()->remove( toolMgr()->actionId( a ), tid ); + Q_FOREACH ( QAction* a, alist ) toolMgr()->remove( toolMgr()->actionId( a ), tid ); toolMgr()->insert( ma, tid, idx ); } } @@ -293,18 +293,18 @@ void SUIT_ViewWindow::setDropDownButtons( bool on ) else { QIntList tblist = toolMgr()->toolBarsIds(); QIntList alist = toolMgr()->idList(); - foreach( int aid, alist ) + Q_FOREACH( int aid, alist ) { QtxMultiAction* ma = qobject_cast( toolMgr()->action( aid ) ); if ( !ma ) continue; - foreach( int tid, tblist ) + Q_FOREACH( int tid, tblist ) { int idx = toolMgr()->index( aid, tid ); if ( idx >= 0 ) { myMultiActions[ tid ].append( ma ); toolMgr()->remove( aid, tid ); - foreach( QAction* a, ma->actions() ) toolMgr()->insert( a, tid, idx++ ); + Q_FOREACH( QAction* a, ma->actions() ) toolMgr()->insert( a, tid, idx++ ); } } } @@ -384,7 +384,7 @@ QAction* SUIT_ViewWindow::synchronizeAction() */ void SUIT_ViewWindow::emitViewModified() { - emit viewModified( this ); + Q_EMIT viewModified( this ); } /*! @@ -404,7 +404,7 @@ void SUIT_ViewWindow::updateSyncViews() if ( app ) { SUIT_Desktop* d = app->desktop(); QList allViews = qFindChildren( d ); - foreach( SUIT_ViewWindow* vw, allViews ) { + Q_FOREACH( SUIT_ViewWindow* vw, allViews ) { if ( !vw || vw == this ) continue; // skip invalid views and this one SUIT_CameraProperties otherProps = vw->cameraProperties(); if ( otherProps.isCompatible( props ) ) { @@ -474,7 +474,7 @@ void SUIT_ViewWindow::synchronizeView( SUIT_ViewWindow* viewWindow, int id ) if ( !d ) return; QList allViews = qFindChildren( d ); - foreach( SUIT_ViewWindow* vw, allViews ) { + Q_FOREACH( SUIT_ViewWindow* vw, allViews ) { if ( !vw->cameraProperties().isValid() ) continue; // omit views not supporting camera properties if ( vw->getId() == id ) @@ -485,7 +485,7 @@ void SUIT_ViewWindow::synchronizeView( SUIT_ViewWindow* viewWindow, int id ) if ( isSync && id ) { // remove all possible disconnections - foreach( SUIT_ViewWindow* vw, otherViews ) { + Q_FOREACH( SUIT_ViewWindow* vw, otherViews ) { // disconnect target view vw->disconnect( SIGNAL( viewModified( SUIT_ViewWindow* ) ), viewWindow, SLOT( synchronize( SUIT_ViewWindow* ) ) ); viewWindow->disconnect( SIGNAL( viewModified( SUIT_ViewWindow* ) ), vw, SLOT( synchronize( SUIT_ViewWindow* ) ) ); diff --git a/src/SUIT/SUIT_ViewWindow.h b/src/SUIT/SUIT_ViewWindow.h index 62132198e..67ae1029d 100755 --- a/src/SUIT/SUIT_ViewWindow.h +++ b/src/SUIT/SUIT_ViewWindow.h @@ -74,10 +74,10 @@ public: virtual SUIT_CameraProperties cameraProperties(); -public slots: +public Q_SLOTS: virtual void onDumpView(); -signals: +Q_SIGNALS: void tryClosing( SUIT_ViewWindow* ); void closing( SUIT_ViewWindow* ); void mousePressed( SUIT_ViewWindow*, QMouseEvent* ); @@ -103,7 +103,7 @@ protected: SUIT_Desktop* myDesktop; SUIT_ViewManager* myManager; -protected slots: +protected Q_SLOTS: void updateSyncViews(); void onSynchronizeView(bool); virtual void synchronize( SUIT_ViewWindow* ); diff --git a/src/SVTK/SVTK_ComboAction.h b/src/SVTK/SVTK_ComboAction.h index fde3fdf80..7168c5959 100644 --- a/src/SVTK/SVTK_ComboAction.h +++ b/src/SVTK/SVTK_ComboAction.h @@ -44,7 +44,7 @@ public: void setCurrentIndex( const int ); int currentIndex() const; -signals: +Q_SIGNALS: void triggered( int ); protected: diff --git a/src/SVTK/SVTK_CubeAxesDlg.h b/src/SVTK/SVTK_CubeAxesDlg.h index 484427dfa..7430996e6 100644 --- a/src/SVTK/SVTK_CubeAxesDlg.h +++ b/src/SVTK/SVTK_CubeAxesDlg.h @@ -70,7 +70,7 @@ public: virtual void Update(); -private slots: +private Q_SLOTS: virtual bool onApply(); private: diff --git a/src/SVTK/SVTK_GenericRenderWindowInteractor.h b/src/SVTK/SVTK_GenericRenderWindowInteractor.h index 26cd6a607..dda4af822 100644 --- a/src/SVTK/SVTK_GenericRenderWindowInteractor.h +++ b/src/SVTK/SVTK_GenericRenderWindowInteractor.h @@ -74,7 +74,7 @@ class SVTK_EXPORT QVTK_GenericRenderWindowInteractor: int DestroyTimer() ; - protected slots: + protected Q_SLOTS: //! The slot connects to QTimer::timeout signal to invoke vtkCommand::TimerEvent void OnTimeOut(); diff --git a/src/SVTK/SVTK_NonIsometricDlg.h b/src/SVTK/SVTK_NonIsometricDlg.h index aecea8a55..f76c1c0eb 100644 --- a/src/SVTK/SVTK_NonIsometricDlg.h +++ b/src/SVTK/SVTK_NonIsometricDlg.h @@ -58,7 +58,7 @@ protected: QtxDoubleSpinBox* m_sbZcoeff; QPushButton* m_bReset; -protected slots: +protected Q_SLOTS: void onClickApply(); void onClickReset(); void onClickOk(); diff --git a/src/SVTK/SVTK_RecorderDlg.h b/src/SVTK/SVTK_RecorderDlg.h index 102ddedd6..c1dcf6aba 100644 --- a/src/SVTK/SVTK_RecorderDlg.h +++ b/src/SVTK/SVTK_RecorderDlg.h @@ -50,7 +50,7 @@ public: private: virtual void keyPressEvent( QKeyEvent* ); -protected slots: +protected Q_SLOTS: void onStart(); void onClose(); void onHelp(); diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 4e0db2dee..f81b3661c 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -703,7 +703,7 @@ void SVTK_RenderWindowInteractor ::onEmitSelectionChanged() { - return emit selectionChanged(); + return Q_EMIT selectionChanged(); } @@ -717,7 +717,7 @@ SVTK_RenderWindowInteractor QVTK_RenderWindowInteractor::mouseMoveEvent(event); if(GENERATE_SUIT_EVENTS) - emit MouseMove( event ); + Q_EMIT MouseMove( event ); } @@ -731,7 +731,7 @@ SVTK_RenderWindowInteractor QVTK_RenderWindowInteractor::mousePressEvent(event); if(GENERATE_SUIT_EVENTS) - emit MouseButtonPressed( event ); + Q_EMIT MouseButtonPressed( event ); } @@ -764,10 +764,10 @@ SVTK_RenderWindowInteractor !( event->modifiers() & Qt::ShiftModifier ) ) { QContextMenuEvent aEvent( QContextMenuEvent::Mouse, event->pos(), event->globalPos() ); - emit contextMenuRequested( &aEvent ); + Q_EMIT contextMenuRequested( &aEvent ); } if(GENERATE_SUIT_EVENTS) - emit MouseButtonReleased( event ); + Q_EMIT MouseButtonReleased( event ); } @@ -787,7 +787,7 @@ SVTK_RenderWindowInteractor QVTK_RenderWindowInteractor::mouseDoubleClickEvent(event); if(GENERATE_SUIT_EVENTS) - emit MouseDoubleClicked( event ); + Q_EMIT MouseDoubleClicked( event ); } @@ -806,7 +806,7 @@ SVTK_RenderWindowInteractor GetDevice()->InvokeEvent(SVTK::ZoomOutEvent,NULL); if(GENERATE_SUIT_EVENTS) - emit WheelMoved( event ); + Q_EMIT WheelMoved( event ); } /*! @@ -819,7 +819,7 @@ SVTK_RenderWindowInteractor QVTK_RenderWindowInteractor::keyPressEvent(event); if(GENERATE_SUIT_EVENTS) - emit KeyPressed( event ); + Q_EMIT KeyPressed( event ); } /*! @@ -832,6 +832,6 @@ SVTK_RenderWindowInteractor QVTK_RenderWindowInteractor::keyReleaseEvent(event); if(GENERATE_SUIT_EVENTS) - emit KeyReleased( event ); + Q_EMIT KeyReleased( event ); } diff --git a/src/SVTK/SVTK_RenderWindowInteractor.h b/src/SVTK/SVTK_RenderWindowInteractor.h index 9a3f34079..75a5eabb5 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.h +++ b/src/SVTK/SVTK_RenderWindowInteractor.h @@ -90,7 +90,7 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget //! Get paint engine for the scene virtual QPaintEngine* paintEngine() const; - public slots: + public Q_SLOTS: //! Need for initial contents display on Win32 virtual void show(); @@ -200,7 +200,7 @@ class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteracto onEmitSelectionChanged(); public: - signals: + Q_SIGNALS: void MouseMove( QMouseEvent* ); void MouseButtonPressed( QMouseEvent* ); void MouseButtonReleased( QMouseEvent* ); diff --git a/src/SVTK/SVTK_SetRotationPointDlg.h b/src/SVTK/SVTK_SetRotationPointDlg.h index 469987496..303258fd9 100755 --- a/src/SVTK/SVTK_SetRotationPointDlg.h +++ b/src/SVTK/SVTK_SetRotationPointDlg.h @@ -101,7 +101,7 @@ protected: void* clientdata, void* calldata); -protected slots: +protected Q_SLOTS: void onBBCenterChecked(); void onToOrigin(); diff --git a/src/SVTK/SVTK_UpdateRateDlg.h b/src/SVTK/SVTK_UpdateRateDlg.h index 2ac57220e..d26e54d46 100644 --- a/src/SVTK/SVTK_UpdateRateDlg.h +++ b/src/SVTK/SVTK_UpdateRateDlg.h @@ -82,7 +82,7 @@ protected: void* clientdata, void* calldata); -protected slots: +protected Q_SLOTS: void onClickOk(); void onClickApply(); void onClickClose(); diff --git a/src/SVTK/SVTK_View.h b/src/SVTK/SVTK_View.h index d2a866cf1..2b20540e4 100644 --- a/src/SVTK/SVTK_View.h +++ b/src/SVTK/SVTK_View.h @@ -87,11 +87,11 @@ public: getRenderer(); //---------------------------------------------------------------------------- - public slots: + public Q_SLOTS: void onSelectionChanged(); public: - signals: + Q_SIGNALS: void MouseMove( QMouseEvent* ); void MouseButtonPressed( QMouseEvent* ); void MouseButtonReleased( QMouseEvent* ); diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 2f2477e99..3626d766f 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -788,10 +788,10 @@ void SVTK_Viewer::Repaint() void SVTK_Viewer::onActorAdded(VTKViewer_Actor* theActor) { - emit actorAdded((SVTK_ViewWindow*)sender(), theActor); + Q_EMIT actorAdded((SVTK_ViewWindow*)sender(), theActor); } void SVTK_Viewer::onActorRemoved(VTKViewer_Actor* theActor) { - emit actorRemoved((SVTK_ViewWindow*)sender(), theActor); + Q_EMIT actorRemoved((SVTK_ViewWindow*)sender(), theActor); } diff --git a/src/SVTK/SVTK_ViewModel.h b/src/SVTK/SVTK_ViewModel.h index e8709d5ac..acb4e9cb1 100644 --- a/src/SVTK/SVTK_ViewModel.h +++ b/src/SVTK/SVTK_ViewModel.h @@ -179,11 +179,11 @@ public: //! See #SALOME_View::Repaint() virtual void Repaint(); - signals: + Q_SIGNALS: void actorAdded(SVTK_ViewWindow*, VTKViewer_Actor*); void actorRemoved(SVTK_ViewWindow*, VTKViewer_Actor*); -protected slots: +protected Q_SLOTS: void onMousePress(SUIT_ViewWindow*, QMouseEvent*); void onMouseMove(SUIT_ViewWindow*, QMouseEvent*); void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*); diff --git a/src/SVTK/SVTK_ViewModelBase.h b/src/SVTK/SVTK_ViewModelBase.h index 9c6d84cbb..0c20481af 100644 --- a/src/SVTK/SVTK_ViewModelBase.h +++ b/src/SVTK/SVTK_ViewModelBase.h @@ -34,14 +34,14 @@ class SVTK_EXPORT SVTK_ViewModelBase: public SUIT_ViewModel { Q_OBJECT; -public slots: +public Q_SLOTS: //! To invoke Qt #selectionChanged signal void onSelectionChanged() { - emit selectionChanged(); + Q_EMIT selectionChanged(); } - signals: + Q_SIGNALS: //! To declare signal on selection changed void selectionChanged(); }; diff --git a/src/SVTK/SVTK_ViewParameterDlg.h b/src/SVTK/SVTK_ViewParameterDlg.h index 9f8c14d59..41b0e2048 100755 --- a/src/SVTK/SVTK_ViewParameterDlg.h +++ b/src/SVTK/SVTK_ViewParameterDlg.h @@ -125,7 +125,7 @@ protected: void* clientdata, void* calldata); -protected slots: +protected Q_SLOTS: void onProjectionModeChanged(int); void onPositionModeChanged(int); diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index bd64d9aa8..f5082830b 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -350,7 +350,7 @@ void SVTK_ViewWindow::onFrontView() { GetRenderer()->OnFrontView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -360,7 +360,7 @@ void SVTK_ViewWindow::onBackView() { GetRenderer()->OnBackView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -370,7 +370,7 @@ void SVTK_ViewWindow::onTopView() { GetRenderer()->OnTopView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -380,7 +380,7 @@ void SVTK_ViewWindow::onBottomView() { GetRenderer()->OnBottomView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -390,7 +390,7 @@ void SVTK_ViewWindow::onLeftView() { GetRenderer()->OnLeftView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -400,7 +400,7 @@ void SVTK_ViewWindow::onRightView() { GetRenderer()->OnRightView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -410,7 +410,7 @@ void SVTK_ViewWindow::onClockWiseView() { GetRenderer()->onClockWiseView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -420,7 +420,7 @@ void SVTK_ViewWindow::onAntiClockWiseView() { GetRenderer()->onAntiClockWiseView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -430,7 +430,7 @@ void SVTK_ViewWindow::onResetView() { GetRenderer()->OnResetView(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -440,7 +440,7 @@ void SVTK_ViewWindow::onFitAll() { GetRenderer()->OnFitAll(); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -782,7 +782,7 @@ void SVTK_ViewWindow::SetScale( double theScale[3] ) { GetRenderer()->SetScale( theScale ); Repaint(); - emit transformed( this ); + Q_EMIT transformed( this ); } /*! @@ -1079,7 +1079,7 @@ void SVTK_ViewWindow::synchronize(SVTK_ViewWindow* otherViewWindow ) */ void SVTK_ViewWindow::onKeyPressed(QKeyEvent* event) { - emit keyPressed( this, event ); + Q_EMIT keyPressed( this, event ); } /*! @@ -1087,7 +1087,7 @@ void SVTK_ViewWindow::onKeyPressed(QKeyEvent* event) */ void SVTK_ViewWindow::onKeyReleased(QKeyEvent* event) { - emit keyReleased( this, event ); + Q_EMIT keyReleased( this, event ); } /*! @@ -1095,7 +1095,7 @@ void SVTK_ViewWindow::onKeyReleased(QKeyEvent* event) */ void SVTK_ViewWindow::onMousePressed(QMouseEvent* event) { - emit mousePressed(this, event); + Q_EMIT mousePressed(this, event); } /*! @@ -1103,7 +1103,7 @@ void SVTK_ViewWindow::onMousePressed(QMouseEvent* event) */ void SVTK_ViewWindow::onMouseReleased(QMouseEvent* event) { - emit mouseReleased( this, event ); + Q_EMIT mouseReleased( this, event ); } /*! @@ -1111,7 +1111,7 @@ void SVTK_ViewWindow::onMouseReleased(QMouseEvent* event) */ void SVTK_ViewWindow::onMouseMoving(QMouseEvent* event) { - emit mouseMoving( this, event ); + Q_EMIT mouseMoving( this, event ); } /*! @@ -1119,7 +1119,7 @@ void SVTK_ViewWindow::onMouseMoving(QMouseEvent* event) */ void SVTK_ViewWindow::onMouseDoubleClicked( QMouseEvent* event ) { - emit mouseDoubleClicked( this, event ); + Q_EMIT mouseDoubleClicked( this, event ); } /*! @@ -1132,7 +1132,7 @@ void SVTK_ViewWindow::AddActor( VTKViewer_Actor* theActor, GetRenderer()->AddActor(theActor, theIsAdjustActors); if(theUpdate) Repaint(); - emit actorAdded(theActor); + Q_EMIT actorAdded(theActor); } /*! @@ -1149,7 +1149,7 @@ void SVTK_ViewWindow::RemoveActor( VTKViewer_Actor* theActor, myKeyFreeInteractorStyle->FreeActors(); if(theUpdate) Repaint(); - emit actorRemoved(theActor); + Q_EMIT actorRemoved(theActor); } QImage SVTK_ViewWindow::dumpViewContent() @@ -1894,7 +1894,7 @@ void SVTK_ViewWindow::onPerspectiveMode() aCamera->SetParallelProjection(anIsParallelMode); GetInteractor()->GetDevice()->CreateTimer(VTKI_TIMER_FIRST); - emit transformed( this ); + Q_EMIT transformed( this ); } void SVTK_ViewWindow::SetEventDispatcher(vtkObject* theDispatcher) @@ -2441,7 +2441,7 @@ void SVTK_ViewWindow::onViewParameters(bool theIsActivate) */ void SVTK_ViewWindow::showEvent( QShowEvent * theEvent ) { - emit Show( theEvent ); + Q_EMIT Show( theEvent ); } /*! @@ -2449,7 +2449,7 @@ void SVTK_ViewWindow::showEvent( QShowEvent * theEvent ) */ void SVTK_ViewWindow::hideEvent( QHideEvent * theEvent ) { - emit Hide( theEvent ); + Q_EMIT Hide( theEvent ); } /*! diff --git a/src/SVTK/SVTK_ViewWindow.h b/src/SVTK/SVTK_ViewWindow.h index ef6eb8a55..0d779c78b 100755 --- a/src/SVTK/SVTK_ViewWindow.h +++ b/src/SVTK/SVTK_ViewWindow.h @@ -281,11 +281,11 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow virtual SUIT_CameraProperties cameraProperties(); - signals: + Q_SIGNALS: void Show( QShowEvent * ); void Hide( QHideEvent * ); -public slots: +public Q_SLOTS: virtual void showEvent( QShowEvent * ); virtual void hideEvent( QHideEvent * ); virtual void onSelectionChanged(); @@ -327,13 +327,13 @@ public slots: void onPauseRecording(); void onStopRecording(); -signals: +Q_SIGNALS: void selectionChanged(); void actorAdded(VTKViewer_Actor*); void actorRemoved(VTKViewer_Actor*); void transformed(SVTK_ViewWindow*); -public slots: +public Q_SLOTS: //! Redirect the request to #SVTK_Renderer::OnFrontView virtual void onFrontView(); @@ -378,7 +378,7 @@ public slots: virtual void synchronize(SVTK_ViewWindow*); -protected slots: +protected Q_SLOTS: void synchronize( SUIT_ViewWindow* ); void onKeyPressed(QKeyEvent* event); void onKeyReleased(QKeyEvent* event); diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 08488ab3a..ae452bef6 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1772,12 +1772,12 @@ void SalomeApp_Application::createExtraActions() QStringList aModules; modules(aModules, false); - foreach(QString aModile, aModules) { + Q_FOREACH(QString aModile, aModules) { QString aModName = moduleName(aModile); QString aSectionStr = resMgr->stringValue(aModName, "popupitems", QString()); if (!aSectionStr.isNull()) { QStringList aSections = aSectionStr.split(':'); - foreach(QString aSection, aSections) { + Q_FOREACH(QString aSection, aSections) { QString aTitle = resMgr->stringValue(aSection, "title", QString()); QString aId = resMgr->stringValue(aSection, "objectid", QString()); QString aSlot = resMgr->stringValue(aSection, "method", QString()); @@ -2039,7 +2039,7 @@ void SalomeApp_Application::afterCloseDoc() #ifndef DISABLE_PYCONSOLE // emit signal to restore study from Python script if ( myNoteBook ) { - emit dumpedStudyClosed( myNoteBook->getDumpedStudyScript(), + Q_EMIT dumpedStudyClosed( myNoteBook->getDumpedStudyScript(), myNoteBook->getDumpedStudyName(), myNoteBook->isDumpedStudySaved() ); } diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index 5d999d1a9..6aeeea326 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -120,7 +120,7 @@ public: virtual bool renameAllowed( const QString& ) const; virtual bool renameObject( const QString&, const QString& ); -public slots: +public Q_SLOTS: virtual void onLoadDoc(); virtual void onNewWithScript(); virtual bool onLoadDoc( const QString& ); @@ -141,7 +141,7 @@ public slots: virtual void onCheckIn(); virtual void onLocalCheckIn(); -protected slots: +protected Q_SLOTS: void onStudyCreated( SUIT_Study* ); void onStudyOpened( SUIT_Study* ); @@ -172,7 +172,7 @@ protected: virtual void afterCloseDoc(); -private slots: +private Q_SLOTS: void onDeleteInvalidReferences(); void onDblClick( SUIT_DataObject* ); void onProperties(); @@ -197,7 +197,7 @@ private: QMap myExtActions; // Map bool myIsSiman; // application corresponds to the siman study flag -signals: +Q_SIGNALS: void dumpedStudyClosed( const QString& theDumpScript, const QString& theStudyName, bool theIsStudySaved ); diff --git a/src/SalomeApp/SalomeApp_DoubleSpinBox.h b/src/SalomeApp/SalomeApp_DoubleSpinBox.h index 52ce0b056..dabf62230 100644 --- a/src/SalomeApp/SalomeApp_DoubleSpinBox.h +++ b/src/SalomeApp/SalomeApp_DoubleSpinBox.h @@ -64,7 +64,7 @@ public: void setShowTipOnValidate( const bool ); bool isShowTipOnValidate() const; -signals: +Q_SIGNALS: void textChanged( const QString& ); protected: @@ -79,7 +79,7 @@ protected: virtual void keyPressEvent( QKeyEvent* ); virtual void showEvent( QShowEvent* ); -protected slots: +protected Q_SLOTS: void onEditingFinished(); void onTextChanged( const QString& ); diff --git a/src/SalomeApp/SalomeApp_Engine_i.cxx b/src/SalomeApp/SalomeApp_Engine_i.cxx index 3fcbd310f..a8a4be894 100644 --- a/src/SalomeApp/SalomeApp_Engine_i.cxx +++ b/src/SalomeApp/SalomeApp_Engine_i.cxx @@ -287,7 +287,7 @@ char* SalomeApp_Engine_i::getVersion() SalomeApp_Application::ModuleShortInfoList versions = SalomeApp_Application::getVersionInfo(); QString version; SalomeApp_Application::ModuleShortInfo version_info; - foreach ( version_info, versions ) { + Q_FOREACH ( version_info, versions ) { if ( SalomeApp_Application::moduleName( version_info.name ) == myComponentName.c_str() ) { version = version_info.version; break; diff --git a/src/SalomeApp/SalomeApp_IntSpinBox.h b/src/SalomeApp/SalomeApp_IntSpinBox.h index 3b6b0cd35..3b3881b91 100644 --- a/src/SalomeApp/SalomeApp_IntSpinBox.h +++ b/src/SalomeApp/SalomeApp_IntSpinBox.h @@ -62,7 +62,7 @@ public: void setShowTipOnValidate( const bool ); bool isShowTipOnValidate() const; -signals: +Q_SIGNALS: void textChanged( const QString& ); protected: @@ -77,7 +77,7 @@ protected: virtual void keyPressEvent( QKeyEvent* ); virtual void showEvent( QShowEvent* ); -protected slots: +protected Q_SLOTS: void onEditingFinished(); void onTextChanged( const QString& ); diff --git a/src/SalomeApp/SalomeApp_ListView.cxx b/src/SalomeApp/SalomeApp_ListView.cxx index 04ac19a42..bfd91ab6f 100644 --- a/src/SalomeApp/SalomeApp_ListView.cxx +++ b/src/SalomeApp/SalomeApp_ListView.cxx @@ -121,7 +121,7 @@ void SalomeApp_ListView::updateViewer() update( contentsRect() );//updateContents(); // connecting again selection changed SIGNAL blockSignals(false); - emit itemSelectionChanged(); + Q_EMIT itemSelectionChanged(); } /*! @@ -137,7 +137,7 @@ void SalomeApp_ListView::updateSelected() update( contentsRect() );//updateContents(); // connecting again selection changed SIGNAL blockSignals(false); - emit itemSelectionChanged(); + Q_EMIT itemSelectionChanged(); } /*! @@ -935,7 +935,7 @@ QLineEdit(parent) void SalomeApp_EditBox::keyPressEvent( QKeyEvent *e ) { if ( e->key() == Qt::Key_Escape ) - emit escapePressed(); + Q_EMIT escapePressed(); else QLineEdit::keyPressEvent( e ); e->accept(); @@ -1359,7 +1359,7 @@ void SalomeApp_EntityEdit::onCancel() myApplyBtn->setEnabled(false); if (myCancelBtn) myCancelBtn->setEnabled(false); - emit escapePressed(); + Q_EMIT escapePressed(); } /*! @@ -1372,7 +1372,7 @@ void SalomeApp_EntityEdit::onApply() myApplyBtn->setEnabled(false); if (myCancelBtn) myCancelBtn->setEnabled(false); - emit returnPressed(); + Q_EMIT returnPressed(); } /*! diff --git a/src/SalomeApp/SalomeApp_ListView.h b/src/SalomeApp/SalomeApp_ListView.h index 6cc2a0a26..8de7cbe2b 100644 --- a/src/SalomeApp/SalomeApp_ListView.h +++ b/src/SalomeApp/SalomeApp_ListView.h @@ -107,7 +107,7 @@ protected: // enables/disables mouse events (excluding MouseMove) void enableMouse(bool enable); -protected slots: +protected Q_SLOTS: // called when selection changed in list virtual void onSelectionChanged(); // called when user finishes in editing of item @@ -135,7 +135,7 @@ public: protected: void keyPressEvent(QKeyEvent* e); -signals: +Q_SIGNALS: void escapePressed(); }; @@ -219,12 +219,12 @@ public: protected: void keyPressEvent ( QKeyEvent * e); -private slots: +private Q_SLOTS: void onComboActivated(const QString&); void onTextChanged(const QString&); void onApply(); void onCancel(); -signals: +Q_SIGNALS: void returnPressed(); void escapePressed(); diff --git a/src/SalomeApp/SalomeApp_LoadStudiesDlg.h b/src/SalomeApp/SalomeApp_LoadStudiesDlg.h index a4f1b564f..6773c5aed 100644 --- a/src/SalomeApp/SalomeApp_LoadStudiesDlg.h +++ b/src/SalomeApp/SalomeApp_LoadStudiesDlg.h @@ -42,7 +42,7 @@ public: QString selectedStudy(); -private slots: +private Q_SLOTS: void updateState(); private: diff --git a/src/SalomeApp/SalomeApp_NoteBook.h b/src/SalomeApp/SalomeApp_NoteBook.h index f05be8acd..1651b57da 100644 --- a/src/SalomeApp/SalomeApp_NoteBook.h +++ b/src/SalomeApp/SalomeApp_NoteBook.h @@ -124,7 +124,7 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget QList myRows; - public slots: + public Q_SLOTS: void onItemChanged(QTableWidgetItem* theItem); private: @@ -159,7 +159,7 @@ class SALOMEAPP_EXPORT SalomeApp_NoteBook : public QWidget bool isDumpedStudySaved() { return myIsDumpedStudySaved; } void setIsDumpedStudySaved(bool isSaved) { myIsDumpedStudySaved = isSaved; } - public slots: + public Q_SLOTS: void onApply(); void onRemove(); void onUpdateStudy(); diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 70bd944cb..20386f35e 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -410,7 +410,7 @@ SalomeApp_Study::~SalomeApp_Study() #ifndef DISABLE_PYCONSOLE void SalomeApp_Study::onNoteBookVarUpdate( QString theVarName) { - emit notebookVarUpdated( theVarName ); + Q_EMIT notebookVarUpdated( theVarName ); } #endif @@ -498,7 +498,7 @@ bool SalomeApp_Study::createDocument( const QString& theStr ) myStudyDS->attach(myObserver->_this(),true); #endif - emit created( this ); + Q_EMIT created( this ); return aRet; } @@ -555,7 +555,7 @@ bool SalomeApp_Study::openDocument( const QString& theFileName ) bool res = CAM_Study::openDocument( theFileName ); - emit opened( this ); + Q_EMIT opened( this ); study->IsSaved(true); bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true ); @@ -613,7 +613,7 @@ bool SalomeApp_Study::loadDocument( const QString& theStudyName ) //rnv: to fix the "0051779: TC7.2.0: Save operation works incorrectly for study loaded from data server" // mark study as "not saved" after call openDocument( ... ) method. setIsSaved(false); - emit opened( this ); + Q_EMIT opened( this ); bool restore = application()->resourceMgr()->booleanValue( "Study", "store_visual_state", true ); if ( restore ) { @@ -667,7 +667,7 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName ) res = res && saveStudyData(theFileName); if ( res ) - emit saved( this ); + Q_EMIT saved( this ); return res; } @@ -710,7 +710,7 @@ bool SalomeApp_Study::saveDocument() res = res && saveStudyData(studyName()); if ( res ) - emit saved( this ); + Q_EMIT saved( this ); return res; } diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index e45377007..8f09b1e58 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -106,7 +106,7 @@ protected: void setStudyDS(const _PTR(Study)& s ); virtual CAM_ModuleObject* createModuleObject( LightApp_DataModel* theDataModel, SUIT_DataObject* theParent ) const; -protected slots: +protected Q_SLOTS: virtual void updateModelRoot( const CAM_DataModel* ); #ifndef DISABLE_PYCONSOLE void onNoteBookVarUpdate( QString theVarName ); @@ -120,7 +120,7 @@ private: Observer_i* myObserver; #ifndef DISABLE_PYCONSOLE - signals: + Q_SIGNALS: void notebookVarUpdated( QString theVarName ); #endif }; diff --git a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h index ae6edd866..af4fdc3a8 100644 --- a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h +++ b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h @@ -53,7 +53,7 @@ public: bool isChanged() { return myIsChanged; } -public slots: +public Q_SLOTS: void clickOnOk(); private: diff --git a/src/Style/Style_PrefDlg.cxx b/src/Style/Style_PrefDlg.cxx index dd7026786..46496e615 100644 --- a/src/Style/Style_PrefDlg.cxx +++ b/src/Style/Style_PrefDlg.cxx @@ -455,7 +455,7 @@ void Style_PrefDlg::PaletteEditor::onQuick() QColor c = QColorDialog::getColor( lastColor, this ); if ( c.isValid() ) { fromColor( lastColor = c ); - emit( changed() ); + Q_EMIT( changed() ); } } @@ -465,11 +465,11 @@ void Style_PrefDlg::PaletteEditor::onQuick() */ void Style_PrefDlg::PaletteEditor::onAuto() { - foreach( Btns btn, myButtons ) { + Q_FOREACH( Btns btn, myButtons ) { btn[ QPalette::Inactive ]->setEnabled( !myAutoCheck->isChecked() ); btn[ QPalette::Disabled ]->setEnabled( !myAutoCheck->isChecked() ); } - emit( changed() ); + Q_EMIT( changed() ); } /*! @@ -650,7 +650,7 @@ Style_PrefDlg::Style_PrefDlg( QWidget* parent ) item->setData( TypeRole, QVariant( Default ) ); myStylesList->addItem( item ); // global styles - foreach ( QString sname, globalStyles ) { + Q_FOREACH ( QString sname, globalStyles ) { item = new QListWidgetItem( sname ); item->setForeground( QColor( Qt::blue ) ); item->setData( TypeRole, QVariant( Global ) ); @@ -658,7 +658,7 @@ Style_PrefDlg::Style_PrefDlg( QWidget* parent ) myStylesList->addItem( item ); } // user styles - foreach ( QString sname, userStyles ) { + Q_FOREACH ( QString sname, userStyles ) { item = new QListWidgetItem( sname ); item->setData( TypeRole, QVariant( User ) ); item->setData( NameRole, QVariant( sname ) ); @@ -959,7 +959,7 @@ void Style_PrefDlg::onStyleChanged() void Style_PrefDlg::onLinesType() { myLinesTransparency->setEnabled( myLinesCombo->itemData( myLinesCombo->currentIndex() ) != Style_Model::NoLines ); - emit( styleChanged() ); + Q_EMIT( styleChanged() ); } /*! @@ -1033,6 +1033,6 @@ void Style_PrefDlg::onItemChanged( QListWidgetItem* item ) void Style_PrefDlg::onEffectChanged( QAbstractButton* rb ) { if ( rb != myCurrentEffect ) - emit( styleChanged() ); + Q_EMIT( styleChanged() ); myCurrentEffect = qobject_cast( rb ); } diff --git a/src/Style/Style_PrefDlg.h b/src/Style/Style_PrefDlg.h index 9930eb6f3..908aee126 100644 --- a/src/Style/Style_PrefDlg.h +++ b/src/Style/Style_PrefDlg.h @@ -67,10 +67,10 @@ private: QString findUniqueName( const QString&, QListWidgetItem* = 0, bool = false ); -signals: +Q_SIGNALS: void styleChanged(); -private slots: +private Q_SLOTS: void onApply(); void onHelp(); @@ -131,11 +131,11 @@ private: static QString idToName( int ); QWidget* line(); -private slots: +private Q_SLOTS: void onQuick(); void onAuto(); -signals: +Q_SIGNALS: void changed(); private: diff --git a/src/Style/Style_Salome.h b/src/Style/Style_Salome.h index 8a8f90f75..e93f49eff 100644 --- a/src/Style/Style_Salome.h +++ b/src/Style/Style_Salome.h @@ -75,7 +75,7 @@ public: SubControl, const QWidget* = 0 ) const; virtual QRect subElementRect( SubElement, const QStyleOption*, const QWidget* = 0 ) const; -protected slots: +protected Q_SLOTS: QIcon standardIconImplementation( StandardPixmap, const QStyleOption* = 0, const QWidget* = 0 ) const; private: diff --git a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h index c94a9950a..afee6c20e 100755 --- a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h +++ b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.h @@ -53,7 +53,7 @@ public: QString getCompType(); QString getCompMultiStd(); -protected slots: +protected Q_SLOTS: void onBrowseBtnClicked(); void updateButtonState(); void onApply(); diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index eab33fac5..b655a951b 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -52,7 +52,7 @@ public: static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_ptr orb, QWidget* parent = 0 ); -private slots: +private Q_SLOTS: void refresh(); void showDetails( QTreeWidgetItem*, int ); void refreshInterval(); diff --git a/src/TreeData/Test/mainwindow.hxx b/src/TreeData/Test/mainwindow.hxx index 7fb52a1b9..da8c38259 100644 --- a/src/TreeData/Test/mainwindow.hxx +++ b/src/TreeData/Test/mainwindow.hxx @@ -39,10 +39,10 @@ public: protected: void contextMenuEvent(QContextMenuEvent *event); -public slots: +public Q_SLOTS: void updateActions(); -private slots: +private Q_SLOTS: void insertChild(); bool insertColumn(const QModelIndex &parent = QModelIndex()); void insertRow(); diff --git a/src/TreeData/TreeGuiManager.hxx b/src/TreeData/TreeGuiManager.hxx index b2cb0d1c9..d2ca48083 100644 --- a/src/TreeData/TreeGuiManager.hxx +++ b/src/TreeData/TreeGuiManager.hxx @@ -58,7 +58,7 @@ private: TreeModel * _dataTreeModel; DataModel * _dataModel; -public slots: +public Q_SLOTS: virtual void processItemList(QStringList itemNameIdList, int actionId); }; diff --git a/src/TreeData/TreeModel.cxx b/src/TreeData/TreeModel.cxx index 12510fd40..3ae041c97 100644 --- a/src/TreeData/TreeModel.cxx +++ b/src/TreeData/TreeModel.cxx @@ -29,7 +29,7 @@ TreeModel::TreeModel(const QStringList &headers, QObject *parent) : QAbstractItemModel(parent) { QVector rootData; - foreach (QString header, headers) + Q_FOREACH (QString header, headers) rootData << header; // _MEM_ We have to specify a string identifier for each item so @@ -161,7 +161,7 @@ bool TreeModel::setData(const QModelIndex &index, const QVariant &value, bool result = item->setData(index.column(), value); if (result) - emit dataChanged(index, index); + Q_EMIT dataChanged(index, index); return result; } @@ -175,7 +175,7 @@ bool TreeModel::setHeaderData(int section, Qt::Orientation orientation, bool result = _rootItem->setData(section, value); if (result) - emit headerDataChanged(orientation, section, section); + Q_EMIT headerDataChanged(orientation, section, section); return result; } diff --git a/src/TreeData/TreeObserver.hxx b/src/TreeData/TreeObserver.hxx index 74b0e75e4..f66c20d0c 100644 --- a/src/TreeData/TreeObserver.hxx +++ b/src/TreeData/TreeObserver.hxx @@ -35,7 +35,7 @@ public: TreeObserver(); void observe(TreeView * treeView); -public slots: +public Q_SLOTS: /* These slots should be implemented in a specialized version of the TreeObserver to process signals emitted from the TreeView */ virtual void processItemList(QStringList itemNameIdList, int actionId); diff --git a/src/TreeData/TreeView.cxx b/src/TreeData/TreeView.cxx index 1f4e2aba2..8bfb0a6eb 100644 --- a/src/TreeData/TreeView.cxx +++ b/src/TreeData/TreeView.cxx @@ -138,7 +138,7 @@ void TreeView::processMenuAction(QAction * actionSelected) { LOG("TreeView::processMenuAction: signal emitted:\n"<< "item list: "<reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( e ); + Q_EMIT contextMenuRequested( e ); } diff --git a/src/VTKViewer/VTKViewer_RenderWindow.h b/src/VTKViewer/VTKViewer_RenderWindow.h index 3a6a645fa..c61a1cc56 100755 --- a/src/VTKViewer/VTKViewer_RenderWindow.h +++ b/src/VTKViewer/VTKViewer_RenderWindow.h @@ -61,7 +61,7 @@ public: virtual void onChangeBackgroundColor(); virtual void contextMenuEvent( QContextMenuEvent * e ); - signals: + Q_SIGNALS: /*!On mouse move signal.*/ void MouseMove( QMouseEvent* ); /*!On mouse button pressed signal.*/ diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx index 1bb26734c..7e64dcf2d 100755 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx @@ -360,7 +360,7 @@ void VTKViewer_RenderWindowInteractor::TimerFunc() } ((vtkInteractorStyle*)this->InteractorStyle)->OnTimer() ; - emit RenderWindowModified() ; + Q_EMIT RenderWindowModified() ; } /*!Emit render window modified on mouse move,\n @@ -371,7 +371,7 @@ void VTKViewer_RenderWindowInteractor::MouseMove(QMouseEvent *event) { } myInteractorStyle->OnMouseMove(0, 0, event->x(), event->y()/*this->Size[1] - event->y() - 1*/) ; if (myInteractorStyle->needsRedrawing() ) - emit RenderWindowModified() ; + Q_EMIT RenderWindowModified() ; } /*!Reaction on left button pressed.\n @@ -455,7 +455,7 @@ void VTKViewer_RenderWindowInteractor::RightButtonReleased(const QMouseEvent *ev { QContextMenuEvent aEvent( QContextMenuEvent::Mouse, event->pos(), event->globalPos() ); - emit contextMenuRequested( &aEvent ); + Q_EMIT contextMenuRequested( &aEvent ); } } @@ -524,7 +524,7 @@ void VTKViewer_RenderWindowInteractor::ChangeRepresentationToWireframe(vtkActorC ForEach(theCollection, TSetFunction (&VTKViewer_Actor::setDisplayMode,0)); - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } /*!Change all actors from \a theCollection to surface and @@ -536,7 +536,7 @@ void VTKViewer_RenderWindowInteractor::ChangeRepresentationToSurface(vtkActorCol ForEach(theCollection, TSetFunction (&VTKViewer_Actor::setDisplayMode,1)); - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } /*!Change all actors from \a theCollection to surface with edges and @@ -548,7 +548,7 @@ void VTKViewer_RenderWindowInteractor::ChangeRepresentationToSurfaceWithEdges(vt ForEach(theCollection, TSetFunction (&VTKViewer_Actor::setDisplayMode,3)); - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } /*!Gets renderer.*/ @@ -573,7 +573,7 @@ void VTKViewer_RenderWindowInteractor::DisplayAll() ActorCollectionCopy aCopy(GetRenderer()->GetActors()); ForEach(aCopy.GetActors(),TSetVisibility(true)); - emit RenderWindowModified() ; + Q_EMIT RenderWindowModified() ; } /*!Do nothing*/ @@ -588,7 +588,7 @@ void VTKViewer_RenderWindowInteractor::Remove( VTKViewer_Actor* SActor, bool upd { GetRenderer()->RemoveViewProp( SActor ); if ( updateViewer ) - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } } @@ -612,7 +612,7 @@ void VTKViewer_RenderWindowInteractor::RemoveAll( const bool updateViewer ) } if ( updateViewer ) - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } } @@ -626,7 +626,7 @@ void VTKViewer_RenderWindowInteractor::Display( VTKViewer_Actor* theActor, bool theActor->SetVisibility(true); if(update) - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } /*! @@ -654,7 +654,7 @@ void VTKViewer_RenderWindowInteractor::Update() { aRen->ResetCamera(); - emit RenderWindowModified(); + Q_EMIT RenderWindowModified(); } /*!Unhighlight all selection actors.*/ @@ -670,7 +670,7 @@ void VTKViewer_RenderWindowInteractor::unHighlightSubSelection(){ bool VTKViewer_RenderWindowInteractor::unHighlightAll(){ unHighlightSubSelection(); - emit RenderWindowModified() ; + Q_EMIT RenderWindowModified() ; return false; } @@ -695,7 +695,7 @@ bool VTKViewer_RenderWindowInteractor::highlight(const TColStd_IndexedMapOfInteg if(update){ this->RenderWindow->Render(); - emit RenderWindowModified() ; + Q_EMIT RenderWindowModified() ; } return false; diff --git a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h index 91557d5b7..5429a20f0 100755 --- a/src/VTKViewer/VTKViewer_RenderWindowInteractor.h +++ b/src/VTKViewer/VTKViewer_RenderWindowInteractor.h @@ -212,7 +212,7 @@ public: /*! User for switching to stereo mode.*/ int PositionBeforeStereo[2]; - public slots: + public Q_SLOTS: void MouseMove(QMouseEvent *event) ; void LeftButtonPressed(const QMouseEvent *event) ; void LeftButtonReleased(const QMouseEvent *event) ; @@ -224,10 +224,10 @@ public: void ButtonReleased(const QMouseEvent *event) ; void KeyPressed(QKeyEvent *event) ; - private slots: + private Q_SLOTS: void TimerFunc() ; -signals: +Q_SIGNALS: void RenderWindowModified() ; void contextMenuRequested( QContextMenuEvent *e ); diff --git a/src/VTKViewer/VTKViewer_ViewModel.h b/src/VTKViewer/VTKViewer_ViewModel.h index 2e6c57f1e..622e6d06f 100755 --- a/src/VTKViewer/VTKViewer_ViewModel.h +++ b/src/VTKViewer/VTKViewer_ViewModel.h @@ -82,10 +82,10 @@ public: Qtx::BackgroundData background() const; void setBackground( const Qtx::BackgroundData& ); -signals: +Q_SIGNALS: void selectionChanged(); -protected slots: +protected Q_SLOTS: void onMousePress( SUIT_ViewWindow*, QMouseEvent* ); void onMouseMove( SUIT_ViewWindow*, QMouseEvent* ); void onMouseRelease( SUIT_ViewWindow*, QMouseEvent* ); diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index b82a8a44f..94335a2fa 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -669,37 +669,37 @@ void VTKViewer_ViewWindow::onAdjustTrihedron(){ /*!Emit key pressed.*/ void VTKViewer_ViewWindow::onKeyPressed(QKeyEvent* event) { - emit keyPressed( this, event ); + Q_EMIT keyPressed( this, event ); } /*!Emit key released.*/ void VTKViewer_ViewWindow::onKeyReleased(QKeyEvent* event) { - emit keyReleased( this, event ); + Q_EMIT keyReleased( this, event ); } /*!Emit key pressed.*/ void VTKViewer_ViewWindow::onMousePressed(QMouseEvent* event) { - emit mousePressed(this, event); + Q_EMIT mousePressed(this, event); } /*!Emit mouse released.*/ void VTKViewer_ViewWindow::onMouseReleased(QMouseEvent* event) { - emit mouseReleased( this, event ); + Q_EMIT mouseReleased( this, event ); } /*!Emit mouse moving.*/ void VTKViewer_ViewWindow::onMouseMoving(QMouseEvent* event) { - emit mouseMoving( this, event ); + Q_EMIT mouseMoving( this, event ); } /*!Emit mouse double clicked.*/ void VTKViewer_ViewWindow::onMouseDoubleClicked( QMouseEvent* event ) { - emit mouseDoubleClicked( this, event ); + Q_EMIT mouseDoubleClicked( this, event ); } /*!Insert actor to renderer and transformation filter. diff --git a/src/VTKViewer/VTKViewer_ViewWindow.h b/src/VTKViewer/VTKViewer_ViewWindow.h index c58643871..d50465839 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.h +++ b/src/VTKViewer/VTKViewer_ViewWindow.h @@ -79,7 +79,7 @@ public: virtual QString getVisualParameters(); virtual void setVisualParameters( const QString& parameters ); -public slots: +public Q_SLOTS: void onFrontView(); void onBackView(); void onTopView(); @@ -100,7 +100,7 @@ public slots: protected: QImage dumpView(); -protected slots: +protected Q_SLOTS: void onKeyPressed(QKeyEvent* event); void onKeyReleased(QKeyEvent* event); void onMousePressed(QMouseEvent* event); diff --git a/src/ViewerTools/ViewerTools_CubeAxesDlgBase.h b/src/ViewerTools/ViewerTools_CubeAxesDlgBase.h index 7ff50a4a2..86a5dae6f 100644 --- a/src/ViewerTools/ViewerTools_CubeAxesDlgBase.h +++ b/src/ViewerTools/ViewerTools_CubeAxesDlgBase.h @@ -94,7 +94,7 @@ public: virtual void Update(); -protected slots: +protected Q_SLOTS: virtual void onOk(); virtual bool onApply(); virtual void onClose(); diff --git a/src/ViewerTools/ViewerTools_DialogBase.h b/src/ViewerTools/ViewerTools_DialogBase.h index e95ed6666..91e72f6bc 100644 --- a/src/ViewerTools/ViewerTools_DialogBase.h +++ b/src/ViewerTools/ViewerTools_DialogBase.h @@ -42,7 +42,7 @@ public: ~ViewerTools_DialogBase(); -protected slots: +protected Q_SLOTS: void onParentShow(); void onParentHide(); virtual void done( int ); diff --git a/src/ViewerTools/ViewerTools_FontWidgetBase.h b/src/ViewerTools/ViewerTools_FontWidgetBase.h index 42bb2f85e..11f79783b 100644 --- a/src/ViewerTools/ViewerTools_FontWidgetBase.h +++ b/src/ViewerTools/ViewerTools_FontWidgetBase.h @@ -57,7 +57,7 @@ public: protected: virtual void InitializeFamilies() = 0; -protected slots: +protected Q_SLOTS: void onColor(); protected: diff --git a/tools/dlgfactory/GenericDialog.h b/tools/dlgfactory/GenericDialog.h index 04b31c261..8a53ee5f2 100644 --- a/tools/dlgfactory/GenericDialog.h +++ b/tools/dlgfactory/GenericDialog.h @@ -34,7 +34,7 @@ public: QFrame * getPanel(); QDialogButtonBox * getButtonBox(); - protected slots: + protected Q_SLOTS: void accept(); //void reject(); diff --git a/tools/dlgfactory/__QDIALOG__.h b/tools/dlgfactory/__QDIALOG__.h index b2cfd4f7f..157700044 100644 --- a/tools/dlgfactory/__QDIALOG__.h +++ b/tools/dlgfactory/__QDIALOG__.h @@ -11,7 +11,7 @@ class __CLASSNAME__ : public QDialog public: __CLASSNAME__(QDialog *parent = 0); - protected slots: + protected Q_SLOTS: void accept(); //void reject();