]> SALOME platform Git repositories - tools/eficas.git/blob - Extensions/niveau.py
Salome HOME
F.R: Plusieurs bugs corrigés pour arriver à écrire la première moitié
[tools/eficas.git] / Extensions / niveau.py
1 """
2     Ce module contient la classe NIVEAU qui sert à définir
3     des groupes de commandes dans le catalogue
4 """
5
6 class NIVEAU:
7   def __init__(self,nom='',label='',niveaux=(),valide_vide=1,actif=1):
8     self.nom = nom
9     self.label = label
10     self.statut='o'
11     self.min = 1
12     self.max = 1
13     self.entites = []
14     self.l_noms_entites=[]
15     self.valide_vide = valide_vide
16     self.actif = actif
17     self.d_niveaux = {}
18     self.l_niveaux = niveaux
19     for niveau in niveaux:
20       self.d_niveaux[niveau.nom]=niveau
21       self.d_niveaux.update(niveau.d_niveaux)
22
23   def enregistre(self,commande):
24     self.entites.append(commande)
25     self.l_noms_entites.append(commande.nom)
26
27   def get_liste_cmd(self):
28     self.l_noms_entites.sort()
29     return self.l_noms_entites
30