From: imn Date: Wed, 17 Sep 2014 09:41:53 +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%2Fsmesh.git Removed qt3 support and replaced qt macros --- diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index f5477356e..5ef002f00 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -203,7 +203,7 @@ namespace SMESH aType = aHistogram->getPointList().empty() ? RemoveFrom2dViewer : aType; SUIT_ViewManager* aViewManager; - foreach( aViewManager, aViewManagerList ) { + Q_FOREACH( aViewManager, aViewManagerList ) { if (Plot2d_ViewManager* aManager = dynamic_cast(aViewManager)) { if (SPlot2d_Viewer* aViewer = dynamic_cast(aManager->getViewModel())) { if (Plot2d_ViewFrame* aViewFrame = aViewer->getActiveViewFrame()) { diff --git a/src/SMESHFiltersSelection/SMESH_LogicalFilter.cxx b/src/SMESHFiltersSelection/SMESH_LogicalFilter.cxx index 61cadf00c..9676f2a84 100644 --- a/src/SMESHFiltersSelection/SMESH_LogicalFilter.cxx +++ b/src/SMESHFiltersSelection/SMESH_LogicalFilter.cxx @@ -54,7 +54,7 @@ SMESH_LogicalFilter::~SMESH_LogicalFilter() bool SMESH_LogicalFilter::isOk (const SUIT_DataOwner* owner) const { SUIT_SelectionFilter* filter; - foreach( filter, myFilters ) + Q_FOREACH( filter, myFilters ) { if (myOperation == LO_OR && filter->isOk(owner)) return true; @@ -114,7 +114,7 @@ void SMESH_LogicalFilter::deleteFilters() if ( myOwnership ) { SUIT_SelectionFilter* filter; - foreach( filter, myFilters ) + Q_FOREACH( filter, myFilters ) delete filter; } } diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 8723415cd..468addb60 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -2188,7 +2188,7 @@ void SMESHGUI::ResetState() //============================================================================= void SMESHGUI::EmitSignalDeactivateDialog() { - emit SignalDeactivateActiveDialog(); + Q_EMIT SignalDeactivateActiveDialog(); } //============================================================================= @@ -2198,7 +2198,7 @@ void SMESHGUI::EmitSignalDeactivateDialog() //============================================================================= void SMESHGUI::EmitSignalStudyFrameChanged() { - emit SignalStudyFrameChanged(); + Q_EMIT SignalStudyFrameChanged(); } //============================================================================= @@ -2208,7 +2208,7 @@ void SMESHGUI::EmitSignalStudyFrameChanged() //============================================================================= void SMESHGUI::EmitSignalCloseAllDialogs() { - emit SignalCloseAllDialogs(); + Q_EMIT SignalCloseAllDialogs(); } //============================================================================= @@ -2218,7 +2218,7 @@ void SMESHGUI::EmitSignalCloseAllDialogs() //============================================================================= void SMESHGUI::EmitSignalVisibilityChanged() { - emit SignalVisibilityChanged(); + Q_EMIT SignalVisibilityChanged(); } //============================================================================= @@ -4705,7 +4705,7 @@ bool SMESHGUI::activateModule( SUIT_Study* study ) if ( aDesk ) { QList wndList = aDesk->windows(); SUIT_ViewWindow* wnd; - foreach ( wnd, wndList ) + Q_FOREACH ( wnd, wndList ) connectView( wnd ); } diff --git a/src/SMESHGUI/SMESHGUI.h b/src/SMESHGUI/SMESHGUI.h index 9055fd200..506995c1e 100644 --- a/src/SMESHGUI/SMESHGUI.h +++ b/src/SMESHGUI/SMESHGUI.h @@ -156,13 +156,13 @@ public : SMESHGUI_ClippingPlaneInfoMap& getClippingPlaneInfoMap() { return myClippingPlaneInfoMap; } -public slots: +public Q_SLOTS: virtual bool deactivateModule( SUIT_Study* ); virtual bool activateModule( SUIT_Study* ); virtual void studyClosed( SUIT_Study* ); void onViewClosed( SUIT_ViewWindow* ); -private slots: +private Q_SLOTS: void OnGUIEvent(); void onViewManagerActivated( SUIT_ViewManager* ); void onViewManagerRemoved( SUIT_ViewManager* ); @@ -170,7 +170,7 @@ private slots: void onOperationAborted( SUIT_Operation* ); void onHypothesisEdit( int result ); -signals: +Q_SIGNALS: void SignalDeactivateActiveDialog(); void SignalStudyFrameChanged(); void SignalCloseAllDialogs(); diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx index 9cbad861c..414b55cc0 100644 --- a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx @@ -179,7 +179,7 @@ void SMESHGUI_Add0DElemsOnAllNodesDlg::onSelTypeChange( int selType ) myFilterBtn->setEnabled( selType != SEL_OBJECT ); - emit selTypeChanged( selType ); + Q_EMIT selTypeChanged( selType ); } //================================================================================ diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h index d887c1451..af5cf551a 100644 --- a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h @@ -53,12 +53,12 @@ class SMESHGUI_EXPORT SMESHGUI_Add0DElemsOnAllNodesDlg : public SMESHGUI_Dialog int getSelectionType() const; bool isValid(); -signals: +Q_SIGNALS: void selTypeChanged( int selType ); - private slots: + private Q_SLOTS: void onGroupChecked ( bool on ); void onSelTypeChange( int selType ); @@ -95,7 +95,7 @@ class SMESHGUI_EXPORT SMESHGUI_Add0DElemsOnAllNodesOp : public SMESHGUI_Selectio virtual void selectionDone(); virtual SUIT_SelectionFilter* createFilter( const int ) const; - protected slots: + protected Q_SLOTS: virtual bool onApply(); void onSelTypeChange(int); void onSetFilter(); diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h index af99005e2..934be412f 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h @@ -116,11 +116,11 @@ private: QString myHelpFileName; -protected slots: +protected Q_SLOTS: virtual void reject(); void onDiameterChanged(); -private slots: +private Q_SLOTS: void ClickOnOk(); void ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h index bc336e668..a9aa2bfcd 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h @@ -126,10 +126,10 @@ private: QString myHelpFileName; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onTextChange( const QString& ); void onCellTextChange( int, int ); void onReverse( int ); diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h index a4fd91a49..a9de8556d 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h @@ -113,10 +113,10 @@ private: bool myIsApplyAndClose; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.h b/src/SMESHGUI/SMESHGUI_ClippingDlg.h index bab2458ed..18496d98c 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.h +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.h @@ -245,10 +245,10 @@ private: SMESH::Mode CurrentMode; -protected slots: +protected Q_SLOTS: virtual void reject(); -public slots: +public Q_SLOTS: void onModeAbsolute(); void onModeRelative(); void ClickOnNew(); diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 1bf5e5c8b..991270f67 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -465,7 +465,7 @@ namespace SMESH rows.clear(); QList selRanges = table->selectedRanges(); QTableWidgetSelectionRange range; - foreach( range, selRanges ) + Q_FOREACH( range, selRanges ) { for ( int row = range.topRow(); row <= range.bottomRow(); ++row ) if ( !rows.count( row )) @@ -1225,7 +1225,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape() QList rows; SMESH::getSelectedRows( table(), rows ); int row; - foreach ( row, rows ) + Q_FOREACH ( row, rows ) { int curSub = table()->item(row, COL_SHAPEID)->text().toInt(); GEOM::GEOM_Object_wrap shape = SMESH::getSubShape( curSub, myMainShape ); @@ -1310,7 +1310,7 @@ void SMESHGUI_BaseComputeOp::onGroupOfBadMesh() QList rows; SMESH::getSelectedRows( table(), rows ); int row; - foreach ( row, rows ) + Q_FOREACH ( row, rows ) { bool hasBadMesh = ( !table()->item(row, COL_BAD_MESH)->text().isEmpty() ); if ( hasBadMesh ) { @@ -1352,7 +1352,7 @@ void SMESHGUI_BaseComputeOp::currentCellChanged() QList rows; int nbSelected = SMESH::getSelectedRows( table(), rows ); int row; - foreach ( row, rows ) + Q_FOREACH ( row, rows ) { bool hasData = ( !table()->item( row, COL_SHAPE )->text().isEmpty() ); bool isPublished = ( !table()->item( row, COL_PUBLISHED )->text().isEmpty() ); @@ -1394,7 +1394,7 @@ void SMESHGUI_BaseComputeOp::onPreviewShape() bool showOnly = true; int row; - foreach ( row, rows ) + Q_FOREACH ( row, rows ) { int curSub = table()->item( row, COL_SHAPEID )->text().toInt(); if ( curSub > 0 ) { diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.h b/src/SMESHGUI/SMESHGUI_ComputeDlg.h index ad1bd8f98..f099a3571 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.h +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.h @@ -95,7 +95,7 @@ protected: virtual bool isValid( SUIT_Operation* theOp ) const; -protected slots: +protected Q_SLOTS: virtual bool onApply(); void onPreviewShape(); void onPublishShape(); @@ -133,7 +133,7 @@ public: protected: virtual void startOperation(); -protected slots: +protected Q_SLOTS: }; class SMESHGUI_MeshOrderMgr; @@ -164,10 +164,10 @@ protected: virtual void initDialog(); -protected slots: +protected Q_SLOTS: virtual void onCancel(); -private slots: +private Q_SLOTS: void onPreview(); void onCompute(); @@ -200,7 +200,7 @@ public: protected: virtual void startOperation(); -protected slots: +protected Q_SLOTS: }; /*! @@ -256,7 +256,7 @@ public: SMESHGUI_MeshOrderBox* getMeshOrderBox() const; -signals: +Q_SIGNALS: void preview(); private: @@ -310,7 +310,7 @@ protected: void timerEvent(QTimerEvent *timer); void closeEvent(QCloseEvent *event); -private slots: +private Q_SLOTS: void onCancel(); private: diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx index 59855bb49..a5567408c 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx @@ -170,5 +170,5 @@ void SMESHGUI_ConvToQuadDlg::SetEnabledRB( const int idx, const bool theCheck ) myMedNdsOnGeom->setEnabled( theCheck ); - emit onClicked( myBG->checkedId() ); + Q_EMIT onClicked( myBG->checkedId() ); } diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h index d3b461fe5..86302f572 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h @@ -58,7 +58,7 @@ public: bool isWarningShown(); bool IsBiQuadratic() const; -signals: +Q_SIGNALS: void onClicked( int ); private: diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h index 023789c66..fee6acbac 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h @@ -59,7 +59,7 @@ protected: MeshDestinationType DestinationMesh( const SMESH::SMESH_IDSource_var& , bool* isMixOrder = 0) const; -protected slots: +protected Q_SLOTS: virtual bool onApply(); void ConnectRadioButtons( int ); void onWarningWinFinished(); diff --git a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.h b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.h index a81a37669..9f2116464 100644 --- a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.h @@ -112,10 +112,10 @@ private: bool myIsApplyAndClose; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index 34771755d..9cfeb2cba 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -418,7 +418,7 @@ void SMESHGUI_CreatePatternDlg::onSave() disconnect( mySMESHGUI, 0, this, 0 ); mySMESHGUI->ResetState(); accept(); - emit NewPattern(); + Q_EMIT NewPattern(); } } catch ( const SALOME::SALOME_Exception& S_ex ) { @@ -471,7 +471,7 @@ void SMESHGUI_CreatePatternDlg::onOk() disconnect( mySMESHGUI, 0, this, 0 ); mySMESHGUI->ResetState(); accept(); - emit NewPattern(); + Q_EMIT NewPattern(); } } catch ( const SALOME::SALOME_Exception& S_ex ) { @@ -493,7 +493,7 @@ void SMESHGUI_CreatePatternDlg::reject() disconnect( mySMESHGUI, 0, this, 0 ); mySMESHGUI->ResetState(); QDialog::reject(); - emit Close(); + Q_EMIT Close(); } //================================================================================= diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h index 515c230d1..415223eb2 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h @@ -69,7 +69,7 @@ public: SMESH::SMESH_Pattern_ptr GetPattern(); void SetMesh( SMESH::SMESH_Mesh_ptr ); -signals: +Q_SIGNALS: void NewPattern(); void Close(); @@ -77,7 +77,7 @@ private: void enterEvent( QEvent* ); void keyPressEvent( QKeyEvent* ); -private slots: +private Q_SLOTS: void onOk(); void onSave(); void reject(); diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 73fac9a84..3ae927ebe 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -1087,7 +1087,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onRemove() if ( selItems.count() > 0 ) myNbOkElements = 1; - foreach( anItem, selItems ) + Q_FOREACH( anItem, selItems ) delete anItem; RemoveButton->setEnabled( myFacesByNodes->count() > 0 ); @@ -1113,7 +1113,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onListSelectionChanged() QList selItems = myFacesByNodes->selectedItems(); QListWidgetItem* anItem; - foreach( anItem, selItems ) { + Q_FOREACH( anItem, selItems ) { QStringList anIds = anItem->text().split( " ", QString::SkipEmptyParts ); for (QStringList::iterator it = anIds.begin(); it != anIds.end(); ++it) aIndexes.Add((*it).toInt()); diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h index 4f6de47b9..7551de9da 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h @@ -119,14 +119,14 @@ private: QString myHelpFileName; -public slots: +public Q_SLOTS: void onAdd(); void onRemove(); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnPreview( bool ); void ClickOnOk(); diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h index e9f3f2ade..719574a5e 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h @@ -62,10 +62,10 @@ private: void enterEvent( QEvent* ); void keyPressEvent( QKeyEvent* ); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onOk(); bool onApply(); void onHelp(); diff --git a/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h b/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h index 5bf5247d2..6e6844523 100644 --- a/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h @@ -68,10 +68,10 @@ private: void enterEvent( QEvent* ); void keyPressEvent( QKeyEvent* ); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onConstructorsClicked( int ); void onOk(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index 8c2d0ef51..34fb644ea 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -1096,7 +1096,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::OnAngleRemoved() { QList aList = AnglesList->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, aList) { + Q_FOREACH(anItem, aList) { myAnglesList.removeAt(AnglesList->row(anItem)); delete anItem; } diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h index bedc111ef..784f66009 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h @@ -146,11 +146,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: void reject(); virtual void onDisplaySimulation( bool ); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h index c3acc56d0..f3018569e 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h @@ -143,11 +143,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void CheckIsEnable(); void ClickOnOk(); diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h index feaa83415..de121604c 100644 --- a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h +++ b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h @@ -48,7 +48,7 @@ class SMESHGUI_EXPORT SMESHGUI_FieldSelectorWdg : public QGroupBox bool GetSelectedFeilds(); - private slots: + private Q_SLOTS: void onItemCheck(QTreeWidgetItem * item, int column); diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 8409afa4a..23f843979 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -846,7 +846,7 @@ QList SMESHGUI_FilterTable::Table::selectedRows() QTableWidgetItem* anItem; QList rows; - foreach( anItem, selItems ) { + Q_FOREACH( anItem, selItems ) { int r = row( anItem ); if ( !rows.contains( r ) ) rows.append( r ); } @@ -1090,7 +1090,7 @@ void SMESHGUI_FilterTable::onEntityType (int theType) return; myIsValid = true; - emit NeedValidation(); + Q_EMIT NeedValidation(); if (!myIsValid) { myEntityTypeGrp->button(myEntityType)->setChecked(true); @@ -1113,7 +1113,7 @@ void SMESHGUI_FilterTable::onEntityType (int theType) myTables[ myEntityType ]->updateGeometry(); adjustSize(); - emit EntityTypeChanged(theType); + Q_EMIT EntityTypeChanged(theType); } //======================================================================= @@ -1428,7 +1428,7 @@ void SMESHGUI_FilterTable::SetCriterion (const int theRow, myAddWidgets[ anItem ]->SetDouble(AdditionalWidget::Tolerance, theCriterion.Tolerance); } - emit CriterionChanged(theRow, aType); + Q_EMIT CriterionChanged(theRow, aType); } //======================================================================= @@ -1527,7 +1527,7 @@ void SMESHGUI_FilterTable::onRemoveBtn() QList aRows = aTable->selectedRows(); // already sorted int i; - foreach( i, aRows ) + Q_FOREACH( i, aRows ) { removeAdditionalWidget(aTable, i); aTable->removeRow(i); @@ -1662,7 +1662,7 @@ void SMESHGUI_FilterTable::onCurrentChanged (int theRow, int theCol) { if( !myIsLocked ) updateAdditionalWidget(); - emit CurrentChanged(theRow, theCol); + Q_EMIT CurrentChanged(theRow, theCol); } //======================================================================= @@ -1982,7 +1982,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con updateAdditionalWidget(); - emit CriterionChanged(row, entityType); + Q_EMIT CriterionChanged(row, entityType); } //======================================================================= @@ -1995,7 +1995,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (int row, int col) if( col == 0 ) onCriterionChanged(row, col, -1); else if ( col == 2 ) - emit ThresholdChanged(row, GetType()); + Q_EMIT ThresholdChanged(row, GetType()); } //======================================================================= @@ -2943,7 +2943,7 @@ void SMESHGUI_FilterDlg::onOk() disconnect(mySelectionMgr, 0, this, 0); mySMESHGUI->ResetState(); accept(); - emit Accepted(); + Q_EMIT Accepted(); } } @@ -3100,7 +3100,7 @@ void SMESHGUI_FilterDlg::setIdsToWg (QWidget* theWg, const QList& theIds) return; QStringList aStrList; - foreach(int id, theIds) + Q_FOREACH(int id, theIds) aStrList << QString::number(id); if (theWg->inherits("QListWidget")) diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index da3358a8a..24557691a 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -135,7 +135,7 @@ public: void Update(); -signals: +Q_SIGNALS: void CopyFromClicked(); void AddToClicked(); void EntityTypeChanged( const int ); @@ -144,7 +144,7 @@ signals: void ThresholdChanged( const int, const int ); void CurrentChanged( int, int ); -private slots: +private Q_SLOTS: void onAddBtn(); void onInsertBtn(); void onRemoveBtn(); @@ -237,14 +237,14 @@ public: void SetFilter(SMESH::Filter_var filter, int type); void UnRegisterFilters(); -signals: +Q_SIGNALS: void Accepted(); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onOk(); bool onApply(); diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h index cc5d1f7ce..14f1a6b49 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h @@ -80,10 +80,10 @@ private: void enterEvent( QEvent* ); void keyPressEvent( QKeyEvent* ); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onOk(); bool onApply(); void onHelp(); diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx index 12dad3e0f..d8b62617d 100644 --- a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx @@ -367,7 +367,7 @@ void SMESHGUI_FindElemByPointOp::onElemTypeChange(int index) void SMESHGUI_FindElemByPointDlg::reject() { - emit rejectedDlg(); + Q_EMIT rejectedDlg(); QtxDialog::reject(); } diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h index 568ae6295..5e6258736 100644 --- a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h +++ b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h @@ -56,12 +56,12 @@ protected: virtual void activateSelection(); -protected slots: +protected Q_SLOTS: virtual void onFind(); virtual bool onApply(); -private slots: +private Q_SLOTS: void onRejectedDlg(); void onSelectionDone(); @@ -107,13 +107,13 @@ private: friend class SMESHGUI_FindElemByPointOp; -signals: +Q_SIGNALS: void rejectedDlg(); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: //void ButtonToggled( bool ); }; diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 60095ebe2..d83e45340 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -1231,7 +1231,7 @@ void SMESHGUI_GroupDlg::onListSelectionChanged() TColStd_MapOfInteger aIndexes; QList selItems = myElements->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) aIndexes.Add(anItem->text().toInt()); + Q_FOREACH(anItem, selItems) aIndexes.Add(anItem->text().toInt()); mySelector->AddOrRemoveIndex(myActorsList.first()->getIO(), aIndexes, false); SALOME_ListIO aList; aList.Append(myActorsList.first()->getIO()); @@ -1527,13 +1527,13 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() QStringList anElements = aListStr.split( " ", QString::SkipEmptyParts); for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) { QList found = myElements->findItems(*it, Qt::MatchExactly); - foreach(anItem, found) + Q_FOREACH(anItem, found) if (!anItem->isSelected()) listItemsToSel.push_back(anItem); } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); onListSelectionChanged(); listItemsToSel.clear(); @@ -1876,14 +1876,14 @@ void SMESHGUI_GroupDlg::onAdd() listItemsToSel.push_back(anItem); } else { - foreach(anItem, found) + Q_FOREACH(anItem, found) if (!anItem->isSelected()) listItemsToSel.push_back(anItem); } } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); onListSelectionChanged(); listItemsToSel.clear(); @@ -1914,14 +1914,14 @@ void SMESHGUI_GroupDlg::onAdd() listItemsToSel.push_back(anItem); } else { - foreach(anItem, found) + Q_FOREACH(anItem, found) if (!anItem->isSelected()) listItemsToSel.push_back(anItem); } } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); onListSelectionChanged(); listItemsToSel.clear(); @@ -1960,14 +1960,14 @@ void SMESHGUI_GroupDlg::onAdd() listItemsToSel.push_back(anItem); } else { - foreach(anItem, found) + Q_FOREACH(anItem, found) if (!anItem->isSelected()) listItemsToSel.push_back(anItem); } } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); onListSelectionChanged(); listItemsToSel.clear(); @@ -2018,14 +2018,14 @@ void SMESHGUI_GroupDlg::onAdd() listItemsToSel.push_back(anItem); } else { - foreach(anItem, found) + Q_FOREACH(anItem, found) if (!anItem->isSelected()) listItemsToSel.push_back(anItem); } } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); onListSelectionChanged(); listItemsToSel.clear(); @@ -2054,7 +2054,7 @@ void SMESHGUI_GroupDlg::onRemove() if (myCurrentLineEdit == 0) { QList selItems = myElements->selectedItems(); QListWidgetItem* item; - foreach(item, selItems) delete item; + Q_FOREACH(item, selItems) delete item; } else { SALOME_ListIO aList; mySelectionMgr->selectedObjects( aList ); @@ -2092,7 +2092,7 @@ void SMESHGUI_GroupDlg::onRemove() QList found = myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly); QListWidgetItem* anItem; - foreach(anItem, found) delete anItem; + Q_FOREACH(anItem, found) delete anItem; } } catch (const SALOME::SALOME_Exception& ex) { @@ -2107,7 +2107,7 @@ void SMESHGUI_GroupDlg::onRemove() QList found = myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly); QListWidgetItem* anItem; - foreach(anItem, found) delete anItem; + Q_FOREACH(anItem, found) delete anItem; } } catch (const SALOME::SALOME_Exception& ex) { @@ -2136,7 +2136,7 @@ void SMESHGUI_GroupDlg::onRemove() QList found = myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly); QListWidgetItem* anItem; - foreach(anItem, found) delete anItem; + Q_FOREACH(anItem, found) delete anItem; } } } @@ -2185,7 +2185,7 @@ void SMESHGUI_GroupDlg::onSort() } bool blocked = myElements->signalsBlocked(); myElements->blockSignals(true); - foreach(anItem, listItemsToSel) anItem->setSelected(true); + Q_FOREACH(anItem, listItemsToSel) anItem->setSelected(true); myElements->blockSignals(blocked); listItemsToSel.clear(); myIsBusy = false; diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.h b/src/SMESHGUI/SMESHGUI_GroupDlg.h index 8deca4976..019778446 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.h @@ -81,14 +81,14 @@ public: static QString GetDefaultName( const QString& ); -public slots: +public Q_SLOTS: void onAdd(); void onRemove(); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onTypeChanged( int ); void onGrpTypeChanged( int ); void onColorChanged( QColor ); diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h index 2fa69da68..24d0095d3 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h @@ -50,7 +50,7 @@ public: virtual LightApp_Dialog* dlg() const; static QString GetDefaultName(const QString& theOperation); -public slots: +public Q_SLOTS: protected: @@ -59,7 +59,7 @@ protected: virtual SUIT_SelectionFilter* createFilter( const int ) const; //virtual bool isValid( SUIT_Operation* ) const; -private slots: +private Q_SLOTS: bool onApply(); void onButtonClick(); @@ -96,7 +96,7 @@ public: SMESHGUI_GroupOnShapeDlg(); virtual ~SMESHGUI_GroupOnShapeDlg(); -public slots: +public Q_SLOTS: void updateButtons(); void init(); diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h index db086cd79..6ba4cfbad 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h @@ -65,7 +65,7 @@ public: void Init(); -protected slots: +protected Q_SLOTS: virtual bool onApply(); virtual void onSelectionDone(); @@ -95,10 +95,10 @@ private: void enterEvent( QEvent* ); void keyPressEvent( QKeyEvent* ); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onOk(); void onHelp(); @@ -141,7 +141,7 @@ public: SMESHGUI_UnionGroupsDlg( SMESHGUI* ); virtual ~SMESHGUI_UnionGroupsDlg(); -protected slots: +protected Q_SLOTS: virtual bool onApply(); virtual void onSelectionDone(); @@ -167,7 +167,7 @@ public: SMESHGUI_IntersectGroupsDlg( SMESHGUI* ); virtual ~SMESHGUI_IntersectGroupsDlg(); -protected slots: +protected Q_SLOTS: virtual bool onApply(); virtual void onSelectionDone(); @@ -193,7 +193,7 @@ public: SMESHGUI_CutGroupsDlg( SMESHGUI* ); virtual ~SMESHGUI_CutGroupsDlg(); -protected slots: +protected Q_SLOTS: virtual bool onApply(); virtual void onSelectionDone(); @@ -230,7 +230,7 @@ public: protected: virtual void reset(); -protected slots: +protected Q_SLOTS: virtual bool onApply(); virtual void onSelectionDone(); diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index af1377aba..a06d56829 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -149,7 +149,7 @@ void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ Dlg->resize( Dlg->minimumSizeHint() ); } else { - emit finished( QDialog::Accepted ); + Q_EMIT finished( QDialog::Accepted ); delete myDlg; } } @@ -309,7 +309,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result ) myDlg->close(); //delete myDlg; since WA_DeleteOnClose==true myDlg = 0; - emit finished( result ); + Q_EMIT finished( result ); } bool SMESHGUI_GenericHypothesisCreator::stdParams( ListOfStdParams& ) const diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.h b/src/SMESHGUI/SMESHGUI_Hypotheses.h index fcadee8dd..7e9c5c1d9 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.h +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.h @@ -72,7 +72,7 @@ public: QString getMainShapeEntry() const { return myMainShapeEntry; } void setMainShapeEntry( const QString& theEntry ) { myMainShapeEntry = theEntry; } -signals: +Q_SIGNALS: void finished( int ); protected: @@ -120,10 +120,10 @@ protected: virtual QPixmap icon() const; virtual QString type() const; -protected slots: +protected Q_SLOTS: virtual void onValueChanged(); -private slots: +private Q_SLOTS: virtual void onDialogFinished( int ); private: @@ -154,7 +154,7 @@ public: void setCustomFrame( QFrame* ); void setType( const QString& ); -protected slots: +protected Q_SLOTS: virtual void accept(); virtual void reject(); void onHelp(); diff --git a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h index 79867d791..b4e176875 100644 --- a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h +++ b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h @@ -65,7 +65,7 @@ public: bool copySource() const; -private slots: +private Q_SLOTS: void onTargetChanged(); void onGroupChecked(); @@ -103,7 +103,7 @@ protected: virtual SUIT_SelectionFilter* createFilter( const int ) const; bool isValid( QString& ) const; -protected slots: +protected Q_SLOTS: virtual bool onApply(); void onModeChanged(); diff --git a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h index 24be56a42..e3f13bebe 100644 --- a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h +++ b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h @@ -64,10 +64,10 @@ protected: bool isValid( QString& ); -protected slots: +protected Q_SLOTS: virtual bool onApply(); -private slots: +private Q_SLOTS: void onSelectionDone(); void redisplayPreview(); void onTextChange( const QString& ); @@ -131,7 +131,7 @@ private: friend class SMESHGUI_MakeNodeAtPointOp; -private slots: +private Q_SLOTS: void ButtonToggled( bool ); void ConstructorsClicked( int ); }; diff --git a/src/SMESHGUI/SMESHGUI_Measurements.cxx b/src/SMESHGUI/SMESHGUI_Measurements.cxx index e00937aff..a0055e310 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.cxx +++ b/src/SMESHGUI/SMESHGUI_Measurements.cxx @@ -1003,7 +1003,7 @@ void SMESHGUI_BoundingBox::sourceEdited() if ( !mySource->isReadOnly() ) myIDs = mySource->text(); QStringList ids = myIDs.split( " ", QString::SkipEmptyParts ); - foreach ( QString id, ids ) + Q_FOREACH ( QString id, ids ) ID.Add( id.trimmed().toLong() ); selector->AddOrRemoveIndex( IO, ID, false ); } diff --git a/src/SMESHGUI/SMESHGUI_Measurements.h b/src/SMESHGUI/SMESHGUI_Measurements.h index 964f7418d..2c8aef3e7 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.h +++ b/src/SMESHGUI/SMESHGUI_Measurements.h @@ -62,7 +62,7 @@ private: void displayPreview(); void createPreview( double, double, double, double, double, double ); -private slots: +private Q_SLOTS: void selectionChanged(); void firstChanged(); void secondChanged(); @@ -108,7 +108,7 @@ private: void displayPreview(); void createPreview( double, double, double, double, double, double ); -private slots: +private Q_SLOTS: void selectionChanged(); void sourceChanged(); void sourceEdited(); @@ -152,7 +152,7 @@ public: void updateSelection(); void deactivate(); -private slots: +private Q_SLOTS: void selectionChanged(); void modeChanged( int); void compute(); @@ -192,7 +192,7 @@ protected: void keyPressEvent( QKeyEvent* ); void enterEvent( QEvent* ); -private slots: +private Q_SLOTS: void help(); void updateSelection(); void activate(); diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index 046bd063c..428fe0cda 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -862,7 +862,7 @@ void SMESHGUI_MergeDlg::onSelectGroup() ListEdit->clear(); - foreach(anItem, selItems) { + Q_FOREACH(anItem, selItems) { aListIds = anItem->text().split(" ", QString::SkipEmptyParts); for (int i = 0; i < aListIds.count(); i++) anIndices.Add(aListIds[i].toInt()); @@ -921,7 +921,7 @@ void SMESHGUI_MergeDlg::onSelectElementFromGroup() QList selItems = ListEdit->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) + Q_FOREACH(anItem, selItems) anIndices.Add(anItem->text().toInt()); SetFirstButton->setEnabled(selItems.count() == 1); @@ -991,7 +991,7 @@ void SMESHGUI_MergeDlg::onRemoveGroup() QList selItems = ListCoincident->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) + Q_FOREACH(anItem, selItems) delete anItem; ListEdit->clear(); @@ -1034,7 +1034,7 @@ void SMESHGUI_MergeDlg::onAddElement() } else { QListWidgetItem* anItem; - foreach(anItem, found) anItem->setSelected(true); + Q_FOREACH(anItem, found) anItem->setSelected(true); } } @@ -1055,7 +1055,7 @@ void SMESHGUI_MergeDlg::onRemoveElement() QList selItems = ListEdit->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) + Q_FOREACH(anItem, selItems) delete anItem; myIsBusy = false; @@ -1080,7 +1080,7 @@ void SMESHGUI_MergeDlg::onSetFirst() QList selItems = ListEdit->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) { + Q_FOREACH(anItem, selItems) { ListEdit->takeItem(ListEdit->row(anItem)); ListEdit->insertItem(0, anItem); } diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.h b/src/SMESHGUI/SMESHGUI_MergeDlg.h index fed3a1865..dd79343de 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.h +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.h @@ -149,10 +149,10 @@ private: QString myEntry; GrpList myGroups; -protected slots: +protected Q_SLOTS: virtual void reject(); - private slots: + private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index f3a2719d4..3a6313db3 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -403,7 +403,7 @@ void SMESHGUI_MeshTab::onCreateHyp() QAction* a = aPopup.exec( QCursor::pos() ); if ( a ) - emit createHyp( isMainHyp ? MainHyp : AddHyp, actions.indexOf( a ) ); + Q_EMIT createHyp( isMainHyp ? MainHyp : AddHyp, actions.indexOf( a ) ); } //================================================================================ @@ -421,7 +421,7 @@ void SMESHGUI_MeshTab::onEditHyp() for ( ; aHypType <= MoreAddHyp; ++aHypType ) if ( aSender == myEditHypBtn[ aHypType ]) break; - emit editHyp( Min( aHypType, AddHyp ), + Q_EMIT editHyp( Min( aHypType, AddHyp ), getCurrentIndex( aHypType ) - 1 ); // - 1 because there is NONE on the top } @@ -439,7 +439,7 @@ void SMESHGUI_MeshTab::onHyp( int theIndex ) const QObject* aSender = sender(); if ( aSender == myHypCombo[ Algo ] ) { - emit selectAlgo( theIndex - 1 ); // - 1 because there is NONE on the top + Q_EMIT selectAlgo( theIndex - 1 ); // - 1 because there is NONE on the top } else if ( aSender == myAddHypList ) { @@ -719,7 +719,7 @@ void SMESHGUI_MeshDlg::setHypoSets( const QStringList& theSets ) void SMESHGUI_MeshDlg::onHypoSetPopup( QAction* a ) { - emit hypoSet( a->text() ); + Q_EMIT hypoSet( a->text() ); } //================================================================================ @@ -798,7 +798,7 @@ void SMESHGUI_MeshDlg::onGeomSelectionButton(bool isBtnOn) void SMESHGUI_MeshDlg::onGeomPopup( QAction* a ) { - emit geomSelectionByMesh( a->data().toInt() == GEOM_BY_MESH_INDEX ); + Q_EMIT geomSelectionByMesh( a->data().toInt() == GEOM_BY_MESH_INDEX ); } int SMESHGUI_MeshDlg::getActiveObject() @@ -829,7 +829,7 @@ void SMESHGUI_MeshDlg::setAvailableMeshType( const QStringList& theTypeMesh ) //================================================================================ void SMESHGUI_MeshDlg::onChangedMeshType( const int isIndex ) { - emit selectMeshType( Dim3D - myTabWg->currentIndex(), isIndex ); + Q_EMIT selectMeshType( Dim3D - myTabWg->currentIndex(), isIndex ); } //================================================================================ /*! diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.h b/src/SMESHGUI/SMESHGUI_MeshDlg.h index f8d8b108e..fe654f546 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.h @@ -79,12 +79,12 @@ public: int currentMeshType(); void setCurrentMeshType( const int ); -signals: +Q_SIGNALS: void hypoSet( const QString& ); void geomSelectionByMesh( bool ); void selectMeshType( const int, const int ); -private slots: +private Q_SLOTS: void onHypoSetPopup( QAction* ); void onGeomPopup( QAction* ); void onGeomSelectionButton( bool ); @@ -132,7 +132,7 @@ public: int nbAddHypTypes() const; void reset(); -signals: +Q_SIGNALS: void createHyp( const int, const int ); //!< Emited when "Create hypothesis" button clicked void editHyp( const int, const int ); @@ -140,7 +140,7 @@ signals: void selectAlgo( const int ); //!< Emited when an algorithm is selected -private slots: +private Q_SLOTS: void onCreateHyp(); void onEditHyp(); void onHyp( int ); diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx index 2dca23bba..94401baed 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx @@ -792,7 +792,7 @@ void SMESHGUI_MeshInfo::setFieldsVisible( int start, int end, bool on ) end = qMin( end, (int)iElementsEnd ); for ( int i = start; i < end; i++ ) { wlist wl = myWidgets[i]; - foreach ( QWidget* w, wl ) w->setVisible( on ); + Q_FOREACH ( QWidget* w, wl ) w->setVisible( on ); } } @@ -1020,7 +1020,7 @@ QString SMESHGUI_ElemInfo::formatConnectivity( Connectivity connectivity, int ty if ( connectivity.contains( type ) ) { QList elements = connectivity[ type ]; qSort( elements ); - foreach( int id, elements ) + Q_FOREACH( int id, elements ) str << QString::number( id ); } return str.join( " " ); @@ -1106,7 +1106,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList& ids ) int cprecision = -1; if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) ) cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 ); - foreach ( long id, ids ) { + Q_FOREACH ( long id, ids ) { if ( !isElements() ) { // // show node info @@ -1594,7 +1594,7 @@ void SMESHGUI_TreeElemInfo::information( const QList& ids ) int cprecision = -1; if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) ) cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 ); - foreach ( long id, ids ) { + Q_FOREACH ( long id, ids ) { if ( !isElements() ) { // // show node info @@ -2163,9 +2163,9 @@ void SMESHGUI_TreeElemInfo::contextMenuEvent( QContextMenuEvent* e ) QMenu menu; QAction* a = menu.addAction( tr( "SHOW_ITEM_INFO" ) ); if ( type == ElemConnectivity && id > 0 && menu.exec( e->globalPos() ) == a ) - emit( itemInfo( id ) ); + Q_EMIT( itemInfo( id ) ); else if ( type == NodeConnectivity && menu.exec( e->globalPos() ) == a ) - emit( itemInfo( aTreeItem->text( 1 ) ) ); + Q_EMIT( itemInfo( aTreeItem->text( 1 ) ) ); } void SMESHGUI_TreeElemInfo::itemDoubleClicked( QTreeWidgetItem* theItem, int theColumn ) @@ -2174,9 +2174,9 @@ void SMESHGUI_TreeElemInfo::itemDoubleClicked( QTreeWidgetItem* theItem, int th int type = theItem->data( 1, TypeRole ).toInt(); int id = theItem->data( 1, IdRole ).toInt(); if ( type == ElemConnectivity && id > 0 ) - emit( itemInfo( id ) ); + Q_EMIT( itemInfo( id ) ); else if ( type == NodeConnectivity ) - emit( itemInfo( theItem->text( 1 ) ) ); + Q_EMIT( itemInfo( theItem->text( 1 ) ) ); } } @@ -2816,7 +2816,7 @@ void SMESHGUI_MeshInfoDlg::showInfo( const Handle(SALOME_InteractiveObject)& IO myID->setText( ID.trimmed() ); QSet ids; QStringList idTxt = ID.split( " ", QString::SkipEmptyParts ); - foreach ( ID, idTxt ) + Q_FOREACH ( ID, idTxt ) ids << ID.trimmed().toLong(); myElemInfo->showInfo( ids, myMode->checkedId() == ElemMode ); } @@ -2973,7 +2973,7 @@ void SMESHGUI_MeshInfoDlg::idChanged() TColStd_MapOfInteger ID; QSet ids; QStringList idTxt = myID->text().split( " ", QString::SkipEmptyParts ); - foreach ( QString tid, idTxt ) { + Q_FOREACH ( QString tid, idTxt ) { long id = tid.trimmed().toLong(); const SMDS_MeshElement* e = myMode->checkedId() == ElemMode ? myActor->GetObject()->GetMesh()->FindElement( id ) : diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.h b/src/SMESHGUI/SMESHGUI_MeshInfo.h index 54ee1aca5..1e8471106 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.h +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.h @@ -131,7 +131,7 @@ private: void setFontAttributes( QWidget*, int, bool = true ); void setFieldsVisible( int, int, bool ); -private slots: +private Q_SLOTS: void loadMesh(); private: @@ -177,11 +177,11 @@ protected: QString formatConnectivity( Connectivity, int ); XYZ gravityCenter( const SMDS_MeshElement* ); -signals: +Q_SIGNALS: void itemInfo( int ); void itemInfo( const QString& ); -private slots: +private Q_SLOTS: void showPrevious(); void showNext(); void updateControls(); @@ -229,7 +229,7 @@ protected: void nodeInfo( const SMDS_MeshNode*, int, int, QTreeWidgetItem* ); void clearInternal(); -private slots: +private Q_SLOTS: void itemDoubleClicked( QTreeWidgetItem*, int ); private: @@ -247,7 +247,7 @@ public: GrpComputor( SMESH::SMESH_GroupBase_ptr, QTreeWidgetItem*, QObject* ); QTreeWidgetItem* getItem() { return myItem; } -public slots: +public Q_SLOTS: void compute(); private: @@ -269,7 +269,7 @@ public: // void clear(); void saveInfo( QTextStream &out ); -private slots: +private Q_SLOTS: void changeLoadToCompute(); void showPreviousGroups(); void showNextGroups(); @@ -311,7 +311,7 @@ private: Plot2d_Histogram* getHistogram( SMESH::NumericalFunctor_ptr functor ); void computeNb( int ft, int iBut, int iWdg ); -private slots: +private Q_SLOTS: void computeAspectRatio(); void computeAspectRatio3D(); void computeFreeNodesInfo(); @@ -364,7 +364,7 @@ protected: void keyPressEvent( QKeyEvent* ); void enterEvent( QEvent* ); -private slots: +private Q_SLOTS: void help(); void updateSelection(); void updateInfo(); @@ -398,7 +398,7 @@ public: void showInfo( const Handle(SALOME_InteractiveObject)& ); void reject(); -private slots: +private Q_SLOTS: void updateInfo(); void activate(); void deactivate(); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.h b/src/SMESHGUI/SMESHGUI_MeshOp.h index 99a699ba4..bf8209b1e 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOp.h @@ -73,7 +73,7 @@ protected: virtual SUIT_SelectionFilter* createFilter( const int ) const; virtual bool isValid( SUIT_Operation* ) const; -protected slots: +protected Q_SLOTS: virtual bool onApply(); void onCreateHyp( const int, const int ); void onEditHyp( const int, const int ); diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h index 629d3d352..0703c7ada 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h @@ -69,7 +69,7 @@ class SMESHGUI_EXPORT SMESHGUI_MeshOrderBox : public QGroupBox //! Returns result (ordered by user) mesh indeces ListListName GetMeshNames() const; - private slots: + private Q_SLOTS: /*! Private slots */ //! update state of arrow buttons according to selection void onSelectionChanged(); diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderOp.h b/src/SMESHGUI/SMESHGUI_MeshOrderOp.h index 6b4940ed1..00cc452fb 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOrderOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOrderOp.h @@ -81,7 +81,7 @@ protected: //! sets the dialog widgets to state just after operation start virtual void initDialog(); - protected slots: + protected Q_SLOTS: virtual bool onApply(); virtual void onCancel(); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h index 43317618f..f3c7e7f7b 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h @@ -75,10 +75,10 @@ public: void Init(); -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void onOk(); bool onApply(); void onHelp(); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index b2fdc8bdd..c6c71147a 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -386,7 +386,7 @@ void SMESHGUI_MultiEditDlg::Init() myIds.Clear(); myBusy = false; myActor = 0; - emit ListContensChanged(); + Q_EMIT ListContensChanged(); // main buttons connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk())); @@ -550,7 +550,7 @@ void SMESHGUI_MultiEditDlg::onSelectionDone() for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) { QList items = myListBox->findItems(*it, Qt::MatchExactly); QListWidgetItem* anItem; - foreach(anItem, items) + Q_FOREACH(anItem, items) anItem->setSelected(true); } } @@ -627,7 +627,7 @@ void SMESHGUI_MultiEditDlg::onFilterAccepted() for (int i = 0, n = myListBox->count(); i < n; i++) myIds.Add(myListBox->item(i)->text().toInt()); - emit ListContensChanged(); + Q_EMIT ListContensChanged(); if (mySubmeshChk->isChecked() || myGroupChk->isChecked()) { mySubmeshChk->blockSignals(true); @@ -718,7 +718,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn() myListBox->selectAll(); myBusy = false; - emit ListContensChanged(); + Q_EMIT ListContensChanged(); if (isGroupOrSubmesh) onListSelectionChanged(); @@ -780,7 +780,7 @@ void SMESHGUI_MultiEditDlg::onRemoveBtn() QList selItems = myListBox->selectedItems(); QListWidgetItem* item; - foreach(item, selItems) + Q_FOREACH(item, selItems) { myIds.Remove(item->text().toInt()); delete item; @@ -788,7 +788,7 @@ void SMESHGUI_MultiEditDlg::onRemoveBtn() myBusy = false; - emit ListContensChanged(); + Q_EMIT ListContensChanged(); updateButtons(); } @@ -913,7 +913,7 @@ void SMESHGUI_MultiEditDlg::onToAllChk() myIds.Clear(); - emit ListContensChanged(); + Q_EMIT ListContensChanged(); updateButtons(); setSelectionMode(); @@ -992,7 +992,7 @@ bool SMESHGUI_MultiEditDlg::onApply() myListBox->clear(); myIds.Clear(); - emit ListContensChanged(); + Q_EMIT ListContensChanged(); updateButtons(); } @@ -1014,7 +1014,7 @@ void SMESHGUI_MultiEditDlg::on3d2dChanged (int type) myListBox->clear(); myIds.Clear(); - emit ListContensChanged(); + Q_EMIT ListContensChanged(); if (type) myFilterType = SMESH::VolumeFilter; diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h index a8a0d0a62..d0aba94df 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h @@ -80,10 +80,10 @@ public: bool eventFilter( QObject*, QEvent* ); -signals: +Q_SIGNALS: void ListContensChanged(); -protected slots: +protected Q_SLOTS: void onOk(); virtual bool onApply(); virtual void reject(); @@ -204,7 +204,7 @@ protected: SMESH::SMESH_IDSource_ptr obj ); virtual int nbElemsInMesh(); -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); private: @@ -229,7 +229,7 @@ protected: SMESH::SMESH_IDSource_ptr obj); virtual int nbElemsInMesh(); -protected slots: +protected Q_SLOTS: virtual void reject(); void onCriterionRB(); void onPreviewChk(); @@ -255,7 +255,7 @@ public: SMESHGUI_SplitVolumesDlg( SMESHGUI* ); virtual ~SMESHGUI_SplitVolumesDlg(); -protected slots: +protected Q_SLOTS: virtual void on3d2dChanged(int); virtual void onSelectionDone(); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.h b/src/SMESHGUI/SMESHGUI_NodesDlg.h index b5b2faa9d..dc6cba0aa 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.h @@ -106,10 +106,10 @@ private: QString myHelpFileName; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_Operation.h b/src/SMESHGUI/SMESHGUI_Operation.h index 4e5097c93..2721b8d3d 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.h +++ b/src/SMESHGUI/SMESHGUI_Operation.h @@ -74,7 +74,7 @@ protected: QString myHelpFileName; bool myIsApplyAndClose; -protected slots: +protected Q_SLOTS: virtual void onOk(); virtual bool onApply(); virtual void onCancel(); diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h index d286d2c41..9de121b34 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h @@ -70,10 +70,10 @@ public: const double ); void initScalarBarFromResources(); -protected slots: +protected Q_SLOTS: virtual void reject(); -protected slots: +protected Q_SLOTS: void onOk(); bool onApply(); void onHelp(); diff --git a/src/SMESHGUI/SMESHGUI_PreviewDlg.h b/src/SMESHGUI/SMESHGUI_PreviewDlg.h index 1b63f9224..31a21c95a 100644 --- a/src/SMESHGUI/SMESHGUI_PreviewDlg.h +++ b/src/SMESHGUI/SMESHGUI_PreviewDlg.h @@ -56,7 +56,7 @@ protected: virtual void setIsApplyAndClose( const bool theFlag ); virtual bool isApplyAndClose() const; -protected slots: +protected Q_SLOTS: void toDisplaySimulation(); virtual void onDisplaySimulation( bool ); @@ -85,7 +85,7 @@ protected: virtual void setIsApplyAndClose( const bool theFlag ); virtual bool isApplyAndClose() const; -protected slots: +protected Q_SLOTS: void toDisplaySimulation(); virtual void onDisplaySimulation( bool ); diff --git a/src/SMESHGUI/SMESHGUI_PropertiesDlg.h b/src/SMESHGUI/SMESHGUI_PropertiesDlg.h index 5ec3ce620..25ecf4ca1 100644 --- a/src/SMESHGUI/SMESHGUI_PropertiesDlg.h +++ b/src/SMESHGUI/SMESHGUI_PropertiesDlg.h @@ -101,7 +101,7 @@ public: void showControls( int, bool ); -private slots: +private Q_SLOTS: void onHelp(); private: diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h index b48726223..5fdf097f0 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h @@ -94,10 +94,10 @@ private: SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); void ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h index 0ffc235ac..320a07fe4 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h @@ -94,10 +94,10 @@ private: SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); void ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h index 26ae2b311..ffd993b85 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h @@ -87,10 +87,10 @@ private: QString myHelpFileName; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); void ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h index e0908171b..fc2d2ff13 100644 --- a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h +++ b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h @@ -61,10 +61,10 @@ protected: bool isValid( QString& ); -protected slots: +protected Q_SLOTS: virtual bool onApply(); -private slots: +private Q_SLOTS: virtual void onActivateObject( int ); void redisplayPreview(); void onTextChange( const QString& ); @@ -91,7 +91,7 @@ class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog public: SMESHGUI_ReorientFacesDlg(); -public slots: +public Q_SLOTS: void constructorChange(int id); private: @@ -116,7 +116,7 @@ private: friend class SMESHGUI_ReorientFacesOp; - //private slots: + //private Q_SLOTS: //void ButtonToggled( bool ); }; diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h index 811f65132..02d67a1e3 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h @@ -158,11 +158,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.h b/src/SMESHGUI/SMESHGUI_RotationDlg.h index 3f2c1b9ce..02b3380a4 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.h +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.h @@ -132,11 +132,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.h b/src/SMESHGUI/SMESHGUI_ScaleDlg.h index 378b17af0..dee8b0c9f 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.h +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.h @@ -128,11 +128,11 @@ private: SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.h b/src/SMESHGUI/SMESHGUI_SelectionOp.h index c8080f9ae..45a5d8bb5 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.h +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.h @@ -135,7 +135,7 @@ protected: //! Return actor according to selected mesh if selection mode isn't ActorSelection SMESH_Actor* actor() const; -protected slots: +protected Q_SLOTS: //! Installs filter corresponding to certain object selection widget virtual void onActivateObject( int ); diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.h b/src/SMESHGUI/SMESHGUI_SewingDlg.h index 7ba8a45c4..c4d1812fa 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.h @@ -116,10 +116,10 @@ private: QString myHelpFileName; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h index 4b6abe4f4..8ce3a4e30 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h @@ -94,10 +94,10 @@ protected: void activateSelection(); void setElementID( const QString& ); -protected slots: +protected Q_SLOTS: virtual bool onApply(); -private slots: +private Q_SLOTS: void onSelectionDone(); void onTypeChanged( int ); void onElemIdChanged( const QString& ); diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h index 9e5261746..0640a1f05 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h @@ -59,7 +59,7 @@ public: void Init(); -protected slots: +protected Q_SLOTS: void onOk(); virtual bool onApply(); virtual void reject(); diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h index 792134d38..f398e5124 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h @@ -122,10 +122,10 @@ private: QPushButton* myElemFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void reject(); -private slots: +private Q_SLOTS: void ClickOnOk(); bool ClickOnApply(); void ClickOnHelp(); diff --git a/src/SMESHGUI/SMESHGUI_SpinBox.h b/src/SMESHGUI/SMESHGUI_SpinBox.h index dab3f34ba..53c0a5463 100644 --- a/src/SMESHGUI/SMESHGUI_SpinBox.h +++ b/src/SMESHGUI/SMESHGUI_SpinBox.h @@ -61,7 +61,7 @@ public: QString GetString() const; QLineEdit* editor() const; -public slots: +public Q_SLOTS: void SetStep( double ); }; diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h index efb69b831..a6f3ad6cc 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h @@ -136,11 +136,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.h b/src/SMESHGUI/SMESHGUI_TranslationDlg.h index 4ee72ab04..480a4efac 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.h +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.h @@ -130,11 +130,11 @@ private: QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; -protected slots: +protected Q_SLOTS: virtual void onDisplaySimulation( bool ); virtual void reject(); -private slots: +private Q_SLOTS: void ConstructorsClicked( int ); void ClickOnOk(); bool ClickOnApply(); diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h index 91f13fc41..1d825fbad 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h @@ -69,7 +69,7 @@ private: QString myHelpFileName; -public slots: +public Q_SLOTS: void ClickOnOk(); void ClickOnHelp(); void ValueHasChanged(); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 6b67d5e9c..94d80e7ac 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -1002,9 +1002,9 @@ namespace SMESH // ViewManagerList vmList; app->viewManagers( SVTK_Viewer::Type(), vmList ); - foreach ( SUIT_ViewManager* vm, vmList ) { + Q_FOREACH ( SUIT_ViewManager* vm, vmList ) { QVector views = vm->getViews(); - foreach ( SUIT_ViewWindow* vw, views ) { + Q_FOREACH ( SUIT_ViewWindow* vw, views ) { // update VTK viewer properties if ( SVTK_ViewWindow* aVtkView = GetVtkViewWindow( vw ) ) { // update actors diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx index 633f986f9..4defcfb3b 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx @@ -657,7 +657,7 @@ void SMESH_Swig::EraseActor( const char* Mesh_Entry, const bool allViewers ) else { aManagers = anApp->viewManagers(); } - foreach( SUIT_ViewManager* aMgr, aManagers ) { + Q_FOREACH( SUIT_ViewManager* aMgr, aManagers ) { if ( aMgr && aMgr->getType() == VTKViewer_Viewer::Type() ) { SALOME_View* aSalomeView = dynamic_cast(aMgr->getViewModel()); if (aSalomeView) { diff --git a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx index 4cdd2b92e..75a2fbdf4 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx @@ -289,7 +289,7 @@ namespace StdMeshersGUI { QList selItems = mySpacingTreeWdg->selectedItems(); QTreeWidgetItem * item; - foreach ( item, selItems ) + Q_FOREACH ( item, selItems ) { int i = mySpacingTreeWdg->indexOfTopLevelItem( item ); if ( i == 0 ) continue; diff --git a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.h b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.h index 48477ea0d..46873ef66 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.h +++ b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.h @@ -81,10 +81,10 @@ namespace StdMeshersGUI SMESH::double_array* getCoordinates(); void getSpacing(SMESH::string_array_out funs, SMESH::double_array_out points) const; - signals: + Q_SIGNALS: void gridModeChanged(int); - private slots: + private Q_SLOTS: void onInsert(); void onDelete(); void onMode(int); @@ -139,7 +139,7 @@ protected: virtual void retrieveParams() const; virtual QString storeParams() const; -private slots: +private Q_SLOTS: bool updateAxesPreview(); void onOrthogonalAxes(bool); void onAxisDirChange(const QString&); diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx index 582b92b25..07a6a086a 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx @@ -59,7 +59,7 @@ static void sortData( QList& d ) d.append( prevX ); d.append( pairs.count() > 0 ? pairs[0].second : prevY ); - foreach( p, pairs ) { + Q_FOREACH( p, pairs ) { if ( p.first > prevX ) { d.append( p.first ); d.append( p.second ); @@ -495,7 +495,7 @@ selectedRows() QList l; QList selItems = selectedItems(); QTableWidgetItem* i; - foreach( i, selItems ) + Q_FOREACH( i, selItems ) if ( !l.contains( i->row() ) ) l.append( i->row() ); qSort( l ); return l; diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrTable.h b/src/StdMeshersGUI/StdMeshersGUI_DistrTable.h index 7cdbc84e8..f24992418 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrTable.h +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrTable.h @@ -68,11 +68,11 @@ public: private: QPushButton* button( const TableButton ) const; -private slots: +private Q_SLOTS: void onInsert(); void onRemove(); -signals: +Q_SIGNALS: void valueChanged( int, int ); void currentChanged( int, int ); diff --git a/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx index 4d36d494c..6e0ca1c1c 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx @@ -285,7 +285,7 @@ void StdMeshersGUI_FixedPointsParamWdg::removePoints() { QList selItems = myListWidget->selectedItems(); QListWidgetItem* item; - foreach ( item, selItems ) { + Q_FOREACH ( item, selItems ) { int idx = myListWidget->row( item ); delete myTreeWidget->topLevelItem( idx ); delete item; diff --git a/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.h b/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.h index bcd19407e..132597ff2 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.h @@ -61,7 +61,7 @@ public: QString GetValue() const { return myParamValue; } -private slots: +private Q_SLOTS: void onAdd(); void onRemove(); void onCheckBoxChanged(); diff --git a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.h b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.h index 2a86090de..e876e6ddb 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.h @@ -63,7 +63,7 @@ public: bool IsOk() const { return !myHyp->_is_nil(); } -private slots: +private Q_SLOTS: void onCreate(); void onEdit(); void onHypTypePopup( QAction* ); diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.h b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.h index 7c9cb4dc4..3eafce2a5 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.h +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.h @@ -72,7 +72,7 @@ protected: virtual void retrieveParams() const; virtual QString storeParams() const; -protected slots: +protected Q_SLOTS: virtual void onValueChanged(); private: diff --git a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx index 9e5768402..a734bfee6 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx @@ -152,7 +152,7 @@ void StdMeshersGUI_ObjectReferenceParamWdg::activateSelection() mySelectionMgr->installFilter( myFilter ); connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone())); } - emit selectionActivated(); + Q_EMIT selectionActivated(); onSelectionDone(); mySelButton->setChecked( mySelectionActivated ); @@ -211,7 +211,7 @@ void StdMeshersGUI_ObjectReferenceParamWdg::SetObject(CORBA::Object_ptr obj) myObjects.push_back( CORBA::Object::_duplicate( obj )); myParamValue = sobj->GetID().c_str(); } - emit contentModified(); + Q_EMIT contentModified(); } //================================================================================ @@ -251,7 +251,7 @@ void StdMeshersGUI_ObjectReferenceParamWdg::SetObjects(SMESH::string_array_var& } } if (selChanged) - emit contentModified(); + Q_EMIT contentModified(); } //================================================================================ diff --git a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h index 02f4f36e0..3c5649c81 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h @@ -93,7 +93,7 @@ public: void SetDefaultText(QString defaultText="", QString styleSheet=""); -public slots: +public Q_SLOTS: /*! * \brief Activates selection (if not yet done), emits selectionActivated() * @@ -103,7 +103,7 @@ public slots: void activateSelection(); void deactivateSelection(); -signals: +Q_SIGNALS: /*! * \brief Emitted when selection is activated * @@ -113,7 +113,7 @@ signals: void selectionActivated(); void contentModified(); -private slots: +private Q_SLOTS: void onSelectionDone(); private: diff --git a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.h b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.h index 3e87369b0..7cdc6b4b7 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.h @@ -63,7 +63,7 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamCreator : public StdMesh virtual void retrieveParams() const; virtual QString storeParams() const; - private slots: + private Q_SLOTS: void onTypeChanged(int type); void onAddShape(); @@ -104,7 +104,7 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamWdg : public QWidget SMESH::nodes_array* GetPoints(); void Set( GEOM::ListOfGO_var shapes, SMESH::nodes_array_var points ); - signals: + Q_SIGNALS: void typeChanged(int); diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 9cd4ff727..e6fc2f241 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -144,7 +144,7 @@ StdMeshersGUI_SubShapeSelectorWdg::~StdMeshersGUI_SubShapeSelectorWdg() delete myFilter; myFilter=0; SUIT_SelectionFilter* filter; - foreach( filter, myGeomFilters ) + Q_FOREACH( filter, myGeomFilters ) delete filter; } @@ -312,7 +312,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument() QString anID = QString(" %1").arg( mySelectedIDs.at(i) ); QList anItems = myListWidget->findItems ( anID, Qt::MatchExactly ); QListWidgetItem* item; - foreach(item, anItems) + Q_FOREACH(item, anItems) item->setSelected(true); } } @@ -356,7 +356,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::onRemove() myListWidget->blockSignals( true ); QList selItems = myListWidget->selectedItems(); QListWidgetItem* item; - foreach(item, selItems) { + Q_FOREACH(item, selItems) { QString idStr = item->text(); int id = idStr.toInt(); @@ -406,7 +406,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged() TColStd_MapOfInteger aIndexes; QList selItems = myListWidget->selectedItems(); QListWidgetItem* anItem; - foreach(anItem, selItems) + Q_FOREACH(anItem, selItems) myPreviewActor->HighlightID( anItem->text().toInt() ); // update remove button diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h index 7793817be..5cf166149 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h @@ -89,7 +89,7 @@ private: void setFilter(); void updateButtons(); -private slots: +private Q_SLOTS: void onAdd(); void onRemove(); void onPrevious();