1 # Copyright (C) 2013-2023 EDF
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 from qtsalome import QSqlQuery
21 from Base.tableDeBase import TableDeBase
23 class TableGroupesRef (TableDeBase):
25 TableDeBase.__init__(self,"GroupesRef")
26 self.setField(("nomGroupe","idMaillage"))
27 self.setTypeField(('str','int'),('nomGroupe'))
29 def createSqlTable(self):
31 texteQuery ="create table GroupesRef(nomGroupe varchar(40), idMaillage int,"
32 texteQuery+="foreign key (idMaillage) references Maillages(idMaillage),"
33 texteQuery+="primary key (nomGroupe,idMaillage));"
34 print("Creation de TableGroupesRef : " , query.exec_(texteQuery))
36 def getVals(self,idMaillage):
38 texteQuery ='select NomGroupe from GroupesRef where idMaillage='+str(idMaillage) +";"
40 query.exec_(texteQuery)
41 while (query.next()) :
42 listeGroupes.append(str(query.value(0).toString()))
48 # Groupe pour le script du tunnel (fiche 7566)
49 # self.insereLigne(('FRONT_07',1))
50 # self.insereLigne(('FOND_07',1))
51 # self.insereLigne(('PAROI_07',1))
52 # self.insereLigne(('ROCHE_07',1))
53 # self.insereLigne(('FOND_16',1))
54 # self.insereLigne(('PAROI_16',1))
55 # self.insereLigne(('ROCHE_16',1))
56 # Groupe pour le script de l'attache d'une ailette (fiche 7957)
57 # self.insereLigne(('RAIN_JONC',2))
58 # self.insereLigne(('EXT_CRAN',2))
59 # self.insereLigne(('ENV_E',2))
60 # self.insereLigne(('ENV_I',2))