Salome HOME
Portation on new based dialog
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_StandardMeshInfosDlg.cxx
1 //  SMESH SMESHGUI : GUI for SMESH component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
21 //
22 //
23 //
24 //  File   : SMESHGUI_StandardMeshInfosDlg.cxx
25 //  Author : Michael ZORIN
26 //  Module : SMESH
27 //  $Header$
28
29 #include <SMESHGUI_StandardMeshInfosDlg.h>
30
31 #include <SMESH_Type.h>
32
33 #include <qlayout.h>
34 #include <qgroupbox.h>
35 #include <qtextbrowser.h>
36
37 //=================================================================================
38 /*!
39  *  SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg
40  *
41  *  Constructor
42  */
43 //=================================================================================
44 SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg()
45 : SMESHGUI_Dialog( 0, false, false, OK )
46 {
47   setCaption(tr("SMESH_STANDARD_MESHINFO_TITLE" ));
48
49   resize( 300, 200 );
50   
51   // dialog layout
52   QVBoxLayout* main = new QVBoxLayout( mainFrame(), 0, 5 );
53
54   // mesh group box
55   QGroupBox* MeshGroup = new QGroupBox( mainFrame(), "myMeshGroup");
56   MeshGroup->setTitle(tr("SMESH_MESH"));
57   MeshGroup->setColumnLayout(3, Qt::Horizontal);
58   MeshGroup->layout()->setSpacing(0);
59   MeshGroup->layout()->setMargin(5);
60
61   createObject( tr("SMESH_NAME" ), MeshGroup, 0 );
62   setNameIndication( 0, OneName );
63   setObjectType( 0, prefix( "SMESH" ) + MESH, -1 );
64
65   main->addWidget( MeshGroup );
66
67   // information group box
68   QGroupBox* InfoGroup  = new QGroupBox( mainFrame(), "myInfoGroup");
69   InfoGroup->setTitle(tr("SMESH_INFORMATION"));
70   InfoGroup->setColumnLayout(1, Qt::Vertical);
71   InfoGroup->layout()->setSpacing(0);
72   InfoGroup->layout()->setMargin(5);
73
74   // information text browser
75   myInfo = new QTextBrowser( InfoGroup, "myInfo");
76
77   main->addWidget( InfoGroup );
78
79 }
80
81 //=================================================================================
82 /*!
83  *  SMESHGUI_StandardMeshInfosDlg::~SMESHGUI_StandardMeshInfosDlg
84  *
85  *  Destructor
86  */
87 //=================================================================================
88 SMESHGUI_StandardMeshInfosDlg::~SMESHGUI_StandardMeshInfosDlg()
89 {
90 }
91
92 //=================================================================================
93 /*!
94  *  SMESHGUI_StandardMeshInfosDlg::setInfo
95  *
96  *  Set text to text browser
97  */
98 //=================================================================================
99 void SMESHGUI_StandardMeshInfosDlg::setInfo( const QString& text )
100 {
101   myInfo->setText( text );
102 }