-// Copyright (C) 2009-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2014 CEA/DEN, EDF R&D
//
// 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
myParamCoord = new QButtonGroup(myParamGroup);
QHBoxLayout* boxLayout = new QHBoxLayout(myParamGroup);
boxLayout->setMargin(MARGIN); boxLayout->setSpacing(SPACING);
+
QRadioButton* btn = new QRadioButton(tr("By Param"), myParamGroup);
myParamCoord->addButton(btn, PARAM_VALUE);
boxLayout->addWidget(btn);
+
btn = new QRadioButton(tr("By Length"), myParamGroup);
myParamCoord->addButton(btn, LENGTH_VALUE);
boxLayout->addWidget(btn);
+
btn = new QRadioButton(tr("By Coords"), myParamGroup);
myParamCoord->addButton(btn, COORD_VALUE);
boxLayout->addWidget(btn);
+
myParamCoord->setExclusive(true);
myParamCoord->button(PARAM_VALUE)->setChecked(true);
void MyBasicGUI_PointDlg::onWindowActivated(SUIT_ViewManager* vm)
{
QString vmType = vm->getType();
- if ( (vmType == SVTK_Viewer::Type()) || (vmType == VTKViewer_Viewer::Type()) ){
+ if ( ((vmType == SVTK_Viewer::Type()) || (vmType == VTKViewer_Viewer::Type())) &&
+ !mainFrame()->RadioButton4->isChecked() &&
+ !myParamCoord->button(LENGTH_VALUE)->isChecked() )
mainFrame()->_vertex_le->setFocus();
- } else if ( vmType == OCCViewer_Viewer::Type() ){
- // ...
+ else if ( vmType == OCCViewer_Viewer::Type() ){
+ if (mainFrame()->RadioButton1->isChecked())
+ // Make the field "Vertex of the model" lose the focus
+ mainFrame()->RadioButton1->click();
+ else if (mainFrame()->RadioButton2->isChecked())
+ GroupRefPoint->LineEdit1->setFocus();
+ else if (mainFrame()->RadioButton3->isChecked() &&
+ !myParamCoord->button(LENGTH_VALUE)->isChecked())
+ GroupOnCurve->LineEdit1->setFocus();
+ else if (mainFrame()->RadioButton5->isChecked())
+ GroupOnSurface->LineEdit1->setFocus();
}
}