class DUnBase(Ui_DUnBase,QDialog):
def __init__(self,parent ,modal ) :
QDialog.__init__(self,parent)
+ self.appliEficas=parent.appliEficas
if hasattr(parent,"leLayout"):
parent.leLayout.removeWidget(parent.leLayout.widgetActive)
parent.leLayout.widgetActive.close()
self.connect(self.bParametres,SIGNAL("pressed()"),self.BParametresPressed)
self.connect(self.BSalome,SIGNAL("pressed()"),self.BSalomePressed)
self.connect(self.BView2D,SIGNAL("clicked()"),self.BView2DPressed)
+ self.connect(self.BFichier,SIGNAL("clicked()"),self.BFichierPressed)
def ViewDoc(self):
QTPanel.ViewDoc(self)
def detruitBouton(self):
mc = self.node.item.get_definition()
+ if self.node.item.get_nom() != "FileName" :
+ self.BFichier.close()
type = mc.type[0]
#if not('grma' in repr(type)) or not(self.editor.salome) :
if not(('grma' in repr(type)) or ('grno' in repr(type))) or not(self.editor.salome) :
def BOk2Pressed(self):
SaisieValeur.BOk2Pressed(self)
- if self.node.item.parent.nom == "FICXML" :
+ if self.node.item.parent.nom == "MODEL" :
self.node.item.parent.change_fichier="1"
self.node.item.parent.build_include(None,"")
+ def BFichierPressed(self):
+ fichier = QFileDialog.getOpenFileName(self.appliEficas,
+ self.appliEficas.trUtf8('Ouvrir Fichier'),
+ self.appliEficas.CONFIGURATION.savedir,
+ self.appliEficas.trUtf8('JDC Files (*.comm);;''All Files (*)'))
+ if not(fichier.isNull()):
+ self.lineEditVal.setText(fichier)
+
+
def BSupPressed(self):
QTPanel.BSupPressed(self)
def LEValeurPressed(self):
SaisieValeur.LEValeurPressed(self)
- if self.node.item.parent.nom == "FICXML" :
+ if self.node.item.parent.nom == "MODEL" :
self.node.item.parent.change_fichier="1"
self.node.item.parent.build_include(None,"")
<item row="0" column="0" >
<widget class="QTabWidget" name="tabuniqueinto" >
<widget class="QWidget" name="Widget8" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>460</width>
- <height>435</height>
- </rect>
- </property>
<attribute name="title" >
<string>Saisir Valeur</string>
</attribute>
- <layout class="QGridLayout" >
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <spacer name="spacer1" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>288</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="2" >
+ <widget class="QPushButton" name="bParametres" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>140</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Parametres</string>
+ </property>
+ </widget>
+ </item>
<item row="1" column="0" colspan="3" >
<layout class="QHBoxLayout" >
<item>
</item>
</layout>
</item>
- <item row="0" column="0" colspan="2" >
- <spacer name="spacer1" >
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="BSalome" >
+ <property name="minimumSize" >
+ <size>
+ <width>50</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>image240.png</normaloff>image240.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item rowspan="2" row="2" column="1" >
+ <spacer name="spacer4" >
<property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>288</width>
- <height>21</height>
+ <width>41</width>
+ <height>112</height>
</size>
</property>
</spacer>
</item>
- <item row="0" column="2" >
- <widget class="QPushButton" name="bParametres" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="2" column="2" >
+ <widget class="QPushButton" name="BView2D" >
+ <property name="minimumSize" >
+ <size>
+ <width>110</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Visualiser</string>
</property>
+ </widget>
+ </item>
+ <item row="3" column="2" >
+ <widget class="QPushButton" name="BFichier" >
<property name="minimumSize" >
<size>
- <width>140</width>
- <height>30</height>
+ <width>50</width>
+ <height>40</height>
</size>
</property>
<property name="text" >
- <string>Parametres</string>
+ <string>Fichier</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>image240.png</normaloff>image240.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="3" >
+ <widget class="QLabel" name="Commentaire" >
+ <property name="minimumSize" >
+ <size>
+ <width>430</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
</property>
</widget>
</item>
- <item row="5" column="0" >
+ <item row="5" column="1" >
+ <spacer name="spacer3" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>21</width>
+ <height>112</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="6" column="0" >
<widget class="QPushButton" name="bSup" >
<property name="minimumSize" >
<size>
</property>
</widget>
</item>
- <item row="5" column="1" >
+ <item row="6" column="1" >
<widget class="QPushButton" name="bOk" >
<property name="minimumSize" >
<size>
</property>
</widget>
</item>
- <item row="5" column="2" >
+ <item row="6" column="2" >
<widget class="QPushButton" name="bHelp" >
<property name="minimumSize" >
<size>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <spacer name="spacer4" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>41</width>
- <height>112</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="4" column="1" >
- <spacer name="spacer3" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>21</width>
- <height>112</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" colspan="3" >
- <widget class="QLabel" name="Commentaire" >
- <property name="minimumSize" >
- <size>
- <width>430</width>
- <height>40</height>
- </size>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="2" >
- <widget class="QPushButton" name="BView2D" >
- <property name="minimumSize" >
- <size>
- <width>110</width>
- <height>40</height>
- </size>
- </property>
- <property name="text" >
- <string>Visualiser</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QPushButton" name="BSalome" >
- <property name="minimumSize" >
- <size>
- <width>50</width>
- <height>40</height>
- </size>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset>
- <normaloff>image240.png</normaloff>image240.png</iconset>
- </property>
- </widget>
- </item>
</layout>
</widget>
</widget>