-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
QString aName = GEOMBase::GetName( aSelectedObject.get() );
myEditCurrentArgument->setText( aName );
if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 0 ) {
- myAxis = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
- else if ( getConstructorId() == 1 ) {
- myCentPoint = aSelectedObject;
- if ( !myPoint1 )
- GroupPoints->PushButton4->click();
- else if ( !myPoint2 )
- GroupPoints->PushButton5->click();
- else if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
+ if ( getConstructorId() == 0 ) {
+ myAxis = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
+ else if ( getConstructorId() == 1 ) {
+ myCentPoint = aSelectedObject;
+ if ( !myPoint1 )
+ GroupPoints->PushButton4->click();
+ else if ( !myPoint2 )
+ GroupPoints->PushButton5->click();
+ else if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
- myPoint1 = aSelectedObject;
- if ( !myPoint2 )
- GroupPoints->PushButton5->click();
- else if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- else if ( !myCentPoint )
- GroupPoints->PushButton2->click();
+ myPoint1 = aSelectedObject;
+ if ( !myPoint2 )
+ GroupPoints->PushButton5->click();
+ else if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ else if ( !myCentPoint )
+ GroupPoints->PushButton2->click();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
- myPoint2 = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- else if ( !myCentPoint )
- GroupPoints->PushButton2->click();
- else if ( !myPoint1 )
- GroupPoints->PushButton4->click();
+ myPoint2 = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ else if ( !myCentPoint )
+ GroupPoints->PushButton2->click();
+ else if ( !myPoint1 )
+ GroupPoints->PushButton4->click();
}
}
else {
if (myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 0 )
- myAxis.nullify();
- else if ( getConstructorId() == 1 )
- myCentPoint.nullify();
+ if ( getConstructorId() == 0 )
+ myAxis.nullify();
+ else if ( getConstructorId() == 1 )
+ myCentPoint.nullify();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
- myPoint1.nullify();
+ myPoint1.nullify();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
- myPoint2.nullify();
+ myPoint2.nullify();
}
myEditCurrentArgument->setText("");
}
GroupPoints->LineEdit5->setEnabled(false);
if (getConstructorId() == 0)
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+ localSelection(TopAbs_EDGE);
else
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ localSelection(TopAbs_VERTEX);
}
else if (send == GroupPoints->PushButton4) {
myEditCurrentArgument = GroupPoints->LineEdit4;
GroupPoints->LineEdit2->setEnabled(false);
GroupPoints->LineEdit5->setEnabled(false);
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ localSelection(TopAbs_VERTEX);
}
else if (send == GroupPoints->PushButton5) {
myEditCurrentArgument = GroupPoints->LineEdit5;
GroupPoints->LineEdit2->setEnabled(false);
GroupPoints->LineEdit4->setEnabled(false);
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ localSelection(TopAbs_VERTEX);
}
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}
}
}
+
+//=================================================================================
+// function : getSourceObjects
+// purpose : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> TransformationGUI_RotationDlg::getSourceObjects()
+{
+ QList<GEOM::GeomObjPtr> res;
+ if ( GroupPoints->CheckButton1->isChecked() ) {
+ res.append(myObjects);
+ res << myAxis << myCentPoint << myPoint1 << myPoint2;
+ }
+ return res;
+}