Salome HOME
NRI : Correction 1.1a version.
[modules/visu.git] / src / VISUGUI / VisuGUI_PointsResultsDlg.cxx
1 using namespace std;
2 //  File      : VisuGUI_PointsResultsDlg.cxx
3 //  Created   : Wed Aug 01 10:23:06 2001
4 //  Author    : Laurent CORNABE & Hubert ROLLAND 
5 //  Project   : SALOME
6 //  Module    : VISUGUI
7 //  Copyright : PRINCIPIA
8 //  $Header$
9
10 #include "VisuGUI_PointsResultsDlg.h"
11 #include <qlayout.h>
12
13 /*!
14   Constructor
15 */
16 VisuGUI_PointsResultsDlg::VisuGUI_PointsResultsDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
17     : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
18 {
19   if ( !name )
20     setName( "VisuGUI_PointsResultsDlg" );
21   setCaption( tr( "Results at selected point" ) );
22   setSizeGripEnabled( TRUE );
23
24   QGridLayout* TopLayout = new QGridLayout( this ); 
25   TopLayout->setSpacing( 6 );
26   TopLayout->setMargin( 11 );
27
28   GroupLimit = new QGroupBox( this, "GroupLimit" );
29   GroupLimit->setTitle( tr( "Results at Point" ) );
30   GroupLimit->setColumnLayout(0, Qt::Vertical );
31   GroupLimit->layout()->setSpacing( 0 );
32   GroupLimit->layout()->setMargin( 0 );
33   QGridLayout* GroupLimitLayout = new QGridLayout( GroupLimit->layout() );
34   GroupLimitLayout->setAlignment( Qt::AlignTop );
35   GroupLimitLayout->setSpacing( 6 );
36   GroupLimitLayout->setMargin( 11 );
37
38   IdPoint = new QLabel( tr( "IdPoint" ), GroupLimit, "IdPoint" );
39   QFont IdPoint_font = IdPoint->font();
40   IdPoint_font.setBold( TRUE );
41   IdPoint->setFont( IdPoint_font ); 
42   IdPoint->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight );
43   IdPoint->setFrameStyle( QLabel::Box | QLabel::Plain );
44   IdPoint->setMargin( 5 );
45   QHBoxLayout* IdLayout = new QHBoxLayout;
46   IdLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
47   IdLayout->addWidget( IdPoint );
48   GroupLimitLayout->addMultiCellLayout( IdLayout, 0, 0, 0, 2 );
49
50   CoordPointX = new QLabel( tr( "X:" ), GroupLimit, "CoordPointX" );
51   CoordX = new QLineEdit( GroupLimit );
52   CoordX->setReadOnly( true );
53
54   CoordPointY = new QLabel( tr( "Y:" ), GroupLimit, "CoordPointY" );
55   CoordY = new QLineEdit( GroupLimit );
56   CoordY->setReadOnly( true );
57
58   CoordPointZ = new QLabel( tr( "Z:" ), GroupLimit, "CoordPointZ" );
59   CoordZ = new QLineEdit( GroupLimit );
60   CoordZ->setReadOnly( true );
61
62   QHBoxLayout* XYZLayout = new QHBoxLayout; XYZLayout->setMargin( 0 ); XYZLayout->setSpacing( 6 );
63   XYZLayout->addWidget( CoordPointX );
64   XYZLayout->addWidget( CoordX );
65   XYZLayout->addWidget( CoordPointY );
66   XYZLayout->addWidget( CoordY );
67   XYZLayout->addWidget( CoordPointZ );
68   XYZLayout->addWidget( CoordZ );
69   GroupLimitLayout->addMultiCellLayout( XYZLayout, 1, 1, 0, 2 );
70
71   GroupLimitLayout->addRowSpacing( 2, 10 );
72
73   Scalar_Results = new QLabel( tr( "Scalar result :" ), GroupLimit, "Scalar_Results" );
74   GroupLimitLayout->addWidget( Scalar_Results, 3, 0 );
75   ScalValue = new QLabel( tr( "Scalar Value" ), GroupLimit, "ScalValue" );
76   GroupLimitLayout->addWidget( ScalValue, 3, 1 );
77   GroupLimitLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 3, 2 );
78   
79   Vector_Results = new QLabel( tr( "Vector result :" ), GroupLimit, "Vector_Results" );
80   GroupLimitLayout->addWidget( Vector_Results, 4, 0 );
81   VectTxt = new QLabel( tr( "Vector Txt" ), GroupLimit, "VectTxt" );
82   GroupLimitLayout->addWidget( VectTxt, 4, 1 );
83   GroupLimitLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 4, 2 );
84
85   GroupButtons = new QGroupBox( this, "GroupButtons" );
86   GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) ); 
87   GroupButtons->setTitle( tr( ""  ) );
88   GroupButtons->setColumnLayout(0, Qt::Vertical );
89   GroupButtons->layout()->setSpacing( 0 );
90   GroupButtons->layout()->setMargin( 0 );
91   QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
92   GroupButtonsLayout->setAlignment( Qt::AlignTop );
93   GroupButtonsLayout->setSpacing( 6 );
94   GroupButtonsLayout->setMargin( 11 );
95
96   buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
97   buttonOk->setAutoDefault( TRUE );
98   buttonOk->setDefault( TRUE );
99   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 0 );
100   GroupButtonsLayout->addWidget( buttonOk, 0, 1 );
101   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2 );
102   
103   TopLayout->addWidget( GroupLimit,   0, 0 );
104   TopLayout->addWidget( GroupButtons, 1, 0 );
105
106   // signals and slots connections
107   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
108 }
109
110 /*!
111   Destructor
112 */
113 VisuGUI_PointsResultsDlg::~VisuGUI_PointsResultsDlg()
114 {
115 }
116
117
118
119
120
121
122