فهرست منبع

Poursuite de la refonte de l'écran d'édition des attaques (encore buggé)

unknown 10 سال پیش
والد
کامیت
2193d052f5
11فایلهای تغییر یافته به همراه470 افزوده شده و 255 حذف شده
  1. BIN
      img/corbeille.png
  2. 14 4
      lib/Actions.py
  3. 15 9
      lib/EcranEditionCombattant.py
  4. 1 0
      lib/Plateau.py
  5. BIN
      lib/biblio/combattant
  6. 5 0
      lib/test.py
  7. 193 47
      lib/ui/dm.py
  8. 2 2
      lib/ui/dmtableattaques.py
  9. 104 97
      lib/ui/ecran_editionCombattant.py
  10. 136 96
      lib/ui/editionCombattant.ui
  11. BIN
      lib/ui/img/corbeille.png

BIN
img/corbeille.png


+ 14 - 4
lib/Actions.py

@@ -171,6 +171,7 @@ class Attaque(Action):
     def __init__(self):
         super(Attaque, self).__init__()
         self._nom = "Attaque"
+        self._icone = ""
         self._portee = 1   #portee max en cases
         self._rayon = 0
         self._attributs = regles.listeAttributsAttaques()
@@ -215,6 +216,9 @@ class Attaque(Action):
             if regles.attributAttaque(nom).controler(nouvelleVal):
                 self._attributs[nom] = nouvelleVal
 
+    def majAttributs(self, dicoAttributs):
+        self._attributs = dicoAttributs
+    
     def attributs(self):
         return self._attributs
 
@@ -225,7 +229,10 @@ class Attaque(Action):
         #on limite a 400 le nombre de caracteres
         notes = str(notes)
         self._notes = notes[0:400]
-       
+
+    def icone(self):
+        return QIcon(self._icone)
+ 
 class Cac(Attaque):
     """attaque au corps a corps"""
     def __init__(self):
@@ -233,7 +240,8 @@ class Cac(Attaque):
         self._nom = "Attaque au corps-à-corps"
         self._pionCible = None
         self._sourceCurseur = ""
-        self._nomBouton = "pi_attaqueCac" 
+        self._nomBouton = "pi_attaqueCac"
+        self._icone = "img\\curseurEpee.png"
 
     def typeAtt(self):
         return "cac"
@@ -273,7 +281,8 @@ class Distance(Attaque):
         self._itemLigne = None
         self._pionCible = None
         self._sourceCurseur = ""
-        self._nomBouton = "pi_attaqueDist" 
+        self._nomBouton = "pi_attaqueDist"
+        self._icone = "img\\curseurArc.png"
 
     def typeAtt(self):
         return "dist"
@@ -344,7 +353,8 @@ class Zone(Attaque):
         self._itemCible = None
         self._casesCibles = []
         self._sourceCurseur = ""
-        self._nomBouton = "pi_attaqueZone" 
+        self._nomBouton = "pi_attaqueZone"
+        self._icone = "img\\baguette.png"
 
     def typeAtt(self):
         return "zone"

+ 15 - 9
lib/EcranEditionCombattant.py

@@ -9,6 +9,7 @@ from ui.ecran_editionCombattant import Ui_edc_fenetre
 from outilsSvg import *
 from VueEditionForme import VueEditionForme
 import regles
+import Actions
 import ui.dm as dm
 
 
@@ -62,13 +63,13 @@ class EcranEditionCombattant(QDialog):
         self.connect(self.ui.edc_logo, SIGNAL("imageModifiee()"), self.logoModifie)
         self.vueForme = VueEditionForme(self)
         
-
         self.ui.edc_listeAttributs.setColumnWidth(0, (0.4*self.ui.edc_listeAttributs.width())) 
         self.ui.edc_listeAttributs.setColumnWidth(1, (0.4*self.ui.edc_listeAttributs.width()))
         self.connect(self.ui.edc_listeAttributs, SIGNAL("cellChanged(int,int)"), self.listeAttributCelluleModifiee, Qt.UniqueConnection)
 
-##        self.connect(self.ui.edc_nouvelleAttaque, SIGNAL("clicked()"), self.nouvelleAttaque)
-##        self.connect(self.ui.edc_supprimerAttaque, SIGNAL("clicked()"), self.supprimerAttaque)
+
+        self.connect(self.ui.edc_attaque_ajouter, SIGNAL("clicked()"), self.nouvelleAttaque)
+        self.connect(self.ui.edc_attaque_supprimer, SIGNAL("clicked()"), self.supprimerAttaque)
 
 ##        self.ui.listeInventaireCombattant.setColumnWidth(0, (0.2*self.ui.listeInventaireCombattant.width()))
 ##        self.ui.listeInventaireCombattant.setColumnWidth(1, (0.8*self.ui.listeInventaireCombattant.width()))
@@ -104,9 +105,11 @@ class EcranEditionCombattant(QDialog):
         self.majListeAttributs()
 
         #page attaques
-        self.ui.edc_attaque_panneau.maj()
-##        self.ui.edc_listeAttaques.construire()
-##        self.ui.edc_listeAttaques.charger(self.combattant.attaques)
+        print "charge", self.combattant.attaques
+        self.ui.edc_attaque_panneau.construire(self)
+        self.ui.edc_attaque_liste.charger(self, self.combattant.attaques)
+        
+
 
         #page inventaire
         #self.majListeInventaire()
@@ -211,11 +214,13 @@ class EcranEditionCombattant(QDialog):
 
     def nouvelleAttaque(self):
         """ajoute une nouvelle ligne a la liste des attaques"""
-        self.ui.edc_listeAttaques.nouvelle()
+        self.ui.edc_attaque_liste.nouvelle()
 
     def supprimerAttaque(self):
         """supprime la ligne selectionnee de la liste des attaques"""
-        self.ui.edc_listeAttaques.supprimer()
+        if self.ui.edc_attaque_liste.ligneSelectionnee():
+            self.ui.edc_attaque_panneau.reinit()
+            self.ui.edc_attaque_liste.supprimer()
 
     def enregistrer(self):
         """enregistre le terrain cree/edite"""
@@ -243,7 +248,8 @@ class EcranEditionCombattant(QDialog):
         #dans listeAttributCelluleModifiee
 
         #page attaque
-        self.combattant.attaques = self.ui.edc_listeAttaques.listeAttaques()
+        print "svg", self.ui.edc_attaque_liste.listeAttaques()
+        self.combattant.attaques = self.ui.edc_attaque_liste.listeAttaques()
 
         #page inventaire
         #a voir...

+ 1 - 0
lib/Plateau.py

@@ -885,6 +885,7 @@ class Plateau(QGraphicsScene):
         """met a jour les infos de l'attaque en cours (selectionnee)"""
         selection = self.fenetre.ui.pi_listeAttaques.selectedItems()
         self.fenetre.ui.pi_panneauAttaqueEC.setVisible(self.pionSelectionne() != None and len(selection) > 0)
+        
         if self.pionSelectionne() != None and len(selection) > 0:
             ligne = selection[0].row()
             numAttaque = int(str(self.fenetre.ui.pi_listeAttaques.item(ligne, 0).text().toUtf8()))

BIN
lib/biblio/combattant


+ 5 - 0
lib/test.py

@@ -0,0 +1,5 @@
+from Actions import *
+
+a = Cac()
+
+print isinstance(a, Attaque)

+ 193 - 47
lib/ui/dm.py

@@ -4,6 +4,8 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 from lib.outilsSvg import *
+import lib.regles as regles
+from lib.Actions import *
 
 class DmLabel(QLabel):
     """surcharge de QLabel"""
@@ -76,7 +78,7 @@ class DmTextEdit(QTextEdit):
         self.setText(QString.fromUtf8(str(txt)))    
 
     def texte(self):
-        return str(self.text().toUtf8())
+        return str(self.toPlainText().toUtf8())
 
 class DmLineEdit(QLineEdit):
     def __init__(self, parent = None):
@@ -168,12 +170,15 @@ class DmTableWidget(QTableWidget):
         self.item(ligne, colonne).setData(0, var)
         return True
     
-    def majTexte(ligne, colonne, texte):
+    def majTexte(self, ligne, colonne, texte):
         """met a jour la cellule avec du texte"""
