From 413db213eee149bedf776163be9cefdd76c56f65 Mon Sep 17 00:00:00 2001 From: mkr Date: Tue, 16 Jan 2007 12:09:00 +0000 Subject: [PATCH] Fix for bug PAL13900 : SMESH : "Move_Node" ergonomy. --- src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx | 3 +++ src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx | 11 ++++++++--- src/SMESHGUI/SMESHGUI_NodesDlg.cxx | 3 +++ src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx | 6 ++++++ src/SMESHGUI/SMESHGUI_RotationDlg.cxx | 6 ++++++ src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx | 3 +++ src/SMESHGUI/SMESHGUI_TranslationDlg.cxx | 6 ++++++ 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index 4cee1a7fd..02d6f633f 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -219,10 +219,13 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod SelectBasePointButton->setPixmap(selectImage); XLab = new QLabel(tr("SMESH_X"), BasePointGrp); + XLab->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); XSpin = new SMESHGUI_SpinBox(BasePointGrp); YLab = new QLabel(tr("SMESH_Y"), BasePointGrp); + YLab->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); YSpin = new SMESHGUI_SpinBox(BasePointGrp); ZLab = new QLabel(tr("SMESH_Z"), BasePointGrp); + ZLab->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); ZSpin = new SMESHGUI_SpinBox(BasePointGrp); // layouting diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx index 4fc7e997b..b7d41af82 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx @@ -178,11 +178,16 @@ QFrame* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent) myId->setValidator(new SMESHGUI_IdValidator(this, "validator", 1)); QGroupBox* aCoordGrp = new QGroupBox(1, Qt::Vertical, tr("SMESH_COORDINATES"), aFrame); - new QLabel(tr("SMESH_X"), aCoordGrp); + QLabel* aXLabel = new QLabel(tr("SMESH_X"), aCoordGrp); + aXLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); myX = new SMESHGUI_SpinBox(aCoordGrp); - new QLabel(tr("SMESH_Y"), aCoordGrp); + + QLabel* aYLabel = new QLabel(tr("SMESH_Y"), aCoordGrp); + aYLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); myY = new SMESHGUI_SpinBox(aCoordGrp); - new QLabel(tr("SMESH_Z"), aCoordGrp); + + QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp); + aZLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); myZ = new SMESHGUI_SpinBox(aCoordGrp); myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 8a1a13e23..b91eb086a 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -309,13 +309,16 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule, GroupCoordinatesLayout->setSpacing(6); GroupCoordinatesLayout->setMargin(11); TextLabel_X = new QLabel(GroupCoordinates, "TextLabel_X"); + TextLabel_X->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); TextLabel_X->setText(tr("SMESH_X" )); GroupCoordinatesLayout->addWidget(TextLabel_X, 0, 0); TextLabel_Y = new QLabel(GroupCoordinates, "TextLabel_Y"); + TextLabel_Y->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabel_Y->setText(tr("SMESH_Y" )); GroupCoordinatesLayout->addWidget(TextLabel_Y, 0, 2); TextLabel_Z = new QLabel(GroupCoordinates, "TextLabel_Z"); + TextLabel_Z->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabel_Z->setText(tr("SMESH_Z" )); GroupCoordinatesLayout->addWidget(TextLabel_Z, 0, 4); diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 661efdc16..9a2994f81 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -208,6 +208,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SelectPointButton, 0, 1); TextLabelX = new QLabel(GroupAxis, "TextLabelX"); + TextLabelX->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelX->setText(tr("SMESH_X")); GroupAxisLayout->addWidget(TextLabelX, 0, 2); @@ -215,6 +216,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SpinBox_X, 0, 3); TextLabelY = new QLabel(GroupAxis, "TextLabelY"); + TextLabelY->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelY->setText(tr("SMESH_Y")); GroupAxisLayout->addWidget(TextLabelY, 0, 4); @@ -222,6 +224,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SpinBox_Y, 0, 5); TextLabelZ = new QLabel(GroupAxis, "TextLabelZ"); + TextLabelZ->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelZ->setText(tr("SMESH_Z")); GroupAxisLayout->addWidget(TextLabelZ, 0, 6); @@ -237,6 +240,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SelectVectorButton, 1, 1); TextLabelDX = new QLabel(GroupAxis, "TextLabelDX"); + TextLabelDX->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDX->setText(tr("SMESH_DX")); GroupAxisLayout->addWidget(TextLabelDX, 1, 2); @@ -244,6 +248,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SpinBox_DX, 1, 3); TextLabelDY = new QLabel(GroupAxis, "TextLabelDY"); + TextLabelDY->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDY->setText(tr("SMESH_DY")); GroupAxisLayout->addWidget(TextLabelDY, 1, 4); @@ -251,6 +256,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char* GroupAxisLayout->addWidget(SpinBox_DY, 1, 5); TextLabelDZ = new QLabel(GroupAxis, "TextLabelDZ"); + TextLabelDZ->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDZ->setText(tr("SMESH_DZ")); GroupAxisLayout->addWidget(TextLabelDZ, 1, 6); diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index a15594c46..834d3f44e 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -212,6 +212,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SelectPointButton, 0, 1); TextLabelX = new QLabel(GroupAxis, "TextLabelX"); + TextLabelX->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelX->setText(tr("SMESH_X")); GroupAxisLayout->addWidget(TextLabelX, 0, 2); @@ -219,6 +220,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SpinBox_X, 0, 3); TextLabelY = new QLabel(GroupAxis, "TextLabelY"); + TextLabelY->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelY->setText(tr("SMESH_Y")); GroupAxisLayout->addWidget(TextLabelY, 0, 4); @@ -226,6 +228,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SpinBox_Y, 0, 5); TextLabelZ = new QLabel(GroupAxis, "TextLabelZ"); + TextLabelZ->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelZ->setText(tr("SMESH_Z")); GroupAxisLayout->addWidget(TextLabelZ, 0, 6); @@ -241,6 +244,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SelectVectorButton, 1, 1); TextLabelDX = new QLabel(GroupAxis, "TextLabelDX"); + TextLabelDX->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDX->setText(tr("SMESH_DX")); GroupAxisLayout->addWidget(TextLabelDX, 1, 2); @@ -248,6 +252,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SpinBox_DX, 1, 3); TextLabelDY = new QLabel(GroupAxis, "TextLabelDY"); + TextLabelDY->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDY->setText(tr("SMESH_DY")); GroupAxisLayout->addWidget(TextLabelDY, 1, 4); @@ -255,6 +260,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam GroupAxisLayout->addWidget(SpinBox_DY, 1, 5); TextLabelDZ = new QLabel(GroupAxis, "TextLabelDZ"); + TextLabelDZ->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelDZ->setText(tr("SMESH_DZ")); GroupAxisLayout->addWidget(TextLabelDZ, 1, 6); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index b2307185f..ecb7b3665 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -218,6 +218,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam GroupMirrorLayout->addWidget(SelectPointButton, 0, 1); TextLabelX = new QLabel(GroupMirror, "TextLabelX"); + TextLabelX->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelX->setText(tr("SMESH_X")); GroupMirrorLayout->addWidget(TextLabelX, 0, 2); @@ -225,6 +226,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam GroupMirrorLayout->addWidget(SpinBox_X, 0, 3); TextLabelY = new QLabel(GroupMirror, "TextLabelY"); + TextLabelY->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelY->setText(tr("SMESH_Y")); GroupMirrorLayout->addWidget(TextLabelY, 0, 4); @@ -232,6 +234,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam GroupMirrorLayout->addWidget(SpinBox_Y, 0, 5); TextLabelZ = new QLabel(GroupMirror, "TextLabelZ"); + TextLabelZ->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabelZ->setText(tr("SMESH_Z")); GroupMirrorLayout->addWidget(TextLabelZ, 0, 6); diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 499f43ff5..9bbdd4eb3 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -200,18 +200,21 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha GroupArgumentsLayout->addWidget(SelectButton1, 2, 1); TextLabel1_1 = new QLabel(GroupArguments, "TextLabel1_1"); + TextLabel1_1->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); GroupArgumentsLayout->addWidget(TextLabel1_1, 2, 2); SpinBox1_1 = new SMESHGUI_SpinBox(GroupArguments, "SpinBox1_1"); GroupArgumentsLayout->addWidget(SpinBox1_1, 2, 3); TextLabel1_2 = new QLabel(GroupArguments, "TextLabel1_2"); + TextLabel1_2->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); GroupArgumentsLayout->addWidget(TextLabel1_2, 2, 4); SpinBox1_2 = new SMESHGUI_SpinBox(GroupArguments, "SpinBox1_2"); GroupArgumentsLayout->addWidget(SpinBox1_2, 2, 5); TextLabel1_3 = new QLabel(GroupArguments, "TextLabel1_3"); + TextLabel1_3->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); GroupArgumentsLayout->addWidget(TextLabel1_3, 2, 6); SpinBox1_3 = new SMESHGUI_SpinBox(GroupArguments, "SpinBox1_3"); @@ -228,6 +231,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha GroupArgumentsLayout->addWidget(SelectButton2, 3, 1); TextLabel2_1 = new QLabel(GroupArguments, "TextLabel2_1"); + TextLabel2_1->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabel2_1->setText(tr("SMESH_X" )); GroupArgumentsLayout->addWidget(TextLabel2_1, 3, 2); @@ -235,6 +239,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha GroupArgumentsLayout->addWidget(SpinBox2_1, 3, 3); TextLabel2_2 = new QLabel(GroupArguments, "TextLabel2_2"); + TextLabel2_2->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabel2_2->setText(tr("SMESH_Y" )); GroupArgumentsLayout->addWidget(TextLabel2_2, 3, 4); @@ -242,6 +247,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha GroupArgumentsLayout->addWidget(SpinBox2_2, 3, 5); TextLabel2_3 = new QLabel(GroupArguments, "TextLabel2_3"); + TextLabel2_3->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::ExpandTabs ); TextLabel2_3->setText(tr("SMESH_Z")); GroupArgumentsLayout->addWidget(TextLabel2_3, 3, 6);