aType = aHistogram->getPointList().empty() ? RemoveFrom2dViewer : aType;
SUIT_ViewManager* aViewManager;
- foreach( aViewManager, aViewManagerList ) {
+ Q_FOREACH( aViewManager, aViewManagerList ) {
if (Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(aViewManager)) {
if (SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aManager->getViewModel())) {
if (Plot2d_ViewFrame* aViewFrame = aViewer->getActiveViewFrame()) {
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;
if ( myOwnership )
{
SUIT_SelectionFilter* filter;
- foreach( filter, myFilters )
+ Q_FOREACH( filter, myFilters )
delete filter;
}
}
//=============================================================================
void SMESHGUI::EmitSignalDeactivateDialog()
{
- emit SignalDeactivateActiveDialog();
+ Q_EMIT SignalDeactivateActiveDialog();
}
//=============================================================================
//=============================================================================
void SMESHGUI::EmitSignalStudyFrameChanged()
{
- emit SignalStudyFrameChanged();
+ Q_EMIT SignalStudyFrameChanged();
}
//=============================================================================
//=============================================================================
void SMESHGUI::EmitSignalCloseAllDialogs()
{
- emit SignalCloseAllDialogs();
+ Q_EMIT SignalCloseAllDialogs();
}
//=============================================================================
//=============================================================================
void SMESHGUI::EmitSignalVisibilityChanged()
{
- emit SignalVisibilityChanged();
+ Q_EMIT SignalVisibilityChanged();
}
//=============================================================================
if ( aDesk ) {
QList<SUIT_ViewWindow*> wndList = aDesk->windows();
SUIT_ViewWindow* wnd;
- foreach ( wnd, wndList )
+ Q_FOREACH ( wnd, wndList )
connectView( wnd );
}
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* );
void onOperationAborted( SUIT_Operation* );
void onHypothesisEdit( int result );
-signals:
+Q_SIGNALS:
void SignalDeactivateActiveDialog();
void SignalStudyFrameChanged();
void SignalCloseAllDialogs();
myFilterBtn->setEnabled( selType != SEL_OBJECT );
- emit selTypeChanged( selType );
+ Q_EMIT selTypeChanged( selType );
}
//================================================================================
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 );
virtual void selectionDone();
virtual SUIT_SelectionFilter* createFilter( const int ) const;
- protected slots:
+ protected Q_SLOTS:
virtual bool onApply();
void onSelTypeChange(int);
void onSetFilter();
QString myHelpFileName;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
void onDiameterChanged();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
void ClickOnApply();
void ClickOnHelp();
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 );
bool myIsApplyAndClose;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
bool ClickOnApply();
void ClickOnHelp();
SMESH::Mode CurrentMode;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-public slots:
+public Q_SLOTS:
void onModeAbsolute();
void onModeRelative();
void ClickOnNew();
rows.clear();
QList<QTableWidgetSelectionRange> 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 ))
QList<int> 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 );
QList<int> 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 ) {
QList<int> 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() );
bool showOnly = true;
int row;
- foreach ( row, rows )
+ Q_FOREACH ( row, rows )
{
int curSub = table()->item( row, COL_SHAPEID )->text().toInt();
if ( curSub > 0 ) {
virtual bool isValid( SUIT_Operation* theOp ) const;
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
void onPreviewShape();
void onPublishShape();
protected:
virtual void startOperation();
-protected slots:
+protected Q_SLOTS:
};
class SMESHGUI_MeshOrderMgr;
virtual void initDialog();
-protected slots:
+protected Q_SLOTS:
virtual void onCancel();
-private slots:
+private Q_SLOTS:
void onPreview();
void onCompute();
protected:
virtual void startOperation();
-protected slots:
+protected Q_SLOTS:
};
/*!
SMESHGUI_MeshOrderBox* getMeshOrderBox() const;
-signals:
+Q_SIGNALS:
void preview();
private:
void timerEvent(QTimerEvent *timer);
void closeEvent(QCloseEvent *event);
-private slots:
+private Q_SLOTS:
void onCancel();
private:
myMedNdsOnGeom->setEnabled( theCheck );
- emit onClicked( myBG->checkedId() );
+ Q_EMIT onClicked( myBG->checkedId() );
}
bool isWarningShown();
bool IsBiQuadratic() const;
-signals:
+Q_SIGNALS:
void onClicked( int );
private:
MeshDestinationType DestinationMesh( const SMESH::SMESH_IDSource_var& ,
bool* isMixOrder = 0) const;
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
void ConnectRadioButtons( int );
void onWarningWinFinished();
bool myIsApplyAndClose;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
bool ClickOnApply();
void ClickOnHelp();
disconnect( mySMESHGUI, 0, this, 0 );
mySMESHGUI->ResetState();
accept();
- emit NewPattern();
+ Q_EMIT NewPattern();
}
}
catch ( const SALOME::SALOME_Exception& S_ex ) {
disconnect( mySMESHGUI, 0, this, 0 );
mySMESHGUI->ResetState();
accept();
- emit NewPattern();
+ Q_EMIT NewPattern();
}
}
catch ( const SALOME::SALOME_Exception& S_ex ) {
disconnect( mySMESHGUI, 0, this, 0 );
mySMESHGUI->ResetState();
QDialog::reject();
- emit Close();
+ Q_EMIT Close();
}
//=================================================================================
SMESH::SMESH_Pattern_ptr GetPattern();
void SetMesh( SMESH::SMESH_Mesh_ptr );
-signals:
+Q_SIGNALS:
void NewPattern();
void Close();
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
-private slots:
+private Q_SLOTS:
void onOk();
void onSave();
void reject();
if ( selItems.count() > 0 ) myNbOkElements = 1;
- foreach( anItem, selItems )
+ Q_FOREACH( anItem, selItems )
delete anItem;
RemoveButton->setEnabled( myFacesByNodes->count() > 0 );
QList<QListWidgetItem*> 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());
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();
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();
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void onConstructorsClicked( int );
void onOk();
{
QList<QListWidgetItem*> aList = AnglesList->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, aList) {
+ Q_FOREACH(anItem, aList) {
myAnglesList.removeAt(AnglesList->row(anItem));
delete anItem;
}
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();
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();
bool GetSelectedFeilds();
- private slots:
+ private Q_SLOTS:
void onItemCheck(QTreeWidgetItem * item, int column);
QTableWidgetItem* anItem;
QList<int> rows;
- foreach( anItem, selItems ) {
+ Q_FOREACH( anItem, selItems ) {
int r = row( anItem );
if ( !rows.contains( r ) ) rows.append( r );
}
return;
myIsValid = true;
- emit NeedValidation();
+ Q_EMIT NeedValidation();
if (!myIsValid)
{
myEntityTypeGrp->button(myEntityType)->setChecked(true);
myTables[ myEntityType ]->updateGeometry();
adjustSize();
- emit EntityTypeChanged(theType);
+ Q_EMIT EntityTypeChanged(theType);
}
//=======================================================================
myAddWidgets[ anItem ]->SetDouble(AdditionalWidget::Tolerance, theCriterion.Tolerance);
}
- emit CriterionChanged(theRow, aType);
+ Q_EMIT CriterionChanged(theRow, aType);
}
//=======================================================================
QList<int> aRows = aTable->selectedRows(); // already sorted
int i;
- foreach( i, aRows )
+ Q_FOREACH( i, aRows )
{
removeAdditionalWidget(aTable, i);
aTable->removeRow(i);
{
if( !myIsLocked )
updateAdditionalWidget();
- emit CurrentChanged(theRow, theCol);
+ Q_EMIT CurrentChanged(theRow, theCol);
}
//=======================================================================
updateAdditionalWidget();
- emit CriterionChanged(row, entityType);
+ Q_EMIT CriterionChanged(row, entityType);
}
//=======================================================================
if( col == 0 )
onCriterionChanged(row, col, -1);
else if ( col == 2 )
- emit ThresholdChanged(row, GetType());
+ Q_EMIT ThresholdChanged(row, GetType());
}
//=======================================================================
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
accept();
- emit Accepted();
+ Q_EMIT Accepted();
}
}
return;
QStringList aStrList;
- foreach(int id, theIds)
+ Q_FOREACH(int id, theIds)
aStrList << QString::number(id);
if (theWg->inherits("QListWidget"))
void Update();
-signals:
+Q_SIGNALS:
void CopyFromClicked();
void AddToClicked();
void EntityTypeChanged( const int );
void ThresholdChanged( const int, const int );
void CurrentChanged( int, int );
-private slots:
+private Q_SLOTS:
void onAddBtn();
void onInsertBtn();
void onRemoveBtn();
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();
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();
void SMESHGUI_FindElemByPointDlg::reject()
{
- emit rejectedDlg();
+ Q_EMIT rejectedDlg();
QtxDialog::reject();
}
virtual void activateSelection();
-protected slots:
+protected Q_SLOTS:
virtual void onFind();
virtual bool onApply();
-private slots:
+private Q_SLOTS:
void onRejectedDlg();
void onSelectionDone();
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 );
};
TColStd_MapOfInteger aIndexes;
QList<QListWidgetItem*> 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());
QStringList anElements = aListStr.split( " ", QString::SkipEmptyParts);
for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) {
QList<QListWidgetItem*> 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();
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();
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();
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();
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();
if (myCurrentLineEdit == 0) {
QList<QListWidgetItem*> selItems = myElements->selectedItems();
QListWidgetItem* item;
- foreach(item, selItems) delete item;
+ Q_FOREACH(item, selItems) delete item;
} else {
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
QList<QListWidgetItem*> 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) {
QList<QListWidgetItem*> 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) {
QList<QListWidgetItem*> found =
myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
QListWidgetItem* anItem;
- foreach(anItem, found) delete anItem;
+ Q_FOREACH(anItem, found) delete anItem;
}
}
}
}
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;
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 );
virtual LightApp_Dialog* dlg() const;
static QString GetDefaultName(const QString& theOperation);
-public slots:
+public Q_SLOTS:
protected:
virtual SUIT_SelectionFilter* createFilter( const int ) const;
//virtual bool isValid( SUIT_Operation* ) const;
-private slots:
+private Q_SLOTS:
bool onApply();
void onButtonClick();
SMESHGUI_GroupOnShapeDlg();
virtual ~SMESHGUI_GroupOnShapeDlg();
-public slots:
+public Q_SLOTS:
void updateButtons();
void init();
void Init();
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
virtual void onSelectionDone();
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void onOk();
void onHelp();
SMESHGUI_UnionGroupsDlg( SMESHGUI* );
virtual ~SMESHGUI_UnionGroupsDlg();
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
virtual void onSelectionDone();
SMESHGUI_IntersectGroupsDlg( SMESHGUI* );
virtual ~SMESHGUI_IntersectGroupsDlg();
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
virtual void onSelectionDone();
SMESHGUI_CutGroupsDlg( SMESHGUI* );
virtual ~SMESHGUI_CutGroupsDlg();
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
virtual void onSelectionDone();
protected:
virtual void reset();
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
virtual void onSelectionDone();
Dlg->resize( Dlg->minimumSizeHint() );
}
else {
- emit finished( QDialog::Accepted );
+ Q_EMIT finished( QDialog::Accepted );
delete myDlg;
}
}
myDlg->close();
//delete myDlg; since WA_DeleteOnClose==true
myDlg = 0;
- emit finished( result );
+ Q_EMIT finished( result );
}
bool SMESHGUI_GenericHypothesisCreator::stdParams( ListOfStdParams& ) const
QString getMainShapeEntry() const { return myMainShapeEntry; }
void setMainShapeEntry( const QString& theEntry ) { myMainShapeEntry = theEntry; }
-signals:
+Q_SIGNALS:
void finished( int );
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:
void setCustomFrame( QFrame* );
void setType( const QString& );
-protected slots:
+protected Q_SLOTS:
virtual void accept();
virtual void reject();
void onHelp();
bool copySource() const;
-private slots:
+private Q_SLOTS:
void onTargetChanged();
void onGroupChecked();
virtual SUIT_SelectionFilter* createFilter( const int ) const;
bool isValid( QString& ) const;
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
void onModeChanged();
bool isValid( QString& );
-protected slots:
+protected Q_SLOTS:
virtual bool onApply();
-private slots:
+private Q_SLOTS:
void onSelectionDone();
void redisplayPreview();
void onTextChange( const QString& );
friend class SMESHGUI_MakeNodeAtPointOp;
-private slots:
+private Q_SLOTS:
void ButtonToggled( bool );
void ConstructorsClicked( int );
};
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 );
}
void displayPreview();
void createPreview( double, double, double, double, double, double );
-private slots:
+private Q_SLOTS:
void selectionChanged();
void firstChanged();
void secondChanged();
void displayPreview();
void createPreview( double, double, double, double, double, double );
-private slots:
+private Q_SLOTS:
void selectionChanged();
void sourceChanged();
void sourceEdited();
void updateSelection();
void deactivate();
-private slots:
+private Q_SLOTS:
void selectionChanged();
void modeChanged( int);
void compute();
void keyPressEvent( QKeyEvent* );
void enterEvent( QEvent* );
-private slots:
+private Q_SLOTS:
void help();
void updateSelection();
void activate();
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());
QList<QListWidgetItem*> selItems = ListEdit->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, selItems)
+ Q_FOREACH(anItem, selItems)
anIndices.Add(anItem->text().toInt());
SetFirstButton->setEnabled(selItems.count() == 1);
QList<QListWidgetItem*> selItems = ListCoincident->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, selItems)
+ Q_FOREACH(anItem, selItems)
delete anItem;
ListEdit->clear();
}
else {
QListWidgetItem* anItem;
- foreach(anItem, found) anItem->setSelected(true);
+ Q_FOREACH(anItem, found) anItem->setSelected(true);
}
}
QList<QListWidgetItem*> selItems = ListEdit->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, selItems)
+ Q_FOREACH(anItem, selItems)
delete anItem;
myIsBusy = false;
QList<QListWidgetItem*> selItems = ListEdit->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, selItems) {
+ Q_FOREACH(anItem, selItems) {
ListEdit->takeItem(ListEdit->row(anItem));
ListEdit->insertItem(0, anItem);
}
QString myEntry;
GrpList myGroups;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
- private slots:
+ private Q_SLOTS:
void ClickOnOk();
bool ClickOnApply();
void ClickOnHelp();
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 ) );
}
//================================================================================
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
}
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 )
{
void SMESHGUI_MeshDlg::onHypoSetPopup( QAction* a )
{
- emit hypoSet( a->text() );
+ Q_EMIT hypoSet( a->text() );
}
//================================================================================
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()
//================================================================================
void SMESHGUI_MeshDlg::onChangedMeshType( const int isIndex )
{
- emit selectMeshType( Dim3D - myTabWg->currentIndex(), isIndex );
+ Q_EMIT selectMeshType( Dim3D - myTabWg->currentIndex(), isIndex );
}
//================================================================================
/*!
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 );
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 );
void selectAlgo( const int );
//!< Emited when an algorithm is selected
-private slots:
+private Q_SLOTS:
void onCreateHyp();
void onEditHyp();
void onHyp( int );
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 );
}
}
if ( connectivity.contains( type ) ) {
QList<int> elements = connectivity[ type ];
qSort( elements );
- foreach( int id, elements )
+ Q_FOREACH( int id, elements )
str << QString::number( id );
}
return str.join( " " );
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
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
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 )
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 ) ) );
}
}
myID->setText( ID.trimmed() );
QSet<long> ids;
QStringList idTxt = ID.split( " ", QString::SkipEmptyParts );
- foreach ( ID, idTxt )
+ Q_FOREACH ( ID, idTxt )
ids << ID.trimmed().toLong();
myElemInfo->showInfo( ids, myMode->checkedId() == ElemMode );
}
TColStd_MapOfInteger ID;
QSet<long> 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 ) :
void setFontAttributes( QWidget*, int, bool = true );
void setFieldsVisible( int, int, bool );
-private slots:
+private Q_SLOTS:
void loadMesh();
private:
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();
void nodeInfo( const SMDS_MeshNode*, int, int, QTreeWidgetItem* );
void clearInternal();
-private slots:
+private Q_SLOTS:
void itemDoubleClicked( QTreeWidgetItem*, int );
private:
GrpComputor( SMESH::SMESH_GroupBase_ptr, QTreeWidgetItem*, QObject* );
QTreeWidgetItem* getItem() { return myItem; }
-public slots:
+public Q_SLOTS:
void compute();
private:
// void clear();
void saveInfo( QTextStream &out );
-private slots:
+private Q_SLOTS:
void changeLoadToCompute();
void showPreviousGroups();
void showNextGroups();
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();
void keyPressEvent( QKeyEvent* );
void enterEvent( QEvent* );
-private slots:
+private Q_SLOTS:
void help();
void updateSelection();
void updateInfo();
void showInfo( const Handle(SALOME_InteractiveObject)& );
void reject();
-private slots:
+private Q_SLOTS:
void updateInfo();
void activate();
void deactivate();
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 );
//! 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();
//! sets the dialog widgets to state just after operation start
virtual void initDialog();
- protected slots:
+ protected Q_SLOTS:
virtual bool onApply();
virtual void onCancel();
void Init();
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void onOk();
bool onApply();
void onHelp();
myIds.Clear();
myBusy = false;
myActor = 0;
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
// main buttons
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) {
QList<QListWidgetItem*> items = myListBox->findItems(*it, Qt::MatchExactly);
QListWidgetItem* anItem;
- foreach(anItem, items)
+ Q_FOREACH(anItem, items)
anItem->setSelected(true);
}
}
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);
myListBox->selectAll();
myBusy = false;
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
if (isGroupOrSubmesh)
onListSelectionChanged();
QList<QListWidgetItem*> selItems = myListBox->selectedItems();
QListWidgetItem* item;
- foreach(item, selItems)
+ Q_FOREACH(item, selItems)
{
myIds.Remove(item->text().toInt());
delete item;
myBusy = false;
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
updateButtons();
}
myIds.Clear();
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
updateButtons();
setSelectionMode();
myListBox->clear();
myIds.Clear();
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
updateButtons();
}
myListBox->clear();
myIds.Clear();
- emit ListContensChanged();
+ Q_EMIT ListContensChanged();
if (type)
myFilterType = SMESH::VolumeFilter;
bool eventFilter( QObject*, QEvent* );
-signals:
+Q_SIGNALS:
void ListContensChanged();
-protected slots:
+protected Q_SLOTS:
void onOk();
virtual bool onApply();
virtual void reject();
SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh();
-protected slots:
+protected Q_SLOTS:
virtual void onDisplaySimulation( bool );
private:
SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh();
-protected slots:
+protected Q_SLOTS:
virtual void reject();
void onCriterionRB();
void onPreviewChk();
SMESHGUI_SplitVolumesDlg( SMESHGUI* );
virtual ~SMESHGUI_SplitVolumesDlg();
-protected slots:
+protected Q_SLOTS:
virtual void on3d2dChanged(int);
virtual void onSelectionDone();
QString myHelpFileName;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
bool ClickOnApply();
void ClickOnHelp();
QString myHelpFileName;
bool myIsApplyAndClose;
-protected slots:
+protected Q_SLOTS:
virtual void onOk();
virtual bool onApply();
virtual void onCancel();
const double );
void initScalarBarFromResources();
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-protected slots:
+protected Q_SLOTS:
void onOk();
bool onApply();
void onHelp();
virtual void setIsApplyAndClose( const bool theFlag );
virtual bool isApplyAndClose() const;
-protected slots:
+protected Q_SLOTS:
void toDisplaySimulation();
virtual void onDisplaySimulation( bool );
virtual void setIsApplyAndClose( const bool theFlag );
virtual bool isApplyAndClose() const;
-protected slots:
+protected Q_SLOTS:
void toDisplaySimulation();
virtual void onDisplaySimulation( bool );
void showControls( int, bool );
-private slots:
+private Q_SLOTS:
void onHelp();
private:
SMESHGUI_FilterDlg* myFilterDlg;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
void ClickOnApply();
void ClickOnHelp();
SMESHGUI_FilterDlg* myFilterDlg;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
void ClickOnApply();
void ClickOnHelp();
QString myHelpFileName;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
void ClickOnApply();
void ClickOnHelp();
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& );
public:
SMESHGUI_ReorientFacesDlg();
-public slots:
+public Q_SLOTS:
void constructorChange(int id);
private:
friend class SMESHGUI_ReorientFacesOp;
- //private slots:
+ //private Q_SLOTS:
//void ButtonToggled( bool );
};
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();
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();
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();
//! 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 );
QString myHelpFileName;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ConstructorsClicked( int );
void ClickOnOk();
bool ClickOnApply();
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& );
void Init();
-protected slots:
+protected Q_SLOTS:
void onOk();
virtual bool onApply();
virtual void reject();
QPushButton* myElemFilterBtn;
SMESHGUI_FilterDlg* myFilterDlg;
-protected slots:
+protected Q_SLOTS:
virtual void reject();
-private slots:
+private Q_SLOTS:
void ClickOnOk();
bool ClickOnApply();
void ClickOnHelp();
QString GetString() const;
QLineEdit* editor() const;
-public slots:
+public Q_SLOTS:
void SetStep( double );
};
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();
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();
QString myHelpFileName;
-public slots:
+public Q_SLOTS:
void ClickOnOk();
void ClickOnHelp();
void ValueHasChanged();
//
ViewManagerList vmList;
app->viewManagers( SVTK_Viewer::Type(), vmList );
- foreach ( SUIT_ViewManager* vm, vmList ) {
+ Q_FOREACH ( SUIT_ViewManager* vm, vmList ) {
QVector<SUIT_ViewWindow*> 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
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<SALOME_View*>(aMgr->getViewModel());
if (aSalomeView) {
{
QList<QTreeWidgetItem *> selItems = mySpacingTreeWdg->selectedItems();
QTreeWidgetItem * item;
- foreach ( item, selItems )
+ Q_FOREACH ( item, selItems )
{
int i = mySpacingTreeWdg->indexOfTopLevelItem( item );
if ( i == 0 ) continue;
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);
virtual void retrieveParams() const;
virtual QString storeParams() const;
-private slots:
+private Q_SLOTS:
bool updateAxesPreview();
void onOrthogonalAxes(bool);
void onAxisDirChange(const QString&);
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 );
QList<int> l;
QList<QTableWidgetItem*> selItems = selectedItems();
QTableWidgetItem* i;
- foreach( i, selItems )
+ Q_FOREACH( i, selItems )
if ( !l.contains( i->row() ) ) l.append( i->row() );
qSort( l );
return l;
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 );
{
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* item;
- foreach ( item, selItems ) {
+ Q_FOREACH ( item, selItems ) {
int idx = myListWidget->row( item );
delete myTreeWidget->topLevelItem( idx );
delete item;
QString GetValue() const { return myParamValue; }
-private slots:
+private Q_SLOTS:
void onAdd();
void onRemove();
void onCheckBoxChanged();
bool IsOk() const { return !myHyp->_is_nil(); }
-private slots:
+private Q_SLOTS:
void onCreate();
void onEdit();
void onHypTypePopup( QAction* );
virtual void retrieveParams() const;
virtual QString storeParams() const;
-protected slots:
+protected Q_SLOTS:
virtual void onValueChanged();
private:
mySelectionMgr->installFilter( myFilter );
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
}
- emit selectionActivated();
+ Q_EMIT selectionActivated();
onSelectionDone();
mySelButton->setChecked( mySelectionActivated );
myObjects.push_back( CORBA::Object::_duplicate( obj ));
myParamValue = sobj->GetID().c_str();
}
- emit contentModified();
+ Q_EMIT contentModified();
}
//================================================================================
}
}
if (selChanged)
- emit contentModified();
+ Q_EMIT contentModified();
}
//================================================================================
void SetDefaultText(QString defaultText="", QString styleSheet="");
-public slots:
+public Q_SLOTS:
/*!
* \brief Activates selection (if not yet done), emits selectionActivated()
*
void activateSelection();
void deactivateSelection();
-signals:
+Q_SIGNALS:
/*!
* \brief Emitted when selection is activated
*
void selectionActivated();
void contentModified();
-private slots:
+private Q_SLOTS:
void onSelectionDone();
private:
virtual void retrieveParams() const;
virtual QString storeParams() const;
- private slots:
+ private Q_SLOTS:
void onTypeChanged(int type);
void onAddShape();
SMESH::nodes_array* GetPoints();
void Set( GEOM::ListOfGO_var shapes, SMESH::nodes_array_var points );
- signals:
+ Q_SIGNALS:
void typeChanged(int);
delete myFilter; myFilter=0;
SUIT_SelectionFilter* filter;
- foreach( filter, myGeomFilters )
+ Q_FOREACH( filter, myGeomFilters )
delete filter;
}
QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
QList<QListWidgetItem*> anItems = myListWidget->findItems ( anID, Qt::MatchExactly );
QListWidgetItem* item;
- foreach(item, anItems)
+ Q_FOREACH(item, anItems)
item->setSelected(true);
}
}
myListWidget->blockSignals( true );
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* item;
- foreach(item, selItems) {
+ Q_FOREACH(item, selItems) {
QString idStr = item->text();
int id = idStr.toInt();
TColStd_MapOfInteger aIndexes;
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* anItem;
- foreach(anItem, selItems)
+ Q_FOREACH(anItem, selItems)
myPreviewActor->HighlightID( anItem->text().toInt() );
// update remove button
void setFilter();
void updateButtons();
-private slots:
+private Q_SLOTS:
void onAdd();
void onRemove();
void onPrevious();