-        self.item(ligne, colonne).setText(QString.fromUtf8(str(texte)))
+        if not self.item(ligne, colonne):
+            self.setItem(ligne, colonne, QTableWidgetItem(QString.fromUtf8(str(texte))))
+        else:
+            self.item(ligne, colonne).setText(QString.fromUtf8(str(texte)))
         return True
 
-    def majEnt(ligne, colonne, valeur):
+    def majEnt(self, ligne, colonne, valeur):
         """met a jour la cellule avec une valeur numerique entiere
            si valeur ne peut etre converti en numerique, on retourne Faux"""
         retour = False
@@ -222,13 +227,10 @@ class DmTableWidget(QTableWidget):
 
     def ligneSelectionnee(self):
         """renvoie la ligne selectionnee (la premiere si plusieurs le sont)"""
-        retour = None
-        if self.columnCount() > 0:
-            for i in range(0, self.rowCount()):
-                if self.item(i,0).isSelected():
-                    retour = i
-                    break
-        return retour
+        return self.currentRow()
+
+    def selectionner(self, ligne, colonne):
+        self.setCurrentCell(ligne, colonne, QItemSelectionModel.Select)
 
 class DmTableBiblio(DmTableWidget):
     """table utilisee pour afficher les bibliotheques d'objets:
@@ -336,6 +338,119 @@ class DmTableAttributsPi(DmTableWidget):
             objet = charger(self.fichier, str(index.text().toUtf8()))
         return objet
 
+
+class DmTableListeAttaques(DmTableWidget):
+    """liste des attaques du combattant"""
+    def __init__(self, parent = None):
+        super(DmTableListeAttaques, self).__init__(parent)
+        self.panneau = None
+        self._listeAttaques = []
+        self.connect(self, SIGNAL("currentCellChanged(int, int, int, int)"), self.selectionChangee)
+
+    def listeAttaques(self):
+        #on recupere les donnees de l'attaque en cours avant d'exporter la liste
+        self.enregistrerPanneau(self.ligneSelectionnee())
+        return self._listeAttaques
+
+    def attaqueSelectionnee(self):
+        """renvoie l'attaque selectionnee"""
+        retour = None
+        if len(self._listeAttaques) > 0 and self.ligneSelectionnee() != None:
+            retour = self._listeAttaques[self.ligneSelectionnee()]
+        return retour
+
+    def majAttaque(self, index, nouvelle):
+        """met a jour les donnees de l'attaque en position x"""
+        self._listeAttaques[index] = nouvelle
+
+    def charger(self, fenetre, listeAttaques):
+        self.panneau = fenetre.ui.edc_attaque_panneau
+        self._listeAttaques = listeAttaques
+        self.peupler()
+        self.selectionner(0, 0)
+        self.majPanneau()
+        
+    def peupler(self):
+        self.vider()
+        for attaque in self._listeAttaques:
+            ligne = self.nouvelleLigneFin()
+            self.setItem(ligne, 0, QTableWidgetItem(attaque.icone(), QString.fromUtf8(attaque.nom())))      
+
+    def majPanneau(self):
+        """met a jour les donnees du panneau"""
+        self.panneau.chargerAttaque(self.attaqueSelectionnee())
+
+    def enregistrerPanneau(self, ligne):
+        """enregistre les donnees du panneau sur l'attaque de la ligne"""
+        attaque = self.panneau.attaque()
+        if attaque:
+            self._listeAttaques[ligne] = attaque
+        self.peupler()
+
+    def nouvelle(self):
+        attaque = Cac()
+        self._listeAttaques.append(attaque)
+        self.peupler()
+        self.selectionner(self.rowCount(), 0)
+        
+    def supprimer(self):
+        """supprime l'attaque actuellement selectionnee"""
+##        ligne = self.ligneSelectionnee()
+        self._listeAttaques.remove(self.attaqueSelectionnee())
+        self.peupler()
+##        self.selectionner(ligne, 0)
+##        self.removeRow(self.ligneSelectionnee())
+
+    def selectionChangee(self, ancienneLigne, ancienneColonne, ligne, colonne):
+        self.enregistrerPanneau(ancienneLigne)
+        self.panneau.chargerAttaque(None)
+        self.majPanneau()
+##        self.emit(SIGNAL("selectionChangee(int, int)"), ancienneLigne, ligne)
+        
+
+
+class DmTableAttributsAttaque(DmTableWidget):
+    """table contenant les attributs (selon regles) d'une attaque"""
+    def __init__(self, parent = None):
+        super(DmTableAttributsAttaque, self).__init__(parent)
+        self._constr = False
+
+    def attributs(self):
+        """retourne un dictionnaire contenant les attributs"""
+        dico = {}
+        for ligne in self.lignes():
+            nomAttr = regles.ordreAttributsAttaques()[ligne]
+            dico[nomAttr] = regles.attributAttaque(nomAttr).controler(self.texte(ligne, 1))
+        return dico
+
+    def construire(self):
+        """cree les lignes et remplit la colonne des noms d'attributs"""
+        for nomAttribut in regles.ordreAttributsAttaques():
+            attribut = regles.attributAttaque(nomAttribut)
+            ligne = self.nouvelleLigneFin()
+            self.majTexte(ligne, 0, attribut.nom)
+            self.majTexte(ligne, 1, "")
+        self._constr = True
+            
+    def charger(self, attributs):
+        """charge les attributs d'une attaque"""
+        self.decharger()
+        for ligne in self.lignes():
+            attr = regles.ordreAttributsAttaques()[ligne]
+            valeur = attributs[attr]
+            self.majTexte(ligne, 1, valeur)
+
+    def decharger(self):
+        """efface les valeurs de la colonne des valeurs,
+            mais laisse intacte la colonne des noms d'attributs"""
+        if not self._constr:
+            self.contruire()
+        else:
+            for ligne in self.lignes():
+                self.majTexte(ligne, 1, "")
+        
+
+
 class DmTableMenu(QTableWidget):
     """table utilisee comme barre d'onglets verticale"""
     def __init__(self, parent = None):
@@ -396,53 +511,84 @@ class DmFrame(QFrame):
     def __init__(self, parent = None):
         super(DmFrame, self).__init__(parent)
 
-    def widget(self, nom):
-        """recupere la ref au widget enfant / attention, pas ideal en terme de perf"""
-        widget = None
-        for widget in self.children():
-            if widget.objectName() == nom:
-                print nom, widget.__class__.__name__
-                retour = widget
-                break
-        return widget
-
-
-
-
 class DmEdcPanneauAttaque(DmFrame):
     """frame contenant les donnees de l'attaque actuellement
         affichee lors de la creation de combattant"""
-    def __init__(self, fenetre, parent = None):
+    def __init__(self, parent = None):
         super(DmEdcPanneauAttaque, self).__init__(parent)
+        self.fenetre = None
 
-##    def widget(self, nom):
-##        """surcharge de la fonction de DmFrame"""
-##        return super(DmEdcPanneauAttaque, self).widget(nom)
+    def construire(self, fenetre):
+        self.fenetre = fenetre
+        self.fenetre.ui.edc_attaque_attributs.vider()
+        self.fenetre.ui.edc_attaque_attributs.construire()
+        self.chargerAttaque(None)
+##        self.connect(self.fenetre.ui.edc_attaque_liste, SIGNAL("selectionChangee(int, int)"), self.listeSelectionChangee)
 
-    def maj(self, attaque = None):
+    def chargerAttaque(self, attaque = None):
         """met a jour le contenu avec les donnees de l'attaque en param"""
         if attaque:
