def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande):
self.indexDernierLabel=0
- self.NumLineEditEnCours=0
self.nomLine="TupleVal"
self.listeAffichageWidget=[]
Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande)
icon3 = QIcon(fichier3)
self.BSelectFichier.setIcon(icon3)
self.BSelectFichier.setIconSize(QSize(32, 32))
+ self.connect(self.BSelectFichier,SIGNAL("clicked()"), self.selectInFile)
except :
pass
+ def AjoutNValeur(self,liste):
+ if len(liste)%self.nbValeurs != 0 :
+ texte="Nombre de valeur incorrecte"
+ #self.Commentaire.setText(texte)
+ self.editor.affiche_infos(texte,Qt.red)
+ return
+ i=0
+ while ( i < len(liste) ) :
+ if self.objSimp.valeur != None : indexDernierRempli=len(self.objSimp.valeur)
+ else : indexDernierRempli=0
+ try :
+ t=tuple(liste[i:i+self.nbValeurs])
+ i=i+self.nbValeurs
+ except:
+ t=tuple(liste[i:len(liste)])
+ if indexDernierRempli < self.indexDernierLabel:
+ nomLineEdit=self.nomLine+str(indexDernierRempli+1)
+ LEARemplir=getattr(self,nomLineEdit)
+ LEARemplir.lineEditVal_1.setText(str(t[0]))
+ LEARemplir.lineEditVal_2.setText(str(t[1]))
+ if self.nbValeurs== 3 : LEARemplir.lineEditVal_3.setText(str(t[2]))
+ LEARemplir.valueChange()
+ else :
+ self.ajoutLineEdit(t,False)
+ nomLineEdit=self.nomLine+str(self.indexDernierLabel)
+ LEARemplir=getattr(self,nomLineEdit)
+ LEARemplir.valueChange()
+
+
def RBListePush(self):
+ # PN a rendre generique avec un truc tel prerempli
if self.objSimp.valeur != None and self.objSimp.valeur != [] : return
if self.objSimp.definition.validators.typeDesTuples[0]==self.editor.readercata.cata[0].sd_ligne :
val=[]
except :
pass
self.node.item.set_valeur(val)
+
<rect>
<x>0</x>
<y>0</y>
- <width>458</width>
- <height>561</height>
+ <width>633</width>
+ <height>705</height>
</rect>
</property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="windowTitle">
<string>Sélection de valeurs</string>
</property>
+ <property name="styleSheet">
+ <string notr="true">background:rgb(235,235,235)</string>
+ </property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTextEdit" name="TBtext">
<height>400</height>
</size>
</property>
+ <property name="styleSheet">
+ <string notr="true">background:rgb(250,250,250)</string>
+ </property>
</widget>
</item>
<item>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="BGSeparateur">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>280</width>
+ <height>150</height>
+ </size>
+ </property>
<property name="title">
<string>Separateur</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <property name="topMargin">
+ <number>15</number>
+ </property>
+ <property name="bottomMargin">
<number>0</number>
</property>
<item>
- <widget class="QRadioButton" name="Bespace">
- <property name="text">
- <string>espace</string>
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
</property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="Bvirgule">
- <property name="text">
- <string>virgule</string>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>7</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
<item>
- <widget class="QRadioButton" name="BpointVirgule">
- <property name="text">
- <string>point-virgule</string>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>0</number>
</property>
- </widget>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="Bespace">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>espace</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="Bvirgule">
+ <property name="text">
+ <string>virgule</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="BpointVirgule">
+ <property name="text">
+ <string>point-virgule</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>0</number>
+ </property>
<item>
- <widget class="QPushButton" name="BImportSel">
+ <spacer name="verticalSpacer">
<property name="minimumSize">
<size>
- <width>0</width>
+ <width>23</width>
+ <height>43</height>
+ </size>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="BImportTout">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
<height>40</height>
</size>
</property>
</string>
</property>
<property name="text">
- <string>Ajouter Selection</string>
+ <string>Importer Tout</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="BImportTout">
+ <widget class="QPushButton" name="BImportSel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="minimumSize">
<size>
- <width>0</width>
+ <width>200</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
<height>40</height>
</size>
</property>
</string>
</property>
<property name="text">
- <string>Importer Tout</string>
+ <string>Ajouter Selection</string>
</property>
</widget>
</item>