mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
Bug IPAL20689 - Problem with the Mutli-Transformation dialog
This commit is contained in:
parent
0f7c08d061
commit
b147d12523
@ -111,11 +111,11 @@ BlocksGUI_TrsfDlg::~BlocksGUI_TrsfDlg()
|
||||
void BlocksGUI_TrsfDlg::Init()
|
||||
{
|
||||
// Set range of spinboxes
|
||||
double SpecificStep = 1.0;
|
||||
QMap<int, SalomeApp_DoubleSpinBox*>::iterator anIter;
|
||||
int SpecificStep = 1;
|
||||
QMap<int, SalomeApp_IntSpinBox*>::iterator anIter;
|
||||
for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) {
|
||||
//anIter.data()->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3);
|
||||
initSpinBox(anIter.value(), 1.0, 999, SpecificStep, 3);
|
||||
//anIter.data()->RangeStepAndValidator(1, 999, SpecificStep);
|
||||
initSpinBox(anIter.value(), 1, 999, SpecificStep);
|
||||
}
|
||||
|
||||
// signals and slots connections
|
||||
@ -128,7 +128,7 @@ void BlocksGUI_TrsfDlg::Init()
|
||||
for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn)
|
||||
connect(anIterBtn.value(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
||||
|
||||
QMap<int, SalomeApp_DoubleSpinBox*>::iterator anIterSpin;
|
||||
QMap<int, SalomeApp_IntSpinBox*>::iterator anIterSpin;
|
||||
for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin)
|
||||
connect(anIterSpin.value(), SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
|
||||
@ -166,16 +166,13 @@ void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId)
|
||||
myGrp2->hide();
|
||||
myGrp1->show();
|
||||
mySpinBox[SpinBox1]->setValue(2);
|
||||
mySpinBox[SpinBox1]->setDecimals(0);
|
||||
mySelBtn[MainObj1]->click();
|
||||
break;
|
||||
case 1:
|
||||
myGrp1->hide();
|
||||
myGrp2->show();
|
||||
mySpinBox[SpinBox2U]->setValue(2);
|
||||
mySpinBox[SpinBox2U]->setDecimals(0);
|
||||
mySpinBox[SpinBox2V]->setValue(2);
|
||||
mySpinBox[SpinBox2V]->setDecimals(0);
|
||||
mySelBtn[MainObj2]->click();
|
||||
break;
|
||||
default:
|
||||
@ -453,7 +450,7 @@ void BlocksGUI_TrsfDlg::createSpinWg (const QString& theLbl,
|
||||
const int theId)
|
||||
{
|
||||
QLabel* lab = new QLabel(theLbl, theParent);
|
||||
mySpinBox[theId] = new SalomeApp_DoubleSpinBox(theParent);
|
||||
mySpinBox[theId] = new SalomeApp_IntSpinBox(theParent);
|
||||
QGridLayout* l = 0;
|
||||
if (!theParent->layout()) {
|
||||
l = new QGridLayout(theParent);
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include <QMap>
|
||||
|
||||
class SalomeApp_DoubleSpinBox;
|
||||
class SalomeApp_IntSpinBox;
|
||||
class QGroupBox;
|
||||
class QPushButton;
|
||||
class QLineEdit;
|
||||
@ -79,7 +79,7 @@ private:
|
||||
|
||||
QMap<int, QPushButton*> mySelBtn;
|
||||
QMap<int, QLineEdit*> mySelName;
|
||||
QMap<int, SalomeApp_DoubleSpinBox*> mySpinBox;
|
||||
QMap<int, SalomeApp_IntSpinBox*> mySpinBox;
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
|
@ -332,6 +332,20 @@ DlgRef_2Sel1Spin::~DlgRef_2Sel1Spin()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_2Sel1SpinInt
|
||||
//////////////////////////////////////////
|
||||
|
||||
DlgRef_2Sel1SpinInt::DlgRef_2Sel1SpinInt( QWidget* parent, Qt::WindowFlags f )
|
||||
: QWidget( parent, f )
|
||||
{
|
||||
setupUi( this );
|
||||
}
|
||||
|
||||
DlgRef_2Sel1SpinInt::~DlgRef_2Sel1SpinInt()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_2Sel2List
|
||||
//////////////////////////////////////////
|
||||
|
@ -389,6 +389,22 @@ public:
|
||||
~DlgRef_2Sel1Spin();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_2Sel1SpinInt
|
||||
//////////////////////////////////////////
|
||||
|
||||
#include "ui_DlgRef_2Sel1SpinInt_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_2Sel1SpinInt : public QWidget,
|
||||
public Ui::DlgRef_2Sel1SpinInt_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgRef_2Sel1SpinInt( QWidget* = 0, Qt::WindowFlags = 0 );
|
||||
~DlgRef_2Sel1SpinInt();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_2Sel2List
|
||||
//////////////////////////////////////////
|
||||
|
@ -60,6 +60,7 @@ HEADERS += DlgRef_1Sel3Spin_QTD.h
|
||||
HEADERS += DlgRef_1Sel4Spin_QTD.h
|
||||
HEADERS += DlgRef_1Sel5Spin_QTD.h
|
||||
HEADERS += DlgRef_2Sel1Spin_QTD.h
|
||||
HEADERS += DlgRef_2Sel1SpinInt_QTD.h
|
||||
HEADERS += DlgRef_2Sel2Spin_QTD.h
|
||||
HEADERS += DlgRef_2Sel3Spin_QTD.h
|
||||
HEADERS += DlgRef_1Sel1Spin1Check_QTD.h
|
||||
|
169
src/DlgRef/DlgRef_2Sel1SpinInt_QTD.ui
Normal file
169
src/DlgRef/DlgRef_2Sel1SpinInt_QTD.ui
Normal file
@ -0,0 +1,169 @@
|
||||
<ui version="4.0" >
|
||||
<class>DlgRef_2Sel1SpinInt_QTD</class>
|
||||
<widget class="QWidget" name="DlgRef_2Sel1SpinInt_QTD" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>156</width>
|
||||
<height>99</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="GroupBox1" >
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DX" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="TextLabel3" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL3</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL2</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QPushButton" name="PushButton1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLineEdit" name="LineEdit2" />
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>TL1</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="PushButton2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLineEdit" name="LineEdit1" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SalomeApp_IntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header location="global" >SalomeApp_IntSpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
<tabstop>LineEdit1</tabstop>
|
||||
<tabstop>PushButton2</tabstop>
|
||||
<tabstop>LineEdit2</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -63,7 +63,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY" />
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DY" />
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX" />
|
||||
@ -177,6 +177,11 @@
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SalomeApp_IntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header location="global" >SalomeApp_IntSpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
|
@ -63,13 +63,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY2" />
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DY2" />
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX2" />
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY1" />
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DY1" />
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX1" />
|
||||
@ -215,6 +215,11 @@
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SalomeApp_IntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header location="global" >SalomeApp_IntSpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
|
@ -56,13 +56,13 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="7" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY2" />
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DY2" />
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX2" />
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY1" />
|
||||
<widget class="SalomeApp_IntSpinBox" name="SpinBox_DY1" />
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX1" />
|
||||
@ -254,6 +254,11 @@
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header location="global" >SalomeApp_DoubleSpinBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SalomeApp_IntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header location="global" >SalomeApp_IntSpinBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>PushButton1</tabstop>
|
||||
|
@ -60,6 +60,7 @@ UIC_FILES = \
|
||||
ui_DlgRef_2Sel1List_QTD.h \
|
||||
ui_DlgRef_2Sel1Spin2Check_QTD.h \
|
||||
ui_DlgRef_2Sel1Spin_QTD.h \
|
||||
ui_DlgRef_2Sel1SpinInt_QTD.h \
|
||||
ui_DlgRef_2Sel2List_QTD.h \
|
||||
ui_DlgRef_2Sel2Spin1Check_QTD.h \
|
||||
ui_DlgRef_2Sel2Spin_QTD.h \
|
||||
|
@ -70,7 +70,7 @@ TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg
|
||||
mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
|
||||
mainFrame()->RadioButton3->close();
|
||||
|
||||
GroupPoints = new DlgRef_2Sel1Spin(centralWidget());
|
||||
GroupPoints = new DlgRef_2Sel1SpinInt(centralWidget());
|
||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_MULTIROTATION_SIMPLE"));
|
||||
GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
|
||||
GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
|
||||
@ -124,23 +124,20 @@ void TransformationGUI_MultiRotationDlg::Init()
|
||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
double SpecificStep1 = 5;
|
||||
double SpecificStep2 = 1;
|
||||
int SpecificStep1 = 5;
|
||||
int SpecificStep2 = 1;
|
||||
// min, max, step and decimals for spin boxes & initial values
|
||||
initSpinBox(GroupPoints->SpinBox_DX, 1.0, 999, SpecificStep2, 10);
|
||||
initSpinBox(GroupPoints->SpinBox_DX, 1, 999, SpecificStep2);
|
||||
GroupPoints->SpinBox_DX->setValue(myNbTimes1);
|
||||
GroupPoints->SpinBox_DX->setDecimals(0);
|
||||
|
||||
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, SpecificStep1, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1.0, 999, SpecificStep2, 10);
|
||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep2);
|
||||
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1.0, 999, SpecificStep2, 10);
|
||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep2);
|
||||
GroupDimensions->SpinBox_DX1->setValue(myAng);
|
||||
GroupDimensions->SpinBox_DY1->setValue(myNbTimes1);
|
||||
GroupDimensions->SpinBox_DX2->setValue(myStep);
|
||||
GroupDimensions->SpinBox_DY2->setValue(myNbTimes2);
|
||||
GroupDimensions->SpinBox_DY1->setDecimals(0);
|
||||
GroupDimensions->SpinBox_DY2->setDecimals(0);
|
||||
|
||||
// init variables
|
||||
myAng = 45.0;
|
||||
@ -171,11 +168,11 @@ void TransformationGUI_MultiRotationDlg::Init()
|
||||
connect(GroupDimensions->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||
connect(GroupDimensions->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
connect(GroupDimensions->SpinBox_DX1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
|
||||
connect(GroupDimensions->SpinBox_DX1,SIGNAL(textChanged( const QString& )),
|
||||
this, SLOT(TextValueChangedInSpinBox( const QString& )));
|
||||
@ -195,11 +192,11 @@ void TransformationGUI_MultiRotationDlg::Init()
|
||||
//=================================================================================
|
||||
void TransformationGUI_MultiRotationDlg::SetDoubleSpinBoxStep (double step)
|
||||
{
|
||||
GroupPoints->SpinBox_DX->setSingleStep(step);
|
||||
GroupPoints->SpinBox_DX->setSingleStep((int)step);
|
||||
GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY1->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
||||
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY2->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -478,6 +475,7 @@ void TransformationGUI_MultiRotationDlg::TextValueChangedInSpinBox(const QString
|
||||
GroupDimensions->CheckButton1->setChecked(false);
|
||||
GroupDimensions->CheckButton1->setEnabled(isDigit);
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ValueChangedInSpinBox()
|
||||
// purpose :
|
||||
@ -486,14 +484,26 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox (double newValue)
|
||||
{
|
||||
QObject* send = (QObject*)sender();
|
||||
|
||||
if (send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
|
||||
myNbTimes1 = (int)newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DX1)
|
||||
if (send == GroupDimensions->SpinBox_DX1)
|
||||
myAng = newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DX2)
|
||||
myStep = newValue;
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ValueChangedInSpinBox()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox (int newValue)
|
||||
{
|
||||
QObject* send = (QObject*)sender();
|
||||
|
||||
if (send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
|
||||
myNbTimes1 = newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DY2)
|
||||
myNbTimes2 = (int)newValue;
|
||||
myNbTimes2 = newValue;
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
@ -508,9 +518,7 @@ void TransformationGUI_MultiRotationDlg::ReverseAngle()
|
||||
|
||||
int aConstructorId = getConstructorId();
|
||||
|
||||
if (aConstructorId == 0)
|
||||
GroupPoints->SpinBox_DX->setValue(myAng);
|
||||
else if (aConstructorId == 1)
|
||||
if (aConstructorId == 1)
|
||||
GroupDimensions->SpinBox_DX1->setValue(myAng);
|
||||
|
||||
displayPreview();
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
class DlgRef_2Sel4Spin1Check;
|
||||
class DlgRef_2Sel1Spin;
|
||||
class DlgRef_2Sel1SpinInt;
|
||||
|
||||
//=================================================================================
|
||||
// class : TransformationGUI_MultiRotationDlg
|
||||
@ -65,7 +65,7 @@ private:
|
||||
// to initialize the first selection field with a selected object on the dialog creation
|
||||
bool myInitial;
|
||||
|
||||
DlgRef_2Sel1Spin* GroupPoints;
|
||||
DlgRef_2Sel1SpinInt* GroupPoints;
|
||||
DlgRef_2Sel4Spin1Check* GroupDimensions;
|
||||
|
||||
private slots:
|
||||
@ -77,6 +77,7 @@ private slots:
|
||||
void SetEditCurrentArgument();
|
||||
void ReverseAngle();
|
||||
void ValueChangedInSpinBox( double );
|
||||
void ValueChangedInSpinBox( int );
|
||||
void TextValueChangedInSpinBox( const QString& );
|
||||
void ConstructorsClicked( int );
|
||||
void SetDoubleSpinBoxStep( double );
|
||||
|
@ -130,24 +130,21 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
||||
|
||||
double SpecificStep = 1;
|
||||
int SpecificStep = 1;
|
||||
// min, max, step and decimals for spin boxes & initial values
|
||||
initSpinBox(GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
initSpinBox(GroupPoints->SpinBox_DY, 1, 999, SpecificStep, 10);
|
||||
initSpinBox(GroupPoints->SpinBox_DY, 1, 999, SpecificStep);
|
||||
GroupPoints->SpinBox_DX->setValue(myStepU);
|
||||
GroupPoints->SpinBox_DY->setValue(myNbTimesU);
|
||||
GroupPoints->SpinBox_DY->setDecimals(0);
|
||||
|
||||
initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep, 10);
|
||||
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep);
|
||||
initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep, 10);
|
||||
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep);
|
||||
GroupDimensions->SpinBox_DX1->setValue(myStepU);
|
||||
GroupDimensions->SpinBox_DY1->setValue(myNbTimesU);
|
||||
GroupDimensions->SpinBox_DX2->setValue(myStepV);
|
||||
GroupDimensions->SpinBox_DY2->setValue(myNbTimesV);
|
||||
GroupDimensions->SpinBox_DY1->setDecimals(0);
|
||||
GroupDimensions->SpinBox_DY2->setDecimals(0);
|
||||
|
||||
// init variables
|
||||
myStepU = myStepV = 50.0;
|
||||
@ -181,11 +178,11 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
||||
connect(GroupDimensions->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
||||
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
connect(GroupDimensions->SpinBox_DX1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY1, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
connect(GroupDimensions->SpinBox_DX2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||
connect(GroupDimensions->SpinBox_DY2, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
|
||||
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(textChanged(const QString& )),
|
||||
this, SLOT(TextValueChangedInSpinBox(const QString& )));
|
||||
@ -212,11 +209,11 @@ void TransformationGUI_MultiTranslationDlg::Init()
|
||||
void TransformationGUI_MultiTranslationDlg::SetDoubleSpinBoxStep (double step)
|
||||
{
|
||||
GroupPoints->SpinBox_DX->setSingleStep(step);
|
||||
GroupPoints->SpinBox_DY->setSingleStep(step);
|
||||
GroupPoints->SpinBox_DY->setSingleStep((int)step);
|
||||
GroupDimensions->SpinBox_DX1->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY1->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
|
||||
GroupDimensions->SpinBox_DX2->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY2->setSingleStep(step);
|
||||
GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -561,18 +558,35 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox (double newVal
|
||||
case 0:
|
||||
if (send == GroupPoints->SpinBox_DX)
|
||||
myStepU = newValue;
|
||||
else if (send == GroupPoints->SpinBox_DY)
|
||||
myNbTimesU = (int)newValue;
|
||||
break;
|
||||
case 1:
|
||||
if (send == GroupDimensions->SpinBox_DX1)
|
||||
myStepU = newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DY1)
|
||||
myNbTimesU = (int)newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DX2)
|
||||
myStepV = newValue;
|
||||
break;
|
||||
}
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ValueChangedInSpinBox()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox (int newValue)
|
||||
{
|
||||
QObject* send = (QObject*)sender();
|
||||
switch (getConstructorId()) {
|
||||
case 0:
|
||||
if (send == GroupPoints->SpinBox_DY)
|
||||
myNbTimesU = newValue;
|
||||
break;
|
||||
case 1:
|
||||
if (send == GroupDimensions->SpinBox_DY1)
|
||||
myNbTimesU = newValue;
|
||||
else if (send == GroupDimensions->SpinBox_DY2)
|
||||
myNbTimesV = (int)newValue;
|
||||
myNbTimesV = newValue;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,7 @@ private slots:
|
||||
void ReverseStepU();
|
||||
void ReverseStepV();
|
||||
void ValueChangedInSpinBox( double );
|
||||
void ValueChangedInSpinBox( int );
|
||||
void TextValueChangedInSpinBox( const QString& );
|
||||
void ConstructorsClicked( int );
|
||||
void SetDoubleSpinBoxStep( double );
|
||||
|
Loading…
Reference in New Issue
Block a user