Salome HOME
First working version
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_CreateDualMeshDlg.cxx
1 // Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File   : SMESHGUI_CreateDualMeshDlg.cxx
25 // Author : Yoann AUDOUIN (EDF)
26 // SMESH includes
27 //
28 #include "SMESHGUI_CreateDualMeshDlg.h"
29
30 #include "SMESHGUI_CreateDualMeshOp.h"
31
32 // Qt includes
33 #include <QGroupBox>
34 #include <QCheckBox>
35 #include <QRadioButton>
36 #include <QButtonGroup>
37 #include <QGroupBox>
38 #include <QFrame>
39 #include <QHBoxLayout>
40 #include <QGridLayout>
41 #include <QLabel>
42
43 #define SPACING 6
44 #define MARGIN  11
45
46 SMESHGUI_CreateDualMeshDlg::SMESHGUI_CreateDualMeshDlg()
47   : SMESHGUI_Dialog( 0, false, true )
48 {
49   setWindowTitle( tr( "CAPTION" ) );
50
51   // Create top controls
52
53   // mesh
54   setObjectPixmap( "SMESH", tr( "ICON_SELECT" ) );
55   createObject( tr( "MESH" ), mainFrame(), 0 );
56
57   myWarning = new QLabel(QString("<b>%1</b>").arg(tr("NON_TETRA_MESH_WARNING")), mainFrame());
58
59   // Fill layout
60   QGridLayout* aLay = new QGridLayout( mainFrame() );
61   aLay->setMargin( 5 );
62   aLay->setSpacing( 5 );
63
64   aLay->addWidget( objectWg( 0,  Label ),   0, 0 );
65   aLay->addWidget( objectWg( 0,  Btn ),     0, 1 );
66   aLay->addWidget( objectWg( 0,  Control ), 0, 2 );
67   aLay->addWidget( myWarning,               3, 0, 1, 3 );
68
69 }
70
71 SMESHGUI_CreateDualMeshDlg::~SMESHGUI_CreateDualMeshDlg()
72 {
73 }
74
75 void SMESHGUI_CreateDualMeshDlg::ShowWarning(bool toShow)
76 {
77   if ( toShow )
78     myWarning->show();
79   else
80     myWarning->hide();
81 }
82
83 bool SMESHGUI_CreateDualMeshDlg::isWarningShown()
84 {
85   return myWarning->isVisible();
86 }