ActorList = new QListWidget(GroupPlanes);
ActorList->setSelectionMode(QAbstractItemView::SingleSelection);
-
+
SelectAllCheckBox = new QCheckBox(tr("SELECT_ALL"), GroupPlanes);
GroupPlanesLayout->addWidget(ComboBoxPlanes, 0, 0);
connect(SpinBoxRot1, SIGNAL(valueChanged(double)), this, SLOT(SetCurrentPlaneParam()));
connect(SpinBoxRot2, SIGNAL(valueChanged(double)), this, SLOT(SetCurrentPlaneParam()));
connect(PreviewCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnPreviewToggle(bool)));
- connect(AutoApplyCheckBox, SIGNAL(toggled(bool)), this, SLOT(ClickOnApply()));
+ connect(AutoApplyCheckBox, SIGNAL(toggled(bool)), this, SLOT(onAutoApply(bool)));
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
/* to close dialog if study frame change */
- connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(reject()));
this->show();
}
void SMESHGUI_ClippingDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=======================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=======================================================================
-void SMESHGUI_ClippingDlg::ClickOnCancel()
+void SMESHGUI_ClippingDlg::reject()
{
- close();
+ //here we can insert actions to do at close.
+ QDialog::reject();
}
//=================================================================================
if( anItem->checkState() == Qt::Checked )
aNbChecked++;
- Qt::CheckState aCheckState = Qt::Unchecked;
- if( aNbChecked == aNbItems )
- aCheckState = Qt::Checked;
- else if( aNbChecked > 0 )
- aCheckState = Qt::PartiallyChecked;
-
bool anIsBlocked = SelectAllCheckBox->blockSignals( true );
- SelectAllCheckBox->setCheckState( aCheckState );
+ SelectAllCheckBox->setCheckState( aNbChecked == aNbItems ? Qt::Checked : Qt::Unchecked);
SelectAllCheckBox->blockSignals( anIsBlocked );
}
SMESHGUI_ClippingPlaneInfoList::const_iterator anIter2 = aClippingPlaneInfoList.begin();
for( ; anIter2 != aClippingPlaneInfoList.end(); anIter2++ ) {
const SMESH::ClippingPlaneInfo& aClippingPlaneInfo = *anIter2;
- SMESH::TPlane aTPlane( aClippingPlaneInfo.Plane );
+ SMESH::OrientedPlane* anOrientedPlane = SMESH::OrientedPlane::New(myViewWindow);
+ anOrientedPlane->ShallowCopy(aClippingPlaneInfo.Plane);
+ SMESH::TPlane aTPlane( anOrientedPlane );
SMESH::TPlaneData aPlaneData( aTPlane, aClippingPlaneInfo.ActorList );
myPlanes.push_back( aPlaneData );
}
}
printf( "----------------------------------\n" );
}
+
+void SMESHGUI_ClippingDlg::onAutoApply(bool toggled)
+{
+ if ( toggled ) ClickOnApply();
+}