# import du chargeur de composants
from comploader import make_objecttreeitem
-from InterfaceTK import treewidget
from Ihm import CONNECTOR
myrepr = Repr()
# ou treeOrNode est le noeud parent, item est l'item associé
# command est une fonction python appelée sur sélection graphique
# du noeud et rmenu est une fonction python appelée sur click droit sur le noeud
- itemNode=treewidget.Node
+ itemNode=None
def __init__(self):
"""Constructor. Do whatever you need to do."""
reper=os.path.dirname(__file__)
if Ihm == "TK" :
repertoire=reper+"/../InterfaceTK"
+ package="InterfaceTK"
else :
repertoire=reper+"/../InterfaceQT"
+ package="InterfaceQT"
listfich=glob.glob(os.path.join(repertoire, "compo*.py"))
for fichier in listfich:
m= os.path.basename(fichier)[:-3]
- module=__import__(m,globals(),locals())
+ module=__import__(package,globals(),locals(),[m])
+ module = getattr(module, m)
composants[module.objet]=module.treeitem
return composants
import prefs
import styles
from styles import style
-from InterfaceTK import fontes
+import fontes
import tooltip
import properties
import convert,generator
self.load_appli_composant(mname)
def load_appli_composant(self,mname):
- if mname=="bureau" :
- mnameTK="InterfaceTK."+mname
- moduleTK=__import__(mnameTK,globals(),locals())
- module=getattr(moduleTK,mname)
- factory=getattr(module,mname.upper())
- appli_composant=factory(self,self.top)
- setattr(self,mname,appli_composant)
- self.fill_menus(appli_composant,appli_composant.menu_defs)
- self.toolbar.creer_boutons_appli_composant(appli_composant.button_defs,appli_composant)
- return
-
-
- try :
- mnameTK="InterfaceTK."+mname
- moduleTK=__import__(mnameTK,globals(),locals())
- module=getattr(moduleTK,mname)
- except :
- mnameEditeur="Editeur."+mname
- moduleEditeur=__import__(mnameEditeur,globals(),locals())
- module=getattr(moduleEditeur,mname)
+ module=__import__(mname,globals(),locals())
factory=getattr(module,mname.upper())
appli_composant=factory(self,self.top)
setattr(self,mname,appli_composant)
self.message=''
# Avant la creation du bureau qui lit le catalogue
self.version_code=version
- from InterfaceTK import readercata
+ import readercata
self.readercata=readercata.READERCATA(self,None)
self.dir=None
self.JDCDisplay_courant=None
self.fileName=None
self.liste_JDCDisplay=[]
- comploader.charger_composants()
+ self.charger_composants()
self.cree_cataitem()
self.text_reel=""
self.initialdir = self.appli.CONFIGURATION.initialdir
+ def charger_composants(self):
+ comploader.charger_composants()
+
def cree_cataitem(self):
"""
On récupère dans l'appli_composant readercata les variables
from Tkinter import *
# Modules Eficas
-from InterfaceTK import fontes
+import fontes
from treewidget import Tree
from Editeur.Objecttreeitem import TreeItem
from Accas import AsException
from Accas import FACT,BLOC,SIMP
#
-__version__="$Name: $"
-__Id__="$Id: catabrowser.py,v 1.1.2.1 2007-08-10 13:59:00 pnoyret Exp $"
+__version__="$Name: BR_dev_V1_13 $"
+__Id__="$Id: catabrowser.py,v 1.1.4.2 2007-10-23 09:07:33 pnoyret Exp $"
#
class Tableau:
incr = 10
from Tkinter import *
# Modules Eficas
-from InterfaceTK import fontes
+import fontes
from widgets import *
from treewidget import Tree
from Editeur.Objecttreeitem import TreeItem
import definition_cata
#
-__version__="$Name: $"
-__Id__="$Id: cataediteur.py,v 1.1.2.1 2007-08-10 13:59:00 pnoyret Exp $"
+__version__="$Name: BR_dev_V1_13 $"
+__Id__="$Id: cataediteur.py,v 1.1.4.2 2007-10-23 09:07:33 pnoyret Exp $"
#
Fonte_Niveau = fontes.canvas_gras_italique
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
Fonte_Commentaire = fontes.standard_italique
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
Fonte_Commentaire = fontes.standard_italique
# import modules EFICAS
import widgets
import panels
-from InterfaceTK import fontes
+import fontes
import compooper
Fonte_TITRE = fontes.standard_gras_souligne
# Modules Eficas
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
import compooper
import convert
from widgets import askopenfilename
from widgets import showinfo,showerror
#
-__version__="$Name: $"
-__Id__="$Id: compomacro.py,v 1.1.4.2 2007-10-23 09:07:33 pnoyret Exp $"
+__version__="$Name: BR_dev_V1_13 $"
+__Id__="$Id: compomacro.py,v 1.1.4.3 2007-10-29 12:42:18 pnoyret Exp $"
#
class MACROPanel(panels.OngletPanel):
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
from Extensions import commentaire
Fonte_Niveau = fontes.canvas_gras_italique
import traceback
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
class OPERPanel(panels.OngletPanel):
# import modules EFICAS
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
Fonte_PARAMETRE = fontes.standard_italique
import widgets
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
Fonte_PARAMETRE = fontes.standard_italique
from Editeur import Objecttreeitem
import panels
-from InterfaceTK import fontes
+import fontes
import compooper
class PROCPanel(panels.OngletPanel):
import styles
from Editeur import import_code
-from InterfaceTK import splash
+import splash
from Editeur import session
def lance_eficas(code=None,fichier=None):
# Modules Eficas
import prefs
-from InterfaceTK import fontes
+import fontes
class FAQ:
def __init__(self,parent):
return image
def update_cache():
- global dico_images
- dico_images={}
+ dico_images.clear()
from plusieurspanel import PLUSIEURS_Panel
from uniqueassdpanel import UNIQUE_ASSD_Panel
-from InterfaceTK import fontes
+import fontes
import math
class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel):
+++ /dev/null
-# -*- coding: utf-8 -*-
-# CONFIGURATION MANAGEMENT OF EDF VERSION
-# ======================================================================
-# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
-# (AT YOUR OPTION) ANY LATER VERSION.
-#
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
-#
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
-#
-#
-# ======================================================================
-
-
-labels= ('Fichier','Edition','Jeu de commandes',
- 'Options',
- 'Aide',
- 'Traduction',
- )
-
-appli_composants=['readercata','bureau',
- 'options',
- ]
-
-menu_defs={ 'bureau': [
- ('Fichier',[
- ('Nouveau','newJDC','<Control-n>','Ctrl+N'),
- ('Nouvel INCLUDE','newJDC_include'),
- ('Ouvrir','openJDC','<Control-o>','Ctrl+O'),
- ('Enregistrer','saveJDC','<Control-s>','Ctrl+S'),
- ('Enregistrer sous','saveasJDC','<Control-e>','Ctrl+E'),
- None,
- ('Fermer','closeJDC','<Control-w>','Ctrl+W'),
- ('Quitter','exitEFICAS','<Control-q>','Ctrl+Q'),
- ]
- ),
- ('Edition',[
- ('Copier','copy','<Control-c>','Ctrl+C'),
- ('Couper','cut','<Control-x>','Ctrl+X'),
- ('Coller','paste','<Control-v>','Ctrl+V'),
- ]
- ),
- ('Jeu de commandes',[
- ('Rapport de validation','visuCRJDC','<Control-r>','Ctrl+R'),
- ('Fichier source','visu_txt_brut_JDC','<Control-b>','Ctrl+B'),
- #('Paramètres Eficas','affichage_fichier_ini'),
- ]
- ),
- ('Traduction',[
- ('Traduction v7 en v8','TraduitFichier','<Control-t>','Ctrl+T'),
- ]
- ),
- ('Aide',[
- ('Aide EFICAS','aideEFICAS','<Control-a>','Ctrl+A'),
- ]
- ),
- ]
- }
from Editeur import autre_analyse_cata
from Editeur import uiinfo
from Noyau.N_CR import CR
-from InterfaceTK.widgets import showinfo,showerror
-from InterfaceTK.widgets import Fenetre
-from InterfaceTK import fontes
+from widgets import showinfo,showerror
+from widgets import Fenetre
+import fontes
from utils import init_rep_cata_dev
dans le répertoire Cata
"""
if self.appli.ihm == "TK" :
- from InterfaceTK import splash
+ import splash
message1 = "Compilation des fichiers Eficas \n\n Veuillez patienter ..."
if self.appli.test == 0 and self.appli.ihm=="TK" :
splash._splash.configure(text = message1)
Réalise l'import du catalogue dont le chemin d'accès est donné par cata
"""
if self.appli.test == 0 and self.appli.ihm=="TK" :
- from InterfaceTK import splash
+ import splash
splash._splash.configure(text = "Chargement du catalogue")
nom_cata = os.path.splitext(os.path.basename(cata))[0]
rep_cata = os.path.dirname(cata)
self.version_code = liste_choix[0]
return
# création d'une boîte de dialogue modale
- from InterfaceTK import splash
+ import splash
self.fenetre_choix_cata = Pmw.Dialog(splash._splash, #avec self.parent, ne marche pas sous Windows
buttons=('OK','ANNULER'),
defaultbutton = 'OK',
from centerwindow import centerwindow
from Tools.foztools.foztools import Slider
-from InterfaceTK import fontes
+import fontes
import images
_splash=None
if os.path.isfile(userstylefile):
execfile(userstylefile)
-from InterfaceTK import fontes
+import fontes
for attr in dir(style):
if attr[0]=='_':continue
if not hasattr(fontes,attr):continue
# Modules Eficas
from Editeur import Objecttreeitem
import treewidget
+Objecttreeitem.TreeItem.itemNode=treewidget.Node
class TREEITEMINCANVAS:
def __init__(self,object,nom="",parent=None,appli=None,sel=None,rmenu=None):
from Tkinter import *
-from InterfaceTK import fontes
+import fontes
import images
from Ihm import CONNECTOR
#
-__version__="$Name: BR_dev_V1_13 $"
-__Id__="$Id: treewidget.py,v 1.1.4.2 2007-10-23 09:07:35 pnoyret Exp $"
+__version__="$Name: $"
+__Id__="$Id: treewidget.py,v 1.1.4.3 2007-11-16 08:56:03 cchris Exp $"
#
Fonte_Standard = fontes.standard
from tkFileDialog import *
from tkMessageBox import showinfo,askyesno,showerror,askretrycancel
-from InterfaceTK import fontes
-from Aster import prefs
+import fontes
+import prefs
from Editeur.utils import save_in_file
from centerwindow import centerwindow