From 5a8640721921519b94fae321436f40c066124257 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Wed, 15 Mar 2017 13:36:37 +0100 Subject: [PATCH] Adding an open/close button to control the EFICAS tree view --- Makefile.am | 2 +- bin/AdaoCatalogGenerator.py | 2 +- doc/en/Makefile.am | 1 + doc/en/images/eficas_tree.png | Bin 0 -> 4856 bytes doc/fr/Makefile.am | 1 + doc/fr/images/eficas_tree.png | Bin 0 -> 4856 bytes i18n/adao.pro | 12 +++++----- i18n/adao_en.ts | 6 ++--- i18n/adao_fr.ts | 6 ++--- src/daEficas/prefs_ADAO.py.in | 21 +++++++++++++----- src/daSalome/daGUI/daGuiImpl/adaoCase.py | 11 +++++++++ .../daGUI/daGuiImpl/adaoGuiManager.py | 21 ++++++++++++++++++ 12 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 doc/en/images/eficas_tree.png create mode 100644 doc/fr/images/eficas_tree.png diff --git a/Makefile.am b/Makefile.am index 7b58c38..a51564c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,7 @@ endif SUBDIRS += src if SALOME_MODULE -SUBDIRS += resources bin examples test +SUBDIRS += resources bin examples test i18n endif if SPHINX_IS_OK diff --git a/bin/AdaoCatalogGenerator.py b/bin/AdaoCatalogGenerator.py index cedec35..cfa54e2 100644 --- a/bin/AdaoCatalogGenerator.py +++ b/bin/AdaoCatalogGenerator.py @@ -224,7 +224,7 @@ def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", def F_Observers(statut) : return FACT( statut=statut, - SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(${choices})),${decl_choices} + SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", homo="SansOrdreNiDoublon", validators=NoRepeat(), into=(${choices})),${decl_choices} ) """%(observers_list,observers_cont) diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am index 2cc486f..3156f2d 100644 --- a/doc/en/Makefile.am +++ b/doc/en/Makefile.am @@ -49,6 +49,7 @@ EXTRA_DIST = conf.py advanced.rst examples.rst index.rst intro.rst theory.rs images/eficas_close.png \ images/eficas_open.png \ images/eficas_saveas.png \ + images/eficas_tree.png \ images/eficas_valid.png \ images/yacs_containerlog.png diff --git a/doc/en/images/eficas_tree.png b/doc/en/images/eficas_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..13222b3e5f778f209395d63ab7ca3d46eea99450 GIT binary patch literal 4856 zcmVWn#00004b3#c}2nYxW zdRL{n5(T9^cn{Ts%9Qs;ixx>MupuBK0_+Gh2NtMm zbrETr0SgOB69<}Yh?~R-5qV2QrisX{1;}nMB2NMC${GA~%W1HUatJPM_lg@prlSX(DoQ4jns*$Y-7`3RQ)$0gMcqW(mVjP2daP`F3px$({%|}!-~Z!;O8Q;WtQ(x z1ge2rfJ&<&@0-fp?A~w6BG=Y^zXs@>MW#8>)_1*?OY=R@F-MvC}U{-vZT1WSQ;fn!CadEh(mH&r$vzIVae z;2>tZ_Z>y#rv>KkrP*0T_A5of9C!iP8aUXCaNX(?v0CiiyD|t7k=DQwz_-9VF4`mJ zq>v7VtMym9qlzkGc4hvZOlzc$QQv(bP zkg%o_aMwG#>&e*jrMbJVj9!*&Yfk{yW8FhPay471>LgV?1lSY!4OR$XQ$`Po zNTYPB`mU-T4D1E`7VByQYyyl3j>wBZeY52{BKrX^`D(mVAmud#IMCGO&5-ZfVgL4p zfE1YDY1lJHf%giK7oZ zHBVLfGE>ztBGMN42e7}0v{coa9P$c`7Lj(qBfw8Zq=l;17V{%ib*+fJ0vrpp#75@h zgL0{FvdA3BGM6irYy*k=1}aP`mL%i0hQwdXENOaS<+WH0)LE+J8lt?4t_y53V+01KIi*t4{Y3VvxsaTNV7li za7db>p{k=*^-)z_6fTg`UKTcETa7g>+vJh$XFr8;?z$HZ#}EsFiP-3Uy^CAo&lj8M z^QT$hOH=3K76I)`>17r0ds9CSIRSCAP)bikfLyJ4-u zXrN~x-zwlr-~)Hv(U(S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*JA e)+Vh_ocMpv&lJZ5q!L>I0000 @default - ASSIMILATION_STUDY - Data assimilation or optimization + Data assimilation or optimization - CHECKING_STUDY - Verification + Verification diff --git a/i18n/adao_fr.ts b/i18n/adao_fr.ts index 5b38988..ae16186 100644 --- a/i18n/adao_fr.ts +++ b/i18n/adao_fr.ts @@ -3,14 +3,12 @@ @default - ASSIMILATION_STUDY - Assimilation de données ou optimisation + Assimilation de données ou optimisation - CHECKING_STUDY - Vérification + Vérification diff --git a/src/daEficas/prefs_ADAO.py.in b/src/daEficas/prefs_ADAO.py.in index 1df16d5..2335a8a 100644 --- a/src/daEficas/prefs_ADAO.py.in +++ b/src/daEficas/prefs_ADAO.py.in @@ -20,27 +20,36 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# Author: André Ribes, andre.ribes@edf.fr, EDF R&D +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D import os, sys # print "import des prefs de Adao" - +# # Configuration de Eficas +# ======================= +# # INSTALLDIR, REPINI est obligatoire INSTALLDIR = "@EFICAS_DIR@" sys.path.insert(0,INSTALLDIR) # positionnee a repin au debut mise a jour dans configuration repIni=os.path.dirname(os.path.abspath(__file__)) - -# initialdir sert comme directory initial des QFileDialog +# +# Sert comme directory initial des QFileDialog initialdir=os.environ["PWD"] +# +# Traductions et codages # Codage des strings qui accepte les accents (en remplacement de 'ascii') encoding='iso-8859-1' -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='fr' +# Indique la langue du catalogue utilisee pour les chaines d'aide : fr ou ang +# lang='fr' +# Traduction des labels de boutons ou autres +translatorFichier = os.environ["ADAO_ROOT_DIR"] + "/share/salome/resources/adao/adao" # Ce nom sera complete par EFICAS avec _.qm +# +# Pilotage des sous-fenetres d'EFICAS closeAutreCommande = True closeFrameRechercheCommande = True closeEntete = True +closeArbre = True taille=800 diff --git a/src/daSalome/daGUI/daGuiImpl/adaoCase.py b/src/daSalome/daGUI/daGuiImpl/adaoCase.py index 532c950..10a9868 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoCase.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoCase.py @@ -43,6 +43,7 @@ class AdaoCase: self.salome_study_item = None # Study item object self.eficas_editor = None # Editor object from Eficas + self.arbreOuvert = False def setEditor(self, editor): if editor is not self.eficas_editor: @@ -119,3 +120,13 @@ class AdaoCase: rtn = u"Validation report for the selected ADAO case:\n\n" rtn += unicode( self.eficas_editor.jdc.report()) return rtn + + def showTreeAdaoCase(self): + if self.eficas_editor: + if self.arbreOuvert: + self.eficas_editor.fermeArbre() + self.arbreOuvert = False + else: + self.eficas_editor.ouvreArbre() + self.arbreOuvert = True + return self.arbreOuvert diff --git a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py index d0c5504..8c0250c 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py @@ -63,6 +63,7 @@ UI_ELT_IDS = Enumerate([ 'SAVE_ADAOCASE_ID', 'SAVE_AS_ADAOCASE_ID', 'VALIDATE_ADAOCASE_ID', + 'SHOWTREE_ADAOCASE_ID', 'CLOSE_ADAOCASE_ID', 'YACS_EXPORT_ID', ],offset=6950) @@ -73,6 +74,7 @@ ACTIONS_MAP={ UI_ELT_IDS.SAVE_ADAOCASE_ID:"saveAdaoCase", UI_ELT_IDS.SAVE_AS_ADAOCASE_ID:"saveasAdaoCase", UI_ELT_IDS.VALIDATE_ADAOCASE_ID:"validateAdaoCase", + UI_ELT_IDS.SHOWTREE_ADAOCASE_ID:"showTreeAdaoCase", UI_ELT_IDS.CLOSE_ADAOCASE_ID:"closeAdaoCase", UI_ELT_IDS.YACS_EXPORT_ID:"exportCaseToYACS", } @@ -325,6 +327,22 @@ class AdaoCaseManager(EficasObserver): adaoGuiHelper.gui_information(SalomePyQt.SalomePyQt().getDesktop(), msg) break +####### +# +# Gestion de l'affichage de l'arbre EFICAS +# 1: la fonction showTreeAdaoCase est appelee par le GUI SALOME +# +####### + + def showTreeAdaoCase(self): + adaoLogger.debug("Validation du cas par un rapport sur le JDC") + self.harmonizeSelectionFromEficas() + salomeStudyItem = adaoGuiHelper.getSelectedItem() + for case_name, adao_case in self.cases.iteritems(): + if adao_case.salome_study_item.GetID() == salomeStudyItem.GetID(): + msg = adao_case.showTreeAdaoCase() + break + ####### # # Gestion de la connexion avec YACS @@ -426,6 +444,9 @@ class AdaoGuiUiComponentBuilder: a = sgPyQt.createAction( UI_ELT_IDS.VALIDATE_ADAOCASE_ID, "Validate case", "Validate case", "Validate an ADAO case", "eficas_valid.png" ) sgPyQt.createMenu(a, mid) sgPyQt.createTool(a, tid) + a = sgPyQt.createAction( UI_ELT_IDS.SHOWTREE_ADAOCASE_ID, "Show tree", "Show tree", "Show the commands tree", "eficas_tree.png" ) + sgPyQt.createMenu(a, mid) + sgPyQt.createTool(a, tid) a = sgPyQt.createAction( UI_ELT_IDS.CLOSE_ADAOCASE_ID, "Close case", "Close case", "Close an ADAO case", "eficas_close.png" ) sgPyQt.createMenu(a, mid) sgPyQt.createTool(a, tid) -- 2.39.2