1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VisuGUI_PointsResultsDlg.cxx
25 // Author : Laurent CORNABE & Hubert ROLLAND
30 #include "VisuGUI_PointsResultsDlg.h"
36 VisuGUI_PointsResultsDlg::VisuGUI_PointsResultsDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
37 : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
40 setName( "VisuGUI_PointsResultsDlg" );
41 setCaption( tr( "Results at selected point" ) );
42 setSizeGripEnabled( TRUE );
44 QGridLayout* TopLayout = new QGridLayout( this );
45 TopLayout->setSpacing( 6 );
46 TopLayout->setMargin( 11 );
48 GroupLimit = new QGroupBox( this, "GroupLimit" );
49 GroupLimit->setTitle( tr( "Results at Point" ) );
50 GroupLimit->setColumnLayout(0, Qt::Vertical );
51 GroupLimit->layout()->setSpacing( 0 );
52 GroupLimit->layout()->setMargin( 0 );
53 QGridLayout* GroupLimitLayout = new QGridLayout( GroupLimit->layout() );
54 GroupLimitLayout->setAlignment( Qt::AlignTop );
55 GroupLimitLayout->setSpacing( 6 );
56 GroupLimitLayout->setMargin( 11 );
58 IdPoint = new QLabel( tr( "IdPoint" ), GroupLimit, "IdPoint" );
59 QFont IdPoint_font = IdPoint->font();
60 IdPoint_font.setBold( TRUE );
61 IdPoint->setFont( IdPoint_font );
62 IdPoint->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight );
63 IdPoint->setFrameStyle( QLabel::Box | QLabel::Plain );
64 IdPoint->setMargin( 5 );
65 QHBoxLayout* IdLayout = new QHBoxLayout;
66 IdLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
67 IdLayout->addWidget( IdPoint );
68 GroupLimitLayout->addMultiCellLayout( IdLayout, 0, 0, 0, 2 );
70 CoordPointX = new QLabel( tr( "X:" ), GroupLimit, "CoordPointX" );
71 CoordX = new QLineEdit( GroupLimit );
72 CoordX->setReadOnly( true );
74 CoordPointY = new QLabel( tr( "Y:" ), GroupLimit, "CoordPointY" );
75 CoordY = new QLineEdit( GroupLimit );
76 CoordY->setReadOnly( true );
78 CoordPointZ = new QLabel( tr( "Z:" ), GroupLimit, "CoordPointZ" );
79 CoordZ = new QLineEdit( GroupLimit );
80 CoordZ->setReadOnly( true );
82 QHBoxLayout* XYZLayout = new QHBoxLayout; XYZLayout->setMargin( 0 ); XYZLayout->setSpacing( 6 );
83 XYZLayout->addWidget( CoordPointX );
84 XYZLayout->addWidget( CoordX );
85 XYZLayout->addWidget( CoordPointY );
86 XYZLayout->addWidget( CoordY );
87 XYZLayout->addWidget( CoordPointZ );
88 XYZLayout->addWidget( CoordZ );
89 GroupLimitLayout->addMultiCellLayout( XYZLayout, 1, 1, 0, 2 );
91 GroupLimitLayout->addRowSpacing( 2, 10 );
93 Scalar_Results = new QLabel( tr( "Scalar result :" ), GroupLimit, "Scalar_Results" );
94 GroupLimitLayout->addWidget( Scalar_Results, 3, 0 );
95 ScalValue = new QLabel( tr( "Scalar Value" ), GroupLimit, "ScalValue" );
96 GroupLimitLayout->addWidget( ScalValue, 3, 1 );
97 GroupLimitLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 3, 2 );
99 Vector_Results = new QLabel( tr( "Vector result :" ), GroupLimit, "Vector_Results" );
100 GroupLimitLayout->addWidget( Vector_Results, 4, 0 );
101 VectTxt = new QLabel( tr( "Vector Txt" ), GroupLimit, "VectTxt" );
102 GroupLimitLayout->addWidget( VectTxt, 4, 1 );
103 GroupLimitLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 4, 2 );
105 GroupButtons = new QGroupBox( this, "GroupButtons" );
106 GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
107 GroupButtons->setTitle( tr( "" ) );
108 GroupButtons->setColumnLayout(0, Qt::Vertical );
109 GroupButtons->layout()->setSpacing( 0 );
110 GroupButtons->layout()->setMargin( 0 );
111 QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
112 GroupButtonsLayout->setAlignment( Qt::AlignTop );
113 GroupButtonsLayout->setSpacing( 6 );
114 GroupButtonsLayout->setMargin( 11 );
116 buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
117 buttonOk->setAutoDefault( TRUE );
118 buttonOk->setDefault( TRUE );
119 GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 0 );
120 GroupButtonsLayout->addWidget( buttonOk, 0, 1 );
121 GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2 );
123 TopLayout->addWidget( GroupLimit, 0, 0 );
124 TopLayout->addWidget( GroupButtons, 1, 0 );
126 // signals and slots connections
127 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
133 VisuGUI_PointsResultsDlg::~VisuGUI_PointsResultsDlg()