- QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SCALE")));
- QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
-
- setCaption(tr("GEOM_SCALE_TITLE"));
-
- /***************************************************************/
- GroupConstructors->setTitle(tr("GEOM_SCALE"));
- RadioButton1->setPixmap(image0);
- RadioButton2->close(TRUE);
- RadioButton3->close(TRUE);
-
- GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints");
- GroupPoints->CheckButton2->hide();
- GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
- GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
- GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT"));
- GroupPoints->TextLabel3->setText(tr("GEOM_SCALE_FACTOR"));
- GroupPoints->LineEdit1->setReadOnly( true );
- GroupPoints->LineEdit2->setReadOnly( true );
- GroupPoints->PushButton1->setPixmap(image1);
- GroupPoints->PushButton2->setPixmap(image1);
- GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY"));
-
- // san -- modification of an exisitng object by offset is not allowed
- GroupPoints->CheckButton1->hide();
-
- Layout1->addWidget(GroupPoints, 2, 0);
- /***************************************************************/
- double aFactor = 2.0;
- double SpecificStep = 0.5;
- /* min, max, step and decimals for spin boxes & initial values */
- GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3);
- GroupPoints->SpinBox_DX->SetValue(aFactor);
-
- // Activate Create a Copy mode
- GroupPoints->CheckButton1->setChecked(true);
- CreateCopyModeChanged(true);
+ SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
+ QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_SCALE")));
+ QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_SCALE_ALONG_AXES")));
+ QPixmap image3 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+ setWindowTitle(tr("GEOM_SCALE_TITLE"));
+
+ // Constructors
+ mainFrame()->GroupConstructors->setTitle(tr("GEOM_SCALE"));
+ mainFrame()->RadioButton1->setIcon(image1);
+ mainFrame()->RadioButton2->setIcon(image2);
+ mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+ mainFrame()->RadioButton3->close();
+
+ // Own widgets
+ GroupBox1 = new QGroupBox(tr("GEOM_ARGUMENTS"), this);
+ QGridLayout* OwnLayout = new QGridLayout(GroupBox1);
+ OwnLayout->setSpacing(6);
+ OwnLayout->setMargin(11);
+
+ TextLabel1 = new QLabel(tr("GEOM_OBJECTS"), GroupBox1);
+ PushButton1 = new QPushButton(GroupBox1);
+ PushButton1->setIcon(image3);
+ PushButton1->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ LineEdit1 = new QLineEdit(GroupBox1);
+ LineEdit1->setReadOnly(true);
+ LineEdit1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+
+ TextLabel2 = new QLabel(tr("GEOM_CENTRAL_POINT"), GroupBox1);
+ PushButton2 = new QPushButton(GroupBox1);
+ PushButton2->setIcon(image3);
+ PushButton2->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ LineEdit2 = new QLineEdit(GroupBox1);
+ LineEdit2->setReadOnly(true);
+ LineEdit2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+
+ TextLabel3 = new QLabel(tr("GEOM_SCALE_FACTOR"), GroupBox1);
+ SpinBox_FX = new SalomeApp_DoubleSpinBox(GroupBox1);
+
+ TextLabel4 = new QLabel(tr("GEOM_SCALE_FACTOR_Y"), GroupBox1);
+ SpinBox_FY = new SalomeApp_DoubleSpinBox(GroupBox1);
+
+ TextLabel5 = new QLabel(tr("GEOM_SCALE_FACTOR_Z"), GroupBox1);
+ SpinBox_FZ = new SalomeApp_DoubleSpinBox(GroupBox1);
+
+ CheckBoxCopy = new QCheckBox(tr("GEOM_CREATE_COPY"), GroupBox1);
+ CheckBoxCopy->setChecked(true);
+
+ // Layouting
+ OwnLayout->addWidget(TextLabel1, 0, 0);
+ OwnLayout->addWidget(PushButton1, 0, 1);
+ OwnLayout->addWidget(LineEdit1, 0, 2, 1, 2);
+ OwnLayout->addWidget(TextLabel2, 1, 0);
+ OwnLayout->addWidget(PushButton2, 1, 1);
+ OwnLayout->addWidget(LineEdit2, 1, 2, 1, 2);
+ OwnLayout->addWidget(TextLabel3, 2, 0);
+ OwnLayout->addWidget(SpinBox_FX, 2, 2);
+ OwnLayout->addWidget(TextLabel4, 3, 0);
+ OwnLayout->addWidget(SpinBox_FY, 3, 2);
+ OwnLayout->addWidget(TextLabel5, 4, 0);
+ OwnLayout->addWidget(SpinBox_FZ, 4, 2);
+ OwnLayout->addWidget(CheckBoxCopy, 5, 0, 1, 4);
+
+ QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+ layout->setMargin(0); layout->setSpacing(6);
+ layout->addWidget(GroupBox1);
+
+ setHelpFileName("scale_operation_page.html");
+
+ // Modification of an existing object by offset is not allowed
+ CheckBoxCopy->hide();