]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Qt4 porting.
authormkr <mkr@opencascade.com>
Tue, 18 Mar 2008 16:24:05 +0000 (16:24 +0000)
committermkr <mkr@opencascade.com>
Tue, 18 Mar 2008 16:24:05 +0000 (16:24 +0000)
15 files changed:
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx

index 1267a44ce7c57511ae7efc4901a2f80554be314d..a8d640da24b954f159ef7c1a22a5dbaedb5864ea 100644 (file)
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QGridLayout>
-#include <qvariant.h>
+#include <QVariant>
 #include <QCheckBox>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 #define SPACING 6
 #define MARGIN  11
@@ -281,6 +282,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(buttonGrTitle, this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -290,7 +292,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
   Constructor1->setChecked(true);
 
   GroupConstructorsLayout->addWidget(Constructor1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton( Constructor1, 0 );
 
   /***************************************************************/
   GroupC1 = new QGroupBox(grBoxTitle, this);
index 35465fb072f02f25430dc096d88f6fcedf30c557..52458d5354b9ca86ef7f534bae12593d9d7c772c 100644 (file)
@@ -78,6 +78,7 @@
 #include <QCheckBox>
 #include <QTableWidget>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // STL includes
 #include <vector>
@@ -402,6 +403,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(constructorGrTitle, this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* aGroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   aGroupConstructorsLayout->setSpacing(SPACING);
   aGroupConstructorsLayout->setMargin(MARGIN);
@@ -409,7 +411,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   myRadioButton1 = new QRadioButton(GroupConstructors);
   myRadioButton1->setIcon(image0);
   aGroupConstructorsLayout->addWidget(myRadioButton1);
-  aGroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(myRadioButton1, 0);
 
   /***************************************************************/
   GroupArguments = new QGroupBox(argumentsGrTitle, this);
@@ -1058,7 +1060,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
       // clear table
       for ( int row = 0; row < myTable->rowCount(); row++ )
         for ( int col = 0; col < myTable->columnCount(); col++ )
-         myTable->item(row, col)->setText("");
+         if ( QTableWidgetItem* aTWI = myTable->item(row, col) ) aTWI->setText("");
       
       myTable->setEnabled( false );
     }
index 7e88164ac0e9785fa59cb7ed75d330c1b4f0ea82..73efb4e4a6cf7fbeb4fe7b087e9795965d8ae6a1 100644 (file)
@@ -56,6 +56,7 @@
 #include <QCheckBox>
 #include <QComboBox>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // STL includes
 #include <set>
@@ -88,6 +89,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(tr("COMPOUND"), this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -96,7 +98,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   Constructor1->setIcon(image0);
   Constructor1->setChecked(true);
   GroupConstructorsLayout->addWidget(Constructor1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(Constructor1, 0);
 
   /***************************************************************/
   GroupName = new QGroupBox(tr("RESULT_NAME"), this);
index 76b2472477445b5af671d2335e79ff40d1501006..195295c12a29b94c5a9b0bd1bc8e5d695396be96 100644 (file)
@@ -77,6 +77,7 @@
 #include <QGridLayout>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
+#include <QButtonGroup>
 
 // VTK includes
 #include <vtkProperty.h>
@@ -812,6 +813,7 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent)
   // constructor
 
   QGroupBox* aPixGrp = new QGroupBox(tr("CONSTRUCTOR"), aFrame);
+  QButtonGroup* aBtnGrp = new QButtonGroup(this);
   QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
   aPixGrpLayout->setMargin(MARGIN); aPixGrpLayout->setSpacing(SPACING);
 
@@ -819,6 +821,7 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent)
   aRBut->setIcon(iconCompute);
   aRBut->setChecked(true);
   aPixGrpLayout->addWidget(aRBut);
+  aBtnGrp->addButton(aRBut, 0);
 
   // Mesh name
 
index 1024fdfae6cfe53f4b3595dc3d052b2b07186fe9..1afa9aa05f8ec2aad192f32d353b2cdd9f34819b 100644 (file)
@@ -86,6 +86,7 @@
 #include <QVBoxLayout>
 #include <QGridLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 #define SPACING 6
 #define MARGIN  11
@@ -329,6 +330,7 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
                                    tr("SMESH_MERGE_NODES"), 
                                    this);
 
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -337,7 +339,7 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   RadioButton->setIcon(myAction == 1 ? IconMergeElems : IconMergeNodes);
   RadioButton->setChecked(true);
   GroupConstructorsLayout->addWidget(RadioButton);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(RadioButton, 0);
 
   /***************************************************************/
   // Controls for mesh defining
index ddc62504c8bfa66cea7b0c7da76f8f4f52a28366..9dc81ed3cbe18780bcb154a920300068e10d1d60 100644 (file)
@@ -67,6 +67,7 @@
 #include <QLabel>
 #include <QRadioButton>
 #include <QCheckBox>
+#include <QButtonGroup>
 
 // VTK includes
 #include <vtkProperty.h>
@@ -114,6 +115,7 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   // constructor
 
   QGroupBox* aPixGrp = new QGroupBox(tr("MESH_PASS_THROUGH_POINT"), aFrame);
+  QButtonGroup* aBtnGrp = new QButtonGroup(this);
   QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
   aPixGrpLayout->setMargin(MARGIN);
   aPixGrpLayout->setSpacing(SPACING);
@@ -122,6 +124,7 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   aRBut->setIcon(iconMoveNode);
   aRBut->setChecked(true);
   aPixGrpLayout->addWidget(aRBut);
+  aBtnGrp->addButton(aRBut, 0);
 
   // coordinates
 
index 131e60b9fac739318c6186be7d144ad33e9fdd6e..1d39661bc87d946c712bb81f22fe2b498e533bb0 100644 (file)
@@ -70,6 +70,7 @@
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -158,6 +159,7 @@ QWidget* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
 
   //------------------------------------------------------------
   QGroupBox* aPixGrp = new QGroupBox(tr("MESH_NODE"), aFrame);
+  QButtonGroup* aBtnGrp = new QButtonGroup(this);
   QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
   aPixGrpLayout->setSpacing(SPACING);
   aPixGrpLayout->setMargin(MARGIN);
@@ -167,7 +169,7 @@ QWidget* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
   aRBut->setChecked(true);
 
   aPixGrpLayout->addWidget(aRBut);
-  aPixGrpLayout->addStretch();
+  aBtnGrp->addButton(aRBut, 0);
 
   //------------------------------------------------------------
   QGroupBox* anIdGrp = new QGroupBox(tr("SMESH_MOVE"), aFrame);
index 83b092f0d4164b77879ff6b6a5cd9bf24a080bac..27a885dd848fc52c89be7e3f07f933d0623683c0 100755 (executable)
@@ -400,7 +400,7 @@ void SMESHGUI_MultiEditDlg::Init()
   if (myEntityTypeGrp)
     connect(myEntityTypeGrp, SIGNAL(buttonClicked(int)), SLOT(on3d2dChanged(int)));
 
-  connect(myListBox, SIGNAL(selectionChanged()), SLOT(onListSelectionChanged()));
+  connect(myListBox, SIGNAL(itemSelectionChanged()), SLOT(onListSelectionChanged()));
 
   onSelectionDone();
 
index d3a963b390ee978058498a9f6b5235ba879a4360..11f2e8ccfbc6a0ae3b39d03221255481a6aa5a95 100644 (file)
@@ -76,6 +76,7 @@
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -226,7 +227,7 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
 {
   setModal( false );
   setAttribute( Qt::WA_DeleteOnClose, true );
-  setWindowTitle( "MESH_NODE_TITLE" );
+  setWindowTitle( tr("MESH_NODE_TITLE") );
   setSizeGripEnabled( true );
   
   mySimulation = new SMESH::TNodeSimulation( SMESH::GetViewWindow( mySMESHGUI ) );
@@ -240,6 +241,7 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
 
   /***************************************************************/
   GroupConstructors = new QGroupBox( tr( "MESH_NODE" ), this );
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout( GroupConstructors );
   GroupConstructorsLayout->setSpacing( SPACING );
   GroupConstructorsLayout->setMargin( MARGIN );
@@ -247,9 +249,9 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
   Constructor1 = new QRadioButton( GroupConstructors );
   Constructor1->setIcon( image0 );
   Constructor1->setChecked( true );
-
+  
   GroupConstructorsLayout->addWidget( Constructor1 );
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton( Constructor1, 0 );
 
   /***************************************************************/
   GroupCoordinates = new QGroupBox( tr( "SMESH_COORDINATES" ), this );
index 300ab51c273d1b8520f09a9b327098989190ffe8..c8aa32a600f34a7c450b2504e5b5be4288ef1d1e 100644 (file)
@@ -62,6 +62,7 @@
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -96,6 +97,7 @@ SMESHGUI_RemoveElementsDlg
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(tr("SMESH_ELEMENTS"), this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -105,7 +107,7 @@ SMESHGUI_RemoveElementsDlg
   Constructor1->setChecked(true);
 
   GroupConstructorsLayout->addWidget(Constructor1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(Constructor1, 0);
 
   /***************************************************************/
   GroupC1 = new QGroupBox(tr("SMESH_REMOVE"), this);
index c1233392324f2fddb640ffb2ec19a78526f2ea04..50404e8cc592f18e5f81e83ac6242e981def6062 100644 (file)
@@ -62,6 +62,7 @@
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -96,6 +97,7 @@ SMESHGUI_RemoveNodesDlg
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(tr("SMESH_NODES"), this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -105,7 +107,7 @@ SMESHGUI_RemoveNodesDlg
   Constructor1->setChecked(true);
 
   GroupConstructorsLayout->addWidget(Constructor1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(Constructor1, 0);
 
   /***************************************************************/
   GroupC1 = new QGroupBox(tr("SMESH_REMOVE"), this);
index 4dc3f240d1c25b56ee2e683819696c27bc3329ee..2867d12dba44c7faa1524186f758e2284c6c62f9 100644 (file)
@@ -54,6 +54,7 @@
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 #include <QKeyEvent>
+#include <QButtonGroup>
 
 // IDL includes
 #include <SALOMEconfig.h>
@@ -99,6 +100,7 @@ SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg( SMESHGUI* theModule, const int
     "renumbering_nodes_and_elements_page.html#renumbering_nodes_anchor" :
     "renumbering_nodes_and_elements_page.html#renumbering_elements_anchor";
 
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -108,7 +110,7 @@ SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg( SMESHGUI* theModule, const int
   Constructor1->setChecked(true);
 
   GroupConstructorsLayout->addWidget(Constructor1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(Constructor1, 0);
 
   /***************************************************************/
   GroupMesh = new QGroupBox(tr("SMESH_RENUMBERING"), this);
index d0ec0fb7a0d304419084193a501f1e186623a143..914562d316c041309be50d86c82bf864aee3d517 100644 (file)
@@ -104,6 +104,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(tr("SMESH_ROTATION"), this);
+  QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
   GroupConstructorsLayout->setSpacing(SPACING);
   GroupConstructorsLayout->setMargin(MARGIN);
@@ -112,7 +113,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
   RadioButton1->setIcon(image0);
 
   GroupConstructorsLayout->addWidget(RadioButton1);
-  GroupConstructorsLayout->addStretch();
+  ButtonGroup->addButton(RadioButton1, 0);
 
   /***************************************************************/
   GroupArguments = new QGroupBox(tr("SMESH_ARGUMENTS"), this);
@@ -180,7 +181,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
   SpinBox_Angle = new SMESHGUI_SpinBox(GroupArguments);
 
   // action switch
-  ActionBox = new QGroupBox(tr("ACTION"), GroupArguments);
+  ActionBox = new QGroupBox(GroupArguments);
   ActionGroup = new QButtonGroup(GroupArguments);
   QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
   ActionBoxLayout->setSpacing(SPACING);
index 39d9b89a1e44e5b24fc376c136b037b87154ce2d..4dccb4c799e0d80ed5eed7dc1217793929f1f73f 100644 (file)
@@ -188,7 +188,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
   GroupMirrorLayout->addWidget(SpinBox_DZ,         1, 7);
 
   // switch of action type
-  ActionBox = new QGroupBox(tr("ACTION"), GroupArguments);
+  ActionBox = new QGroupBox(GroupArguments);
   ActionGroup = new QButtonGroup(GroupArguments);
   QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
   ActionBoxLayout->addSpacing(SPACING);
index 1c5ac1f1ec2b98e26bdc27d4cbfe835fc1de6f95..6c520a0e4efa9ebddf26fbd4b312a6233fed5b2a 100644 (file)
@@ -161,7 +161,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule )
   SpinBox2_3 = new SMESHGUI_SpinBox(GroupArguments);
 
   // switch of action type
-  ActionBox = new QGroupBox(tr("ACTION"), GroupArguments);
+  ActionBox = new QGroupBox(GroupArguments);
   ActionGroup = new QButtonGroup(GroupArguments);
   QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
   ActionBoxLayout->addSpacing(SPACING);