From: Renaud Barate Date: Thu, 6 May 2010 15:41:53 +0000 (+0000) Subject: Added possibility to customize file type filters for type "Fichier" X-Git-Tag: V2_0~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a4dcec768261d6a697b236c4c40c188d344e0efd;p=modules%2Feficas.git Added possibility to customize file type filters for type "Fichier" --- diff --git a/InterfaceQT4/monUniqueBasePanel.py b/InterfaceQT4/monUniqueBasePanel.py index e4769fee..39d226c3 100644 --- a/InterfaceQT4/monUniqueBasePanel.py +++ b/InterfaceQT4/monUniqueBasePanel.py @@ -122,13 +122,17 @@ class MonUniqueBasePanel(DUnBase,QTPanel,SaisieValeur): SaisieValeur.BOk2Pressed(self) def BFichierPressed(self): - fichier = QFileDialog.getOpenFileName(self.appliEficas, - self.appliEficas.trUtf8('Ouvrir Fichier'), - self.appliEficas.CONFIGURATION.savedir, - self.appliEficas.trUtf8('Wrapper Files (*.xml);;''All Files (*)')) - if not(fichier.isNull()): - self.lineEditVal.setText(fichier) - + type = self.node.item.get_definition().type + if len(type) > 1: + filters = type[1] + else: + filters = QString() + fichier = QFileDialog.getOpenFileName(self.appliEficas, + self.appliEficas.trUtf8('Ouvrir Fichier'), + self.appliEficas.CONFIGURATION.savedir, + filters) + if not(fichier.isNull()): + self.lineEditVal.setText(fichier) def LEValeurPressed(self): SaisieValeur.LEValeurPressed(self) diff --git a/Openturns_Study/OpenTURNS_Cata_Study_V8.py b/Openturns_Study/OpenTURNS_Cata_Study_V8.py index 6f8bb6c2..6a43ee35 100644 --- a/Openturns_Study/OpenTURNS_Cata_Study_V8.py +++ b/Openturns_Study/OpenTURNS_Cata_Study_V8.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: iso-8859-1 -*- # -------------------------------------------------- # debut entete @@ -874,7 +874,7 @@ MODEL = MACRO ( nom = "MODEL", fichier_ini = 1, FileName = SIMP ( statut = "o", - typ = "Fichier", + typ = ('Fichier', 'Wrapper Files (*.xml);;All Files (*)',), fr = "Nom du modele physique", ang = "Physical model identifier", ),