-##            self.widget("edc_attaque_type").setCurrentIndex(0)
-            self.widget("edc_attaque_nom").majTexte(attaque.nom())
-            self.widget("edc_attaque_portee").setValue(attaque.portee())
-            self.widget("edc_attaque_rayon").setValue(attaque.rayon())
-##            self.widget("edc_attaque_attributs").vider()
-            self.widget("edc_attaque_notes").majTexte(attaque.notes())
+            self.setEnabled(True)
+            if isinstance(attaque, Cac):
+                self.fenetre.ui.edc_attaque_type.setCurrentIndex(0)
+            elif isinstance(attaque, Distance):
+                self.fenetre.ui.edc_attaque_type.setCurrentIndex(1)
+            elif isinstance(attaque, Zone):
+                self.fenetre.ui.edc_attaque_type.setCurrentIndex(2)
+                self.fenetre.ui.edc_attaque_forme.setVisible(True)
+                self.fenetre.ui.edc_attaque_forme_e.setVisible(True)
+                if isinstance(attaque, Ligne):
+                    self.fenetre.ui.edc_attaque_forme.setCurrentIndex(0)
+                elif isinstance(attaque, Disque):
+                    self.fenetre.ui.edc_attaque_forme.setCurrentIndex(1)
+                    self.fenetre.ui.edc_attaque_rayon.setValue(attaque.rayon())
+                    self.fenetre.ui.edc_attaque_rayon.setVisible(True)
+                    self.fenetre.ui.edc_attaque_rayon_e.setVisible(True)
+                elif isinstance(attaque, Cone):
+                    self.fenetre.ui.edc_attaque_forme.setCurrentIndex(2)
+                    
+            self.fenetre.ui.edc_attaque_nom.majTexte(attaque.nom())
+            self.fenetre.ui.edc_attaque_portee.setValue(attaque.portee())
+            self.fenetre.ui.edc_attaque_attributs.charger(attaque.attributs())
+            self.fenetre.ui.edc_attaque_notes.majTexte(attaque.notes())
         else:
-            self.reinit()
+            self.fenetre.ui.edc_attaque_type.setCurrentIndex(0)
+            self.fenetre.ui.edc_attaque_nom.majTexte("")
+            self.fenetre.ui.edc_attaque_portee.setValue(1)
+            self.fenetre.ui.edc_attaque_forme.setCurrentIndex(0)
+            self.fenetre.ui.edc_attaque_forme.setVisible(False)
+            self.fenetre.ui.edc_attaque_forme_e.setVisible(False)
+            self.fenetre.ui.edc_attaque_rayon.setValue(1)
+            self.fenetre.ui.edc_attaque_rayon.setVisible(False)
+            self.fenetre.ui.edc_attaque_rayon_e.setVisible(False)
+            self.fenetre.ui.edc_attaque_attributs.decharger()
+            self.fenetre.ui.edc_attaque_notes.majTexte("")
             self.setEnabled(False)
 
-    def reinit(self):
-##        self.widget("edc_attaque_type").setCurrentIndex(0)
-        self.widget("edc_attaque_nom").majTexte("")
-        self.widget("edc_attaque_portee").setValue(1)
-        self.widget("edc_attaque_rayon").setValue(1)
-        self.widget("edc_attaque_rayon").setVisible(False)
-##        self.widget("edc_attaque_attributs").vider()
-        self.widget("edc_attaque_notes").majTexte("")
-        
-    
-
+    def attaque(self):
+        """retourne l'attaque en cours"""
+        attaque = None
+        if self.isEnabled():
+            if self.fenetre.ui.edc_attaque_type.currentIndex() == 0:
+                attaque = Cac()
+            elif self.fenetre.ui.edc_attaque_type.currentIndex() == 1:
+                attaque = Distance()
+            elif self.fenetre.ui.edc_attaque_type.currentIndex() == 2:
+                if self.fenetre.ui.edc_attaque_forme.currentIndex() == 0:
+                    attaque = Ligne()
+                elif self.fenetre.ui.edc_attaque_forme.currentIndex() == 1:
+                    attaque = Disque()
+                    attaque.majRayon(self.fenetre.ui.edc_attaque_rayon.value())
+                elif self.fenetre.ui.edc_attaque_forme.currentIndex() == 2:
+                    attaque = Cone()
+
+            nom = self.fenetre.ui.edc_attaque_nom.texte()
+            if len(nom) == 0: nom = "Attaque"
+            attaque.majNom(nom)
+            attaque.majPortee(self.fenetre.ui.edc_attaque_portee.value())
+            attaque.majAttributs(self.fenetre.ui.edc_attaque_attributs.attributs())
+            attaque.majNotes(self.fenetre.ui.edc_attaque_notes.texte())
+        return attaque 
 
 
 

+ 2 - 2
lib/ui/dmtableattaques.py

@@ -96,8 +96,8 @@ class DmTableAttaques(DmTableWidget):
         ligne = 0
         for attaque in listeAttaques:
             #controle du type d'attaque
-            if attaque.typeAtt() in ["cac", "dist", "ligne", "disque", "cone"]:
-                if attaque.typeAtt() in ["ligne", "disque", "cone"]:
+            if isinstance(attaque, Attaque):
+                if attaque.__class__.__name__ in ["ligne", "disque", "cone"]:
                     typeAtt = "zone"
                     formeAtt = attaque.typeAtt()
                 else:

+ 104 - 97
lib/ui/ecran_editionCombattant.py

@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'editionCombattant.ui'
 #
-# Created: Tue Jun 09 17:05:33 2015
+# Created: Thu Jun 11 16:01:01 2015
 #      by: PyQt4 UI code generator 4.10.4
 #
 # WARNING! All changes made in this file will be lost!
@@ -27,7 +27,7 @@ class Ui_edc_fenetre(object):
     def setupUi(self, edc_fenetre):
         edc_fenetre.setObjectName(_fromUtf8("edc_fenetre"))
         edc_fenetre.setWindowModality(QtCore.Qt.ApplicationModal)
-        edc_fenetre.resize(657, 484)
+        edc_fenetre.resize(677, 484)
         edc_fenetre.setMinimumSize(QtCore.QSize(0, 484))
         edc_fenetre.setMaximumSize(QtCore.QSize(16777215, 10000))
         self.horizontalLayout_2 = QtGui.QHBoxLayout(edc_fenetre)
@@ -219,7 +219,7 @@ class Ui_edc_fenetre(object):
         self.page_nom = QtGui.QWidget()
         self.page_nom.setObjectName(_fromUtf8("page_nom"))
         self.edc_nom = DmLineEdit(self.page_nom)
-        self.edc_nom.setGeometry(QtCore.QRect(110, 40, 271, 31))
+        self.edc_nom.setGeometry(QtCore.QRect(160, 10, 271, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -253,7 +253,7 @@ class Ui_edc_fenetre(object):
         self.label_8.setFont(font)
         self.label_8.setObjectName(_fromUtf8("label_8"))
         self.frame_2 = QtGui.QFrame(self.page_nom)
-        self.frame_2.setGeometry(QtCore.QRect(30, 90, 371, 361))
+        self.frame_2.setGeometry(QtCore.QRect(110, 60, 371, 361))
         self.frame_2.setFrameShape(QtGui.QFrame.WinPanel)
         self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
         self.frame_2.setObjectName(_fromUtf8("frame_2"))
@@ -275,20 +275,20 @@ class Ui_edc_fenetre(object):
         self.edc_vueForme.setRenderHints(QtGui.QPainter.Antialiasing|QtGui.QPainter.HighQualityAntialiasing|QtGui.QPainter.TextAntialiasing)
         self.edc_vueForme.setObjectName(_fromUtf8("edc_vueForme"))
         self.edc_image = QtGui.QToolButton(self.frame_2)
-        self.edc_image.setGeometry(QtCore.QRect(330, 50, 31, 31))
+        self.edc_image.setGeometry(QtCore.QRect(330, 260, 31, 31))
         icon6 = QtGui.QIcon()
         icon6.addPixmap(QtGui.QPixmap(_fromUtf8("img/portrait.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_image.setIcon(icon6)
         self.edc_image.setIconSize(QtCore.QSize(22, 22))
         self.edc_image.setObjectName(_fromUtf8("edc_image"))
         self.edc_couleur = QtGui.QToolButton(self.frame_2)
-        self.edc_couleur.setGeometry(QtCore.QRect(330, 10, 31, 31))
+        self.edc_couleur.setGeometry(QtCore.QRect(330, 220, 31, 31))
         icon7 = QtGui.QIcon()
         icon7.addPixmap(QtGui.QPixmap(_fromUtf8("img/btnCouleurs.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_couleur.setIcon(icon7)
         self.edc_couleur.setObjectName(_fromUtf8("edc_couleur"))
         self.edc_aideForme = QtGui.QToolButton(self.frame_2)
-        self.edc_aideForme.setGeometry(QtCore.QRect(330, 270, 31, 31))
+        self.edc_aideForme.setGeometry(QtCore.QRect(330, 300, 31, 31))
         icon8 = QtGui.QIcon()
         icon8.addPixmap(QtGui.QPixmap(_fromUtf8("img/aide.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_aideForme.setIcon(icon8)
@@ -304,14 +304,14 @@ class Ui_edc_fenetre(object):
         self.page_dep = QtGui.QWidget()
         self.page_dep.setObjectName(_fromUtf8("page_dep"))
         self.label_9 = QtGui.QLabel(self.page_dep)
-        self.label_9.setGeometry(QtCore.QRect(50, 100, 391, 31))
+        self.label_9.setGeometry(QtCore.QRect(70, 100, 391, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_9.setFont(font)
         self.label_9.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_9.setObjectName(_fromUtf8("label_9"))
         self.edc_depMarche = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_depMarche.setGeometry(QtCore.QRect(220, 140, 51, 31))
+        self.edc_depMarche.setGeometry(QtCore.QRect(240, 140, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -332,14 +332,14 @@ class Ui_edc_fenetre(object):
         self.edc_depMarche.setProperty("value", 8.0)
         self.edc_depMarche.setObjectName(_fromUtf8("edc_depMarche"))
         self.label_10 = QtGui.QLabel(self.page_dep)
-        self.label_10.setGeometry(QtCore.QRect(110, 140, 101, 31))
+        self.label_10.setGeometry(QtCore.QRect(130, 140, 101, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_10.setFont(font)
         self.label_10.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_10.setObjectName(_fromUtf8("label_10"))
         self.edc_depNage = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_depNage.setGeometry(QtCore.QRect(220, 180, 51, 31))
+        self.edc_depNage.setGeometry(QtCore.QRect(240, 180, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -360,14 +360,14 @@ class Ui_edc_fenetre(object):
         self.edc_depNage.setProperty("value", 4.0)
         self.edc_depNage.setObjectName(_fromUtf8("edc_depNage"))
         self.label_11 = QtGui.QLabel(self.page_dep)
-        self.label_11.setGeometry(QtCore.QRect(110, 180, 81, 31))
+        self.label_11.setGeometry(QtCore.QRect(130, 180, 81, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_11.setFont(font)
         self.label_11.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_11.setObjectName(_fromUtf8("label_11"))
         self.edc_depEscalade = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_depEscalade.setGeometry(QtCore.QRect(220, 220, 51, 31))
+        self.edc_depEscalade.setGeometry(QtCore.QRect(240, 220, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -388,21 +388,21 @@ class Ui_edc_fenetre(object):
         self.edc_depEscalade.setProperty("value", 2.0)
         self.edc_depEscalade.setObjectName(_fromUtf8("edc_depEscalade"))
         self.label_12 = QtGui.QLabel(self.page_dep)
-        self.label_12.setGeometry(QtCore.QRect(110, 220, 91, 31))
+        self.label_12.setGeometry(QtCore.QRect(130, 220, 91, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_12.setFont(font)
         self.label_12.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_12.setObjectName(_fromUtf8("label_12"))
         self.label_13 = QtGui.QLabel(self.page_dep)
-        self.label_13.setGeometry(QtCore.QRect(110, 260, 61, 31))
+        self.label_13.setGeometry(QtCore.QRect(130, 260, 61, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_13.setFont(font)
         self.label_13.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_13.setObjectName(_fromUtf8("label_13"))
         self.edc_depVol = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_depVol.setGeometry(QtCore.QRect(220, 260, 51, 31))
+        self.edc_depVol.setGeometry(QtCore.QRect(240, 260, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -423,7 +423,7 @@ class Ui_edc_fenetre(object):
         self.edc_depVol.setProperty("value", 0.0)
         self.edc_depVol.setObjectName(_fromUtf8("edc_depVol"))
         self.edc_saut = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_saut.setGeometry(QtCore.QRect(290, 320, 51, 31))
+        self.edc_saut.setGeometry(QtCore.QRect(310, 320, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -444,39 +444,39 @@ class Ui_edc_fenetre(object):
         self.edc_saut.setProperty("value", 5.0)
         self.edc_saut.setObjectName(_fromUtf8("edc_saut"))
         self.label_14 = QtGui.QLabel(self.page_dep)
-        self.label_14.setGeometry(QtCore.QRect(50, 320, 231, 31))
+        self.label_14.setGeometry(QtCore.QRect(70, 320, 231, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_14.setFont(font)
         self.label_14.setFrameShape(QtGui.QFrame.NoFrame)
         self.label_14.setObjectName(_fromUtf8("label_14"))
         self.label_2 = QtGui.QLabel(self.page_dep)
-        self.label_2.setGeometry(QtCore.QRect(60, 140, 31, 31))
+        self.label_2.setGeometry(QtCore.QRect(80, 140, 31, 31))
         self.label_2.setText(_fromUtf8(""))
         self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("img/btnZonePlacement.png")))
         self.label_2.setScaledContents(False)
         self.label_2.setAlignment(QtCore.Qt.AlignCenter)
         self.label_2.setObjectName(_fromUtf8("label_2"))
         self.label_3 = QtGui.QLabel(self.page_dep)
-        self.label_3.setGeometry(QtCore.QRect(60, 180, 31, 31))
+        self.label_3.setGeometry(QtCore.QRect(80, 180, 31, 31))
         self.label_3.setText(_fromUtf8(""))
         self.label_3.setPixmap(QtGui.QPixmap(_fromUtf8("img/nage_24.png")))
         self.label_3.setScaledContents(False)
         self.label_3.setObjectName(_fromUtf8("label_3"))
         self.label_4 = QtGui.QLabel(self.page_dep)
-        self.label_4.setGeometry(QtCore.QRect(60, 220, 31, 31))
+        self.label_4.setGeometry(QtCore.QRect(80, 220, 31, 31))
         self.label_4.setText(_fromUtf8(""))
         self.label_4.setPixmap(QtGui.QPixmap(_fromUtf8("img/escalade_24.png")))
         self.label_4.setScaledContents(False)
         self.label_4.setObjectName(_fromUtf8("label_4"))
         self.label_5 = QtGui.QLabel(self.page_dep)
-        self.label_5.setGeometry(QtCore.QRect(60, 260, 31, 31))
+        self.label_5.setGeometry(QtCore.QRect(80, 260, 31, 31))
         self.label_5.setText(_fromUtf8(""))
         self.label_5.setPixmap(QtGui.QPixmap(_fromUtf8("img/plume_24.png")))
         self.label_5.setScaledContents(False)
         self.label_5.setObjectName(_fromUtf8("label_5"))
         self.edc_taille = QtGui.QDoubleSpinBox(self.page_dep)
-        self.edc_taille.setGeometry(QtCore.QRect(290, 60, 51, 31))
+        self.edc_taille.setGeometry(QtCore.QRect(310, 60, 51, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -497,7 +497,7 @@ class Ui_edc_fenetre(object):
         self.edc_taille.setProperty("value", 2.0)
         self.edc_taille.setObjectName(_fromUtf8("edc_taille"))
         self.label_15 = QtGui.QLabel(self.page_dep)
-        self.label_15.setGeometry(QtCore.QRect(50, 60, 231, 31))
+        self.label_15.setGeometry(QtCore.QRect(70, 60, 231, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label_15.setFont(font)
@@ -548,13 +548,13 @@ class Ui_edc_fenetre(object):
         self.page_att = QtGui.QWidget()
         self.page_att.setObjectName(_fromUtf8("page_att"))
         self.edc_attaque_ajouter = QtGui.QToolButton(self.page_att)
-        self.edc_attaque_ajouter.setGeometry(QtCore.QRect(390, 380, 31, 31))
+        self.edc_attaque_ajouter.setGeometry(QtCore.QRect(130, 380, 31, 31))
         icon9 = QtGui.QIcon()
         icon9.addPixmap(QtGui.QPixmap(_fromUtf8("img/plus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_attaque_ajouter.setIcon(icon9)
         self.edc_attaque_ajouter.setObjectName(_fromUtf8("edc_attaque_ajouter"))
-        self.edc_listeAttaques = DmTableWidget(self.page_att)
-        self.edc_listeAttaques.setGeometry(QtCore.QRect(320, 10, 141, 361))
+        self.edc_attaque_liste = DmTableListeAttaques(self.page_att)
+        self.edc_attaque_liste.setGeometry(QtCore.QRect(10, 10, 151, 361))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -565,29 +565,35 @@ class Ui_edc_fenetre(object):
         brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
         brush.setStyle(QtCore.Qt.SolidPattern)
         palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
-        self.edc_listeAttaques.setPalette(palette)
+        self.edc_attaque_liste.setPalette(palette)
         font = QtGui.QFont()
         font.setPointSize(8)
-        self.edc_listeAttaques.setFont(font)
-        self.edc_listeAttaques.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
-        self.edc_listeAttaques.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
-        self.edc_listeAttaques.setObjectName(_fromUtf8("edc_listeAttaques"))
-        self.edc_listeAttaques.setColumnCount(0)
-        self.edc_listeAttaques.setRowCount(0)
+        self.edc_attaque_liste.setFont(font)
+        self.edc_attaque_liste.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
+        self.edc_attaque_liste.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+        self.edc_attaque_liste.setGridStyle(QtCore.Qt.DotLine)
+        self.edc_attaque_liste.setObjectName(_fromUtf8("edc_attaque_liste"))
+        self.edc_attaque_liste.setColumnCount(1)
+        self.edc_attaque_liste.setRowCount(0)
+        item = QtGui.QTableWidgetItem()
+        self.edc_attaque_liste.setHorizontalHeaderItem(0, item)
+        self.edc_attaque_liste.horizontalHeader().setVisible(False)
+        self.edc_attaque_liste.horizontalHeader().setStretchLastSection(True)
+        self.edc_attaque_liste.verticalHeader().setVisible(False)
         self.edc_attaque_supprimer = QtGui.QToolButton(self.page_att)
-        self.edc_attaque_supprimer.setGeometry(QtCore.QRect(430, 380, 31, 31))
+        self.edc_attaque_supprimer.setGeometry(QtCore.QRect(90, 380, 31, 31))
         icon10 = QtGui.QIcon()
-        icon10.addPixmap(QtGui.QPixmap(_fromUtf8("img/gomme.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        icon10.addPixmap(QtGui.QPixmap(_fromUtf8("img/corbeille.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_attaque_supprimer.setIcon(icon10)
         self.edc_attaque_supprimer.setObjectName(_fromUtf8("edc_attaque_supprimer"))
         self.edc_attaque_panneau = DmEdcPanneauAttaque(self.page_att)
-        self.edc_attaque_panneau.setEnabled(False)
-        self.edc_attaque_panneau.setGeometry(QtCore.QRect(10, 10, 301, 401))
+        self.edc_attaque_panneau.setEnabled(True)
+        self.edc_attaque_panneau.setGeometry(QtCore.QRect(170, 10, 311, 401))
         self.edc_attaque_panneau.setFrameShape(QtGui.QFrame.StyledPanel)
         self.edc_attaque_panneau.setFrameShadow(QtGui.QFrame.Sunken)
         self.edc_attaque_panneau.setObjectName(_fromUtf8("edc_attaque_panneau"))
         self.edc_attaque_nom = DmLineEdit(self.edc_attaque_panneau)
-        self.edc_attaque_nom.setGeometry(QtCore.QRect(60, 10, 231, 31))
+        self.edc_attaque_nom.setGeometry(QtCore.QRect(60, 10, 241, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -616,14 +622,8 @@ class Ui_edc_fenetre(object):
         icon12.addPixmap(QtGui.QPixmap(_fromUtf8("img/arc.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_attaque_type.addItem(icon12, _fromUtf8(""))
         icon13 = QtGui.QIcon()
-        icon13.addPixmap(QtGui.QPixmap(_fromUtf8("img/formeLigne.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        icon13.addPixmap(QtGui.QPixmap(_fromUtf8("img/bombe.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.edc_attaque_type.addItem(icon13, _fromUtf8(""))
-        icon14 = QtGui.QIcon()
-        icon14.addPixmap(QtGui.QPixmap(_fromUtf8("img/formeEllipsePlein.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.edc_attaque_type.addItem(icon14, _fromUtf8(""))
-        icon15 = QtGui.QIcon()
-        icon15.addPixmap(QtGui.QPixmap(_fromUtf8("img/cone.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.edc_attaque_type.addItem(icon15, _fromUtf8(""))
         self.label_6 = QtGui.QLabel(self.edc_attaque_panneau)
         self.label_6.setGeometry(QtCore.QRect(10, 50, 51, 31))
         font = QtGui.QFont()
@@ -631,7 +631,7 @@ class Ui_edc_fenetre(object):
         self.label_6.setFont(font)
         self.label_6.setObjectName(_fromUtf8("label_6"))
         self.edc_attaque_portee = QtGui.QSpinBox(self.edc_attaque_panneau)
-        self.edc_attaque_portee.setGeometry(QtCore.QRect(70, 50, 41, 31))
+        self.edc_attaque_portee.setGeometry(QtCore.QRect(60, 50, 41, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -651,7 +651,7 @@ class Ui_edc_fenetre(object):
         self.edc_attaque_portee.setProperty("value", 1)
         self.edc_attaque_portee.setObjectName(_fromUtf8("edc_attaque_portee"))
         self.edc_attaque_rayon = QtGui.QSpinBox(self.edc_attaque_panneau)
-        self.edc_attaque_rayon.setGeometry(QtCore.QRect(200, 50, 41, 31))
+        self.edc_attaque_rayon.setGeometry(QtCore.QRect(260, 50, 41, 31))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -669,14 +669,14 @@ class Ui_edc_fenetre(object):
         self.edc_attaque_rayon.setMinimum(1)
         self.edc_attaque_rayon.setProperty("value", 1)
         self.edc_attaque_rayon.setObjectName(_fromUtf8("edc_attaque_rayon"))
-        self.label_7 = QtGui.QLabel(self.edc_attaque_panneau)
-        self.label_7.setGeometry(QtCore.QRect(140, 50, 61, 31))
+        self.edc_attaque_rayon_e = QtGui.QLabel(self.edc_attaque_panneau)
+        self.edc_attaque_rayon_e.setGeometry(QtCore.QRect(210, 50, 51, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
-        self.label_7.setFont(font)
-        self.label_7.setObjectName(_fromUtf8("label_7"))
+        self.edc_attaque_rayon_e.setFont(font)
+        self.edc_attaque_rayon_e.setObjectName(_fromUtf8("edc_attaque_rayon_e"))
         self.edc_attaque_notes = DmTextEdit(self.edc_attaque_panneau)
-        self.edc_attaque_notes.setGeometry(QtCore.QRect(10, 350, 281, 41))
+        self.edc_attaque_notes.setGeometry(QtCore.QRect(10, 350, 291, 41))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -698,8 +698,8 @@ class Ui_edc_fenetre(object):
         font.setFamily(_fromUtf8("Verdana"))
         self.label_19.setFont(font)
         self.label_19.setObjectName(_fromUtf8("label_19"))
-        self.tableWidget = DmTableWidget(self.edc_attaque_panneau)
-        self.tableWidget.setGeometry(QtCore.QRect(10, 110, 281, 211))
+        self.edc_attaque_attributs = DmTableAttributsAttaque(self.edc_attaque_panneau)
+        self.edc_attaque_attributs.setGeometry(QtCore.QRect(10, 110, 291, 211))
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(248, 248, 248))
         brush.setStyle(QtCore.Qt.SolidPattern)
@@ -710,42 +710,52 @@ class Ui_edc_fenetre(object):
         brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
         brush.setStyle(QtCore.Qt.SolidPattern)
         palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
-        self.tableWidget.setPalette(palette)
+        self.edc_attaque_attributs.setPalette(palette)
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         font.setPointSize(8)
-        self.tableWidget.setFont(font)
-        self.tableWidget.setGridStyle(QtCore.Qt.DotLine)
-        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
-        self.tableWidget.setColumnCount(2)
-        self.tableWidget.setRowCount(1)
-        item = QtGui.QTableWidgetItem()
-        self.tableWidget.setVerticalHeaderItem(0, item)
+        self.edc_attaque_attributs.setFont(font)
+        self.edc_attaque_attributs.setGridStyle(QtCore.Qt.DotLine)
+        self.edc_attaque_attributs.setObjectName(_fromUtf8("edc_attaque_attributs"))
+        self.edc_attaque_attributs.setColumnCount(2)
+        self.edc_attaque_attributs.setRowCount(0)
         item = QtGui.QTableWidgetItem()
-        self.tableWidget.setHorizontalHeaderItem(0, item)
+        self.edc_attaque_attributs.setHorizontalHeaderItem(0, item)
         item = QtGui.QTableWidgetItem()
         item.setTextAlignment(QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
-        self.tableWidget.setHorizontalHeaderItem(1, item)
-        item = QtGui.QTableWidgetItem()
-        item.setFlags(QtCore.Qt.ItemIsSelectable|QtCore.Qt.ItemIsEnabled)
-        self.tableWidget.setItem(0, 0, item)
-        item = QtGui.QTableWidgetItem()
-        item.setTextAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter)
-        brush = QtGui.QBrush(QtGui.QColor(250, 250, 250))
-        brush.setStyle(QtCore.Qt.NoBrush)
-        item.setBackground(brush)
-        self.tableWidget.setItem(0, 1, item)
-        self.tableWidget.horizontalHeader().setVisible(False)
-        self.tableWidget.horizontalHeader().setDefaultSectionSize(180)
-        self.tableWidget.horizontalHeader().setMinimumSectionSize(50)
-        self.tableWidget.horizontalHeader().setStretchLastSection(True)
-        self.tableWidget.verticalHeader().setVisible(False)
+        self.edc_attaque_attributs.setHorizontalHeaderItem(1, item)
+        self.edc_attaque_attributs.horizontalHeader().setVisible(False)
+        self.edc_attaque_attributs.horizontalHeader().setDefaultSectionSize(180)
+        self.edc_attaque_attributs.horizontalHeader().setMinimumSectionSize(50)
+        self.edc_attaque_attributs.horizontalHeader().setStretchLastSection(True)
+        self.edc_attaque_attributs.verticalHeader().setVisible(False)
         self.label = QtGui.QLabel(self.edc_attaque_panneau)
         self.label.setGeometry(QtCore.QRect(10, 90, 101, 16))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         self.label.setFont(font)
         self.label.setObjectName(_fromUtf8("label"))
+        self.edc_attaque_forme = DmComboBox(self.edc_attaque_panneau)
+        self.edc_attaque_forme.setGeometry(QtCore.QRect(160, 50, 41, 31))
+        font = QtGui.QFont()
+        font.setFamily(_fromUtf8("Verdana"))
+        self.edc_attaque_forme.setFont(font)
+        self.edc_attaque_forme.setObjectName(_fromUtf8("edc_attaque_forme"))
+        icon14 = QtGui.QIcon()
+        icon14.addPixmap(QtGui.QPixmap(_fromUtf8("img/formeLigne.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.edc_attaque_forme.addItem(icon14, _fromUtf8(""))
+        icon15 = QtGui.QIcon()
+        icon15.addPixmap(QtGui.QPixmap(_fromUtf8("img/formeEllipsePlein.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.edc_attaque_forme.addItem(icon15, _fromUtf8(""))
+        icon16 = QtGui.QIcon()
+        icon16.addPixmap(QtGui.QPixmap(_fromUtf8("img/cone.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.edc_attaque_forme.addItem(icon16, _fromUtf8(""))
+        self.edc_attaque_forme_e = QtGui.QLabel(self.edc_attaque_panneau)
+        self.edc_attaque_forme_e.setGeometry(QtCore.QRect(110, 50, 51, 31))
+        font = QtGui.QFont()
+        font.setFamily(_fromUtf8("Verdana"))
+        self.edc_attaque_forme_e.setFont(font)
+        self.edc_attaque_forme_e.setObjectName(_fromUtf8("edc_attaque_forme_e"))
         self.edc_pages.addWidget(self.page_att)
         self.page_invent = QtGui.QWidget()
         self.page_invent.setObjectName(_fromUtf8("page_invent"))
@@ -783,7 +793,9 @@ class Ui_edc_fenetre(object):
         self.edc_listeInventaire.verticalHeader().setVisible(False)
         self.edc_inventaire_supprimer = QtGui.QToolButton(self.page_invent)
         self.edc_inventaire_supprimer.setGeometry(QtCore.QRect(380, 360, 21, 20))
-        self.edc_inventaire_supprimer.setIcon(icon10)
+        icon17 = QtGui.QIcon()
+        icon17.addPixmap(QtGui.QPixmap(_fromUtf8("img/gomme.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.edc_inventaire_supprimer.setIcon(icon17)
         self.edc_inventaire_supprimer.setObjectName(_fromUtf8("edc_inventaire_supprimer"))
         self.label_24 = QtGui.QLabel(self.page_invent)
         self.label_24.setGeometry(QtCore.QRect(20, 20, 131, 20))
@@ -1127,7 +1139,7 @@ class Ui_edc_fenetre(object):
         self.frame.setObjectName(_fromUtf8("frame"))
         self.edc_enregistrer = QtGui.QPushButton(self.frame)
         self.edc_enregistrer.setEnabled(False)
-        self.edc_enregistrer.setGeometry(QtCore.QRect(370, 10, 91, 31))
+        self.edc_enregistrer.setGeometry(QtCore.QRect(370, 10, 111, 31))
         font = QtGui.QFont()
         font.setFamily(_fromUtf8("Verdana"))
         font.setBold(True)
@@ -1205,29 +1217,24 @@ class Ui_edc_fenetre(object):
         item.setText(_translate("edc_fenetre", "Valeur", None))
         self.label_18.setText(_translate("edc_fenetre", "Attributs / caractéristiques :  ", None))
         self.edc_attaque_ajouter.setText(_translate("edc_fenetre", "...", None))
+        item = self.edc_attaque_liste.horizontalHeaderItem(0)
+        item.setText(_translate("edc_fenetre", "att", None))
         self.edc_attaque_supprimer.setText(_translate("edc_fenetre", "...", None))
         self.edc_attaque_type.setItemText(0, _translate("edc_fenetre", "Corps-à-corps", None))
         self.edc_attaque_type.setItemText(1, _translate("edc_fenetre", "A Distance", None))
-        self.edc_attaque_type.setItemText(2, _translate("edc_fenetre", "Zone : Ligne", None))
-        self.edc_attaque_type.setItemText(3, _translate("edc_fenetre", "Zone : Disque", None))
-        self.edc_attaque_type.setItemText(4, _translate("edc_fenetre", "Zone : Cone", None))
+        self.edc_attaque_type.setItemText(2, _translate("edc_fenetre", "Zone", None))
         self.label_6.setText(_translate("edc_fenetre", "Portée :", None))
-        self.label_7.setText(_translate("edc_fenetre", "Rayon :", None))
+        self.edc_attaque_rayon_e.setText(_translate("edc_fenetre", "Rayon :", None))
         self.label_19.setText(_translate("edc_fenetre", "Description / Notes :", None))
-        item = self.tableWidget.verticalHeaderItem(0)
-        item.setText(_translate("edc_fenetre", "Nouvelle ligne", None))
-        item = self.tableWidget.horizontalHeaderItem(0)
+        item = self.edc_attaque_attributs.horizontalHeaderItem(0)
         item.setText(_translate("edc_fenetre", "attr", None))
-        item = self.tableWidget.horizontalHeaderItem(1)
+        item = self.edc_attaque_attributs.horizontalHeaderItem(1)
         item.setText(_translate("edc_fenetre", "val", None))
-        __sortingEnabled = self.tableWidget.isSortingEnabled()
-        self.tableWidget.setSortingEnabled(False)
-        item = self.tableWidget.item(0, 0)
-        item.setText(_translate("edc_fenetre", "Bonus à l\'attaque", None))
-        item = self.tableWidget.item(0, 1)
-        item.setText(_translate("edc_fenetre", "8", None))
-        self.tableWidget.setSortingEnabled(__sortingEnabled)
         self.label.setText(_translate("edc_fenetre", "Attributs :", None))
+        self.edc_attaque_forme.setItemText(0, _translate("edc_fenetre", "Ligne", None))
+        self.edc_attaque_forme.setItemText(1, _translate("edc_fenetre", "Disque", None))
+        self.edc_attaque_forme.setItemText(2, _translate("edc_fenetre", "Cone", None))
+        self.edc_attaque_forme_e.setText(_translate("edc_fenetre", "Forme :", None))
         item = self.edc_listeInventaire.horizontalHeaderItem(0)
         item.setText(_translate("edc_fenetre", "nombre", None))
         item = self.edc_listeInventaire.horizontalHeaderItem(1)
@@ -1254,7 +1261,7 @@ class Ui_edc_fenetre(object):
         self.edc_enregistrer.setText(_translate("edc_fenetre", "Enregistrer", None))
         self.edc_annuler.setText(_translate("edc_fenetre", "Annuler", None))
 
-from dm import DmLineEdit, DmEdcPanneauAttaque, DmLabelChoixImage, DmTableMenu, DmTableWidget, DmTextEdit, DmComboBox
+from dm import DmTableListeAttaques, DmLineEdit, DmTableAttributsAttaque, DmEdcPanneauAttaque, DmLabelChoixImage, DmTableMenu, DmTextEdit, DmComboBox
 
 if __name__ == "__main__":
     import sys

+ 136 - 96
lib/ui/editionCombattant.ui

@@ -9,7 +9,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>657</width>
+    <width>677</width>
     <height>484</height>
    </rect>
   </property>
@@ -514,8 +514,8 @@
           <widget class="DmLineEdit" name="edc_nom">
            <property name="geometry">
             <rect>
-             <x>110</x>
-             <y>40</y>
+             <x>160</x>
+             <y>10</y>
              <width>271</width>
              <height>31</height>
             </rect>
@@ -615,8 +615,8 @@ image</string>
           <widget class="QFrame" name="frame_2">
            <property name="geometry">
             <rect>
-             <x>30</x>
-             <y>90</y>
+             <x>110</x>
+             <y>60</y>
              <width>371</width>
              <height>361</height>
             </rect>
@@ -687,7 +687,7 @@ image</string>
             <property name="geometry">
              <rect>
               <x>330</x>
-              <y>50</y>
+              <y>260</y>
               <width>31</width>
               <height>31</height>
              </rect>
@@ -710,7 +710,7 @@ image</string>
             <property name="geometry">
              <rect>
               <x>330</x>
-              <y>10</y>
+              <y>220</y>
               <width>31</width>
               <height>31</height>
              </rect>
@@ -727,7 +727,7 @@ image</string>
             <property name="geometry">
              <rect>
               <x>330</x>
-              <y>270</y>
+              <y>300</y>
               <width>31</width>
               <height>31</height>
              </rect>
@@ -775,7 +775,7 @@ image</string>
           <widget class="QLabel" name="label_9">
            <property name="geometry">
             <rect>
-             <x>50</x>
+             <x>70</x>
              <y>100</y>
              <width>391</width>
              <height>31</height>
@@ -796,7 +796,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_depMarche">
            <property name="geometry">
             <rect>
-             <x>220</x>
+             <x>240</x>
              <y>140</y>
              <width>51</width>
              <height>31</height>
@@ -860,7 +860,7 @@ image</string>
           <widget class="QLabel" name="label_10">
            <property name="geometry">
             <rect>
-             <x>110</x>
+             <x>130</x>
              <y>140</y>
              <width>101</width>
              <height>31</height>
@@ -881,7 +881,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_depNage">
            <property name="geometry">
             <rect>
-             <x>220</x>
+             <x>240</x>
              <y>180</y>
              <width>51</width>
              <height>31</height>
@@ -945,7 +945,7 @@ image</string>
           <widget class="QLabel" name="label_11">
            <property name="geometry">
             <rect>
-             <x>110</x>
+             <x>130</x>
              <y>180</y>
              <width>81</width>
              <height>31</height>
@@ -966,7 +966,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_depEscalade">
            <property name="geometry">
             <rect>
-             <x>220</x>
+             <x>240</x>
              <y>220</y>
              <width>51</width>
              <height>31</height>
@@ -1030,7 +1030,7 @@ image</string>
           <widget class="QLabel" name="label_12">
            <property name="geometry">
             <rect>
-             <x>110</x>
+             <x>130</x>
              <y>220</y>
              <width>91</width>
              <height>31</height>
@@ -1051,7 +1051,7 @@ image</string>
           <widget class="QLabel" name="label_13">
            <property name="geometry">
             <rect>
-             <x>110</x>
+             <x>130</x>
              <y>260</y>
              <width>61</width>
              <height>31</height>
@@ -1072,7 +1072,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_depVol">
            <property name="geometry">
             <rect>
-             <x>220</x>
+             <x>240</x>
              <y>260</y>
              <width>51</width>
              <height>31</height>
@@ -1136,7 +1136,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_saut">
            <property name="geometry">
             <rect>
-             <x>290</x>
+             <x>310</x>
              <y>320</y>
              <width>51</width>
              <height>31</height>
@@ -1200,7 +1200,7 @@ image</string>
           <widget class="QLabel" name="label_14">
            <property name="geometry">
             <rect>
-             <x>50</x>
+             <x>70</x>
              <y>320</y>
              <width>231</width>
              <height>31</height>
@@ -1221,7 +1221,7 @@ image</string>
           <widget class="QLabel" name="label_2">
            <property name="geometry">
             <rect>
-             <x>60</x>
+             <x>80</x>
              <y>140</y>
              <width>31</width>
              <height>31</height>
@@ -1243,7 +1243,7 @@ image</string>
           <widget class="QLabel" name="label_3">
            <property name="geometry">
             <rect>
-             <x>60</x>
+             <x>80</x>
              <y>180</y>
              <width>31</width>
              <height>31</height>
@@ -1262,7 +1262,7 @@ image</string>
           <widget class="QLabel" name="label_4">
            <property name="geometry">
             <rect>
-             <x>60</x>
+             <x>80</x>
              <y>220</y>
              <width>31</width>
              <height>31</height>
@@ -1281,7 +1281,7 @@ image</string>
           <widget class="QLabel" name="label_5">
            <property name="geometry">
             <rect>
-             <x>60</x>
+             <x>80</x>
              <y>260</y>
              <width>31</width>
              <height>31</height>
@@ -1300,7 +1300,7 @@ image</string>
           <widget class="QDoubleSpinBox" name="edc_taille">
            <property name="geometry">
             <rect>
-             <x>290</x>
+             <x>310</x>
              <y>60</y>
              <width>51</width>
              <height>31</height>
@@ -1364,7 +1364,7 @@ image</string>
           <widget class="QLabel" name="label_15">
            <property name="geometry">
             <rect>
-             <x>50</x>
+             <x>70</x>
              <y>60</y>
              <width>231</width>
              <height>31</height>
@@ -1496,7 +1496,7 @@ image</string>
           <widget class="QToolButton" name="edc_attaque_ajouter">
            <property name="geometry">
             <rect>
-             <x>390</x>
+             <x>130</x>
              <y>380</y>
              <width>31</width>
              <height>31</height>
@@ -1510,12 +1510,12 @@ image</string>
              <normaloff>img/plus.png</normaloff>img/plus.png</iconset>
            </property>
           </widget>
-          <widget class="DmTableWidget" name="edc_listeAttaques">
+          <widget class="DmTableListeAttaques" name="edc_attaque_liste">
            <property name="geometry">
             <rect>
-             <x>320</x>
+             <x>10</x>
              <y>10</y>
-             <width>141</width>
+             <width>151</width>
              <height>361</height>
             </rect>
            </property>
@@ -1561,17 +1561,40 @@ image</string>
              <pointsize>8</pointsize>
             </font>
            </property>
+           <property name="horizontalScrollBarPolicy">
+            <enum>Qt::ScrollBarAlwaysOff</enum>
+           </property>
+           <property name="editTriggers">
+            <set>QAbstractItemView::DoubleClicked</set>
+           </property>
            <property name="selectionMode">
             <enum>QAbstractItemView::SingleSelection</enum>
            </property>
            <property name="selectionBehavior">
             <enum>QAbstractItemView::SelectRows</enum>
            </property>
+           <property name="gridStyle">
+            <enum>Qt::DotLine</enum>
+           </property>
+           <attribute name="horizontalHeaderVisible">
+            <bool>false</bool>
+           </attribute>
+           <attribute name="horizontalHeaderStretchLastSection">
+            <bool>true</bool>
+           </attribute>
+           <attribute name="verticalHeaderVisible">
+            <bool>false</bool>
+           </attribute>
+           <column>
+            <property name="text">
+             <string>att</string>
+            </property>
+           </column>
           </widget>
           <widget class="QToolButton" name="edc_attaque_supprimer">
            <property name="geometry">
             <rect>
-             <x>430</x>
+             <x>90</x>
              <y>380</y>
              <width>31</width>
              <height>31</height>
@@ -1582,18 +1605,18 @@ image</string>
            </property>
            <property name="icon">
             <iconset>
-             <normaloff>img/gomme.png</normaloff>img/gomme.png</iconset>
+             <normaloff>img/corbeille.png</normaloff>img/corbeille.png</iconset>
            </property>
           </widget>
           <widget class="DmEdcPanneauAttaque" name="edc_attaque_panneau">
            <property name="enabled">
-            <bool>false</bool>
+            <bool>true</bool>
            </property>
            <property name="geometry">
             <rect>
-             <x>10</x>
+             <x>170</x>
              <y>10</y>
-             <width>301</width>
+             <width>311</width>
              <height>401</height>
             </rect>
            </property>
@@ -1608,7 +1631,7 @@ image</string>
              <rect>
               <x>60</x>
               <y>10</y>
-              <width>231</width>
+              <width>241</width>
               <height>31</height>
              </rect>
             </property>
@@ -1689,36 +1712,18 @@ image</string>
             </item>
             <item>
              <property name="text">
-              <string>Zone : Ligne</string>
-             </property>
-             <property name="icon">
-              <iconset>
-               <normaloff>img/formeLigne.png</normaloff>img/formeLigne.png</iconset>
-             </property>
-            </item>
-            <item>
-             <property name="text">
-              <string>Zone : Disque</string>
+              <string>Zone</string>
              </property>
              <property name="icon">
               <iconset>
-               <normaloff>img/formeEllipsePlein.png</normaloff>img/formeEllipsePlein.png</iconset>
-             </property>
-            </item>
-            <item>
-             <property name="text">
-              <string>Zone : Cone</string>
-             </property>
-             <property name="icon">
-              <iconset>
-               <normaloff>img/cone.png</normaloff>img/cone.png</iconset>
+               <normaloff>img/bombe.png</normaloff>img/bombe.png</iconset>
              </property>
             </item>
            </widget>
            <widget class="QLabel" name="label_6">
             <property name="geometry">
              <rect>
-              <x>10</x>
+              <x>210</x>
               <y>50</y>
               <width>51</width>
               <height>31</height>
@@ -1736,7 +1741,7 @@ image</string>
            <widget class="QSpinBox" name="edc_attaque_portee">
             <property name="geometry">
              <rect>
-              <x>70</x>
+              <x>260</x>
               <y>50</y>
               <width>41</width>
               <height>31</height>
@@ -1797,7 +1802,7 @@ image</string>
            <widget class="QSpinBox" name="edc_attaque_rayon">
             <property name="geometry">
              <rect>
-              <x>200</x>
+              <x>160</x>
               <y>50</y>
               <width>41</width>
               <height>31</height>
@@ -1852,12 +1857,12 @@ image</string>
              <number>1</number>
             </property>
            </widget>
-           <widget class="QLabel" name="label_7">
+           <widget class="QLabel" name="edc_attaque_rayon_e">
             <property name="geometry">
              <rect>
-              <x>140</x>
+              <x>110</x>
               <y>50</y>
-              <width>61</width>
+              <width>51</width>
               <height>31</height>
              </rect>
             </property>
@@ -1875,7 +1880,7 @@ image</string>
              <rect>
               <x>10</x>
               <y>350</y>
-              <width>281</width>
+              <width>291</width>
               <height>41</height>
              </rect>
             </property>
@@ -1940,12 +1945,12 @@ image</string>
              <string>Description / Notes :</string>
             </property>
            </widget>
-           <widget class="DmTableWidget" name="tableWidget">
+           <widget class="DmTableAttributsAttaque" name="edc_attaque_attributs">
             <property name="geometry">
              <rect>
               <x>10</x>
               <y>110</y>
-              <width>281</width>
+              <width>291</width>
               <height>211</height>
              </rect>
             </property>
@@ -2010,11 +2015,6 @@ image</string>
             <attribute name="verticalHeaderVisible">
              <bool>false</bool>
             </attribute>
-            <row>
-             <property name="text">
-              <string>Nouvelle ligne</string>
-             </property>
-            </row>
             <column>
              <property name="text">
               <string>attr</string>
@@ -2028,39 +2028,74 @@ image</string>
               <set>AlignLeft|AlignVCenter</set>
              </property>
             </column>
-            <item row="0" column="0">
+           </widget>
+           <widget class="QLabel" name="label">
+            <property name="geometry">
+             <rect>
+              <x>10</x>
+              <y>90</y>
+              <width>101</width>
+              <height>16</height>
+             </rect>
+            </property>
+            <property name="font">
+             <font>
+              <family>Verdana</family>
+             </font>
+            </property>
+            <property name="text">
+             <string>Attributs :</string>
+            </property>
+           </widget>
+           <widget class="DmComboBox" name="edc_attaque_forme">
+            <property name="geometry">
+             <rect>
+              <x>60</x>
+              <y>50</y>
+              <width>41</width>
+              <height>31</height>
+             </rect>
+            </property>
+            <property name="font">
+             <font>
+              <family>Verdana</family>
+             </font>
+            </property>
+            <item>
              <property name="text">
-              <string>Bonus à l'attaque</string>
+              <string>Ligne</string>
              </property>
-             <property name="flags">
-              <set>ItemIsSelectable|ItemIsEnabled</set>
+             <property name="icon">
+              <iconset>
+               <normaloff>img/formeLigne.png</normaloff>img/formeLigne.png</iconset>
              </property>
             </item>
-            <item row="0" column="1">
+            <item>
              <property name="text">
-              <string>8</string>
+              <string>Disque</string>
              </property>
-             <property name="textAlignment">
-              <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+             <property name="icon">
+              <iconset>
+               <normaloff>img/formeEllipsePlein.png</normaloff>img/formeEllipsePlein.png</iconset>
+             </property>
+            </item>
+            <item>
+             <property name="text">
+              <string>Cone</string>
              </property>
-             <property name="background">
-              <brush brushstyle="NoBrush">
-               <color alpha="255">
-                <red>250</red>
-                <green>250</green>
-                <blue>250</blue>
-               </color>
-              </brush>
+             <property name="icon">
+              <iconset>
+               <normaloff>img/cone.png</normaloff>img/cone.png</iconset>
              </property>
             </item>
            </widget>
-           <widget class="QLabel" name="label">
+           <widget class="QLabel" name="edc_attaque_forme_e">
             <property name="geometry">
              <rect>
               <x>10</x>
-              <y>90</y>
-              <width>101</width>
-              <height>16</height>
+              <y>50</y>
+              <width>51</width>
+              <height>31</height>
              </rect>
             </property>
             <property name="font">
@@ -2069,7 +2104,7 @@ image</string>
              </font>
             </property>
             <property name="text">
-             <string>Attributs :</string>
+             <string>Forme :</string>
             </property>
            </widget>
           </widget>
@@ -3198,7 +3233,7 @@ parlées : </string>
            <rect>
             <x>370</x>
             <y>10</y>
-            <width>91</width>
+            <width>111</width>
             <height>31</height>
            </rect>
           </property>
@@ -3255,11 +3290,6 @@ parlées : </string>
    <extends>QLineEdit</extends>
    <header location="global">dm.h</header>
   </customwidget>
-  <customwidget>
-   <class>DmTableWidget</class>
-   <extends>QTableWidget</extends>
-   <header location="global">dm.h</header>
-  </customwidget>
   <customwidget>
    <class>DmTextEdit</class>
    <extends>QTextEdit</extends>
@@ -3276,6 +3306,16 @@ parlées : </string>
    <header location="global">dm.h</header>
    <container>1</container>
   </customwidget>
+  <customwidget>
+   <class>DmTableAttributsAttaque</class>
+   <extends>QTableWidget</extends>
+   <header location="global">dm.h</header>
+  </customwidget>
+  <customwidget>
+   <class>DmTableListeAttaques</class>
+   <extends>QTableWidget</extends>
+   <header location="global">dm.h</header>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections>

BIN
lib/ui/img/corbeille.png