Editeur de jdc
"""
- def __init__(self,fn = None, jdc = None ,parent=None, editor = None):
- #-------------------------------------------------------------------#
+ def __init__(self,fn = None, jdc = None ,parent=None, editor = None, units = None):
+ #--------------------------------------------------------------------------------#
QSplitter.__init__(self, parent,'')
self.fileInfo.setCaching(0)
if editor is None:
self.jdc = self.readFile(self.fileName)
+ print "uuuuuuuuuuuuuuuuuuuuuuuuuuuu"
+ print self.fileName
+ if units is not None:
+ self.jdc.recorded_units=units
+ self.jdc.old_recorded_units=units
else:
self.top = editor.top
self.code = editor.code
self.jdc = editor.jdc
else:
if not self.jdc: # nouveau jdc
- self.jdc = self._newJDC()
+ self.jdc = self._newJDC(units=units)
if self.jdc:
self.jdc.appli = self
self.setCaption(cap)
self.emit(PYSIGNAL('captionChanged'), (cap, self))
- #-------------------#
- def _newJDC( self ):
- #-------------------#
+ #--------------------------------#
+ def _newJDC( self ,units = None):
+ #--------------------------------#
"""
Initialise un nouveau JDC vierge
"""
cata_ord_dico=self.readercata.cata_ordonne_dico,
rep_mat=self.CONFIGURATION.rep_mat
)
+ if units is not None:
+ jdc.recorded_units=units
+ jdc.old_recorded_units=units
jdc.analyse()
return jdc
"""
return self.saveFile(1, path)
-
-
-
if __name__=='__main__':
if hasattr(prefs,'encoding'):