From: caremoli Date: Tue, 28 Sep 2010 15:13:30 +0000 (+0000) Subject: CCAR: update with V5_1_main (28/09) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_Observer;p=modules%2Fgui.git CCAR: update with V5_1_main (28/09) --- diff --git a/configure.ac b/configure.ac index bf6d0b1f6..bc7d43df9 100644 --- a/configure.ac +++ b/configure.ac @@ -657,3 +657,5 @@ AC_OUTPUT([ \ idl/Makefile \ Makefile ]) + +AC_HACK_LIBTOOL diff --git a/doc/salome/gui/images/pref11.png b/doc/salome/gui/images/pref11.png index 39755e710..43b6fad6f 100755 Binary files a/doc/salome/gui/images/pref11.png and b/doc/salome/gui/images/pref11.png differ diff --git a/doc/salome/gui/images/pref41.png b/doc/salome/gui/images/pref41.png new file mode 100644 index 000000000..73f62b29d Binary files /dev/null and b/doc/salome/gui/images/pref41.png differ diff --git a/doc/salome/gui/input/salome_preferences.doc b/doc/salome/gui/input/salome_preferences.doc index a560371d1..19688a32b 100644 --- a/doc/salome/gui/input/salome_preferences.doc +++ b/doc/salome/gui/input/salome_preferences.doc @@ -209,4 +209,16 @@ resizing columns on expanding an object browser item. Entry, IOR and Reference entry columns in the Object Browser. +

Shortcuts Preferences

+ +\image html pref41.png + + + */ diff --git a/src/CAF/Makefile.am b/src/CAF/Makefile.am index a0fc8e5ff..e95bc4463 100755 --- a/src/CAF/Makefile.am +++ b/src/CAF/Makefile.am @@ -49,7 +49,8 @@ MOC_FILES = \ nodist_libcaf_la_SOURCES = $(MOC_FILES) nodist_salomeres_DATA = \ - CAF_msg_en.qm + CAF_msg_en.qm \ + CAF_msg_fr.qm libcaf_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx libcaf_la_LDFLAGS = $(QT_MT_LIBS) $(CAS_OCAF) $(CAS_OCAFVIS) diff --git a/src/CAF/resources/CAF_msg_en.ts b/src/CAF/resources/CAF_msg_en.ts index 590baaac3..ed2ac521d 100644 --- a/src/CAF/resources/CAF_msg_en.ts +++ b/src/CAF/resources/CAF_msg_en.ts @@ -1,27 +1,6 @@ - - + + + CAF_Application diff --git a/src/CAF/resources/CAF_msg_fr.ts b/src/CAF/resources/CAF_msg_fr.ts new file mode 100644 index 000000000..2a3397bb9 --- /dev/null +++ b/src/CAF/resources/CAF_msg_fr.ts @@ -0,0 +1,59 @@ + + + + + CAF_Application + + MEN_APP_EDIT + &Editer + + + INF_ALL_FILTER + Tous les Fichiers (*.*) + + + INF_ALL_DOCUMENTS_FILTER + Tous les Documents Lisibles + + + MEN_DESK_EDIT + &Editer + + + MEN_APP_EDIT_UNDO + &Défaire + + + MEN_APP_EDIT_REDO + &Refaire + + + PRP_APP_EDIT_REDO + Refaire la dernière opération + + + PRP_APP_EDIT_UNDO + Défaire la dernière opération + + + TOT_APP_EDIT_REDO + Refaire + + + TOT_APP_EDIT_UNDO + Défaire + + + INF_APP_REDOACTIONS + Refait %1 action(s) + + + INF_APP_UNDOACTIONS + Défait %1 action(s) + + + ABOUT_INFO + SUIT Caf application + + + diff --git a/src/CAM/CAM_Module.cxx b/src/CAM/CAM_Module.cxx index 39beee2d7..8e39ab66b 100755 --- a/src/CAM/CAM_Module.cxx +++ b/src/CAM/CAM_Module.cxx @@ -835,9 +835,10 @@ int CAM_Module::actionId( const QAction* a ) const */ QAction* CAM_Module::createAction( const int id, const QString& text, const QIcon& icon, const QString& menu, const QString& tip, const int key, - QObject* parent, const bool toggle, QObject* reciever, const char* member ) + QObject* parent, const bool toggle, QObject* reciever, + const char* member, const QString& shortcutAction ) { - QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle ); + QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction ); a->setStatusTip( tip ); if ( reciever && member ) diff --git a/src/CAM/CAM_Module.h b/src/CAM/CAM_Module.h index 73aaf71b9..2a3022d66 100755 --- a/src/CAM/CAM_Module.h +++ b/src/CAM/CAM_Module.h @@ -128,7 +128,7 @@ protected: bool unregisterAction( QAction* ); QAction* createAction( const int, const QString&, const QIcon&, const QString&, const QString&, const int, QObject* = 0, - const bool = false, QObject* = 0, const char* = 0 ); + const bool = false, QObject* = 0, const char* = 0, const QString& = QString() ); private: CAM_Application* myApp; //!< parent application object diff --git a/src/CAM/Makefile.am b/src/CAM/Makefile.am index cd568c63f..98630d977 100755 --- a/src/CAM/Makefile.am +++ b/src/CAM/Makefile.am @@ -51,7 +51,7 @@ MOC_FILES = \ CAM_DataModel_moc.cxx nodist_libCAM_la_SOURCES = $(MOC_FILES) -nodist_salomeres_DATA = CAM_msg_en.qm +nodist_salomeres_DATA = CAM_msg_en.qm CAM_msg_fr.qm libCAM_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../STD -I$(srcdir)/../Qtx libCAM_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/CAM/resources/CAM_msg_en.ts b/src/CAM/resources/CAM_msg_en.ts index 831ce43f1..6779ef228 100644 --- a/src/CAM/resources/CAM_msg_en.ts +++ b/src/CAM/resources/CAM_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/CAM/resources/CAM_msg_fr.ts b/src/CAM/resources/CAM_msg_fr.ts new file mode 100755 index 000000000..09e8fecd3 --- /dev/null +++ b/src/CAM/resources/CAM_msg_fr.ts @@ -0,0 +1,19 @@ + + + + + @default + + ERROR_TLT + Erreur + + + ERROR_ACTIVATE_MODULE_MSG + Impossible d'activer le module %1 + + + MODULE_ROOT_OBJECT_TOOLTIP + %1 objet-racine du module + + + diff --git a/src/GLViewer/Makefile.am b/src/GLViewer/Makefile.am index 1eec79e89..e134a769f 100644 --- a/src/GLViewer/Makefile.am +++ b/src/GLViewer/Makefile.am @@ -111,7 +111,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ GLViewer_images.qm \ - GLViewer_msg_en.qm + GLViewer_msg_en.qm \ + GLViewer_msg_fr.qm libGLViewer_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx libGLViewer_la_LDFLAGS = $(QT_MT_LIBS) $(CAS_KERNEL) $(OGL_LIBS) diff --git a/src/GLViewer/resources/GLViewer_msg_en.ts b/src/GLViewer/resources/GLViewer_msg_en.ts index 667a0a688..d99e2af4c 100644 --- a/src/GLViewer/resources/GLViewer_msg_en.ts +++ b/src/GLViewer/resources/GLViewer_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/GLViewer/resources/GLViewer_msg_fr.ts b/src/GLViewer/resources/GLViewer_msg_fr.ts new file mode 100755 index 000000000..fa5eff43f --- /dev/null +++ b/src/GLViewer/resources/GLViewer_msg_fr.ts @@ -0,0 +1,117 @@ + + + + + @default + + DSC_FITSELECT + Montrer la zone choisie dans la vue + + + ERROR + Erreur + + + MNU_DUMP_VIEW + Clicher + + + MNU_PAN_VIEW + Redimensionnement + + + DSC_GLOBALPAN_VIEW + Sélection d'un nouveau centre de vue + + + MNU_ZOOM_VIEW + Zoomer + + + DSC_PAN_VIEW + Redimensionner la vue + + + DSC_FITALL + Montrer tous les objets dans la vue + + + MNU_FITALL + Montrer Tous + + + MNU_GLOBALPAN_VIEW + Redimensionnement Global + + + INF_APP_DUMP_VIEW + Clicher la vue + + + GL_IMAGE_FILES + Fichiers Images (*.bmp *.png) + + + MNU_RESET_VIEW + Restaurer + + + DSC_FITRECT + Montrer la zone dans la vue + + + MNU_FITRECT + Montrer la zone + + + CHANGE_BGCOLOR + Changee la couleur d'arrier-plan... + + + DSC_DUMP_VIEW + Sauvegarder la vue en cours au fichier image + + + MNU_FITSELECT + Montrer la Sélection + + + DSC_ZOOM_VIEW + Zoomer la vue + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + ERR_DOC_CANT_SAVE_FILE + Impossible de sauvegarder le fichier + + + LBL_TOOLBAR_LABEL + Opérations de Visualisation + + + + GLViewer_ViewFrame + + DUMP_VIEW_SAVE_FILE_DLG_CAPTION + Sauvegarder la Vue Clichée au Fichier + + + DUMP_VIEW_ERROR_DLG_TEXT + Impossible de Sauvegarder la Vue Clichée au Fichier + + + DUMP_VIEW_ERROR_DLG_CAPTION + Erreur + + + + GLViewer_ViewManager + + GL_VIEW_TITLE + GL Scène:%M - visualisateur:%V + + + diff --git a/src/LightApp/LightApp.qrc b/src/LightApp/LightApp.qrc new file mode 100644 index 000000000..ffcce9a7b --- /dev/null +++ b/src/LightApp/LightApp.qrc @@ -0,0 +1,7 @@ + + + images/en.png + images/fr.png + + + diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 1c2be69d3..60fbb1f64 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -231,6 +232,8 @@ LightApp_Application::LightApp_Application() : CAM_Application( false ), myPrefs( 0 ) { + Q_INIT_RESOURCE( LightApp ); + STD_TabDesktop* desk = new STD_TabDesktop(); setDesktop( desk ); @@ -1596,6 +1599,9 @@ void LightApp_Application::showPreferences( const QString& itemText ) if ( desktop() ) resourceMgr()->setValue( "desktop", "geometry", desktop()->storeGeometry() ); resourceMgr()->save(); + + // Update shortcuts + shortcutMgr()->updateShortcuts(); } delete prefDlg; @@ -1854,6 +1860,19 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemIcon( salomeCat, Qtx::scaleIcon( resourceMgr()->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false ), 20 ) ); int genTab = pref->addPreference( tr( "PREF_TAB_GENERAL" ), salomeCat ); + + int langGroup = pref->addPreference( tr( "PREF_GROUP_LANGUAGE" ), genTab ); + pref->setItemProperty( "columns", 2, langGroup ); + int curLang = pref->addPreference( tr( "PREF_CURRENT_LANGUAGE" ), langGroup, + LightApp_Preferences::Selector, "language", "language" ); + QStringList aLangs = SUIT_Session::session()->resourceMgr()->stringValue( "language", "languages", "en" ).split( "," ); + QList aIcons; + foreach ( QString aLang, aLangs ) { + aIcons << QPixmap( QString( ":/images/%1" ).arg( aLang ) ); + } + pref->setItemProperty( "strings", aLangs, curLang ); + pref->setItemProperty( "icons", aIcons, curLang ); + int studyGroup = pref->addPreference( tr( "PREF_GROUP_STUDY" ), genTab ); pref->setItemProperty( "columns", 2, studyGroup ); @@ -2143,6 +2162,12 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->addPreference( tr( "PREF_RESIZE_ON_EXPAND_ITEM" ), objSetGroup, LightApp_Preferences::Bool, "ObjectBrowser", "resize_on_expand_item" ); + // Shortcuts preferences + int shortcutTab = pref->addPreference( tr( "PREF_TAB_SHORTCUTS" ), salomeCat ); + int shortcutGroup = pref->addPreference( tr( "PREF_GROUP_SHORTCUTS" ), shortcutTab ); + pref->addPreference( tr( "" ), shortcutGroup, + LightApp_Preferences::ShortcutTree, "shortcuts" ); + // MRU preferences int mruGroup = pref->addPreference( tr( "PREF_GROUP_MRU" ), genTab, LightApp_Preferences::Auto, "MRU", "show_mru" ); pref->setItemProperty( "columns", 4, mruGroup ); @@ -2435,6 +2460,10 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString mru->setVisible( resMgr->booleanValue( "MRU", "show_mru", false ) ); // do not show MRU menu item by default } } + if ( sec == "language" && param == "language" ) + { + SUIT_MessageBox::information( desktop(), tr( "WRN_WARNING" ), tr( "LANG_CHANGED" ) ); + } } /*! diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 7fa22775f..b06fc08fa 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -222,6 +223,14 @@ bool LightApp_Module::activateModule( SUIT_Study* study ) if ( mySwitchOp == 0 ) mySwitchOp = new LightApp_SwitchOp( this ); + // Enable Display and Erase actions + if ( action(myDisplay) ) + action(myDisplay)->setEnabled(true); + if ( action(myErase) ) + action(myErase)->setEnabled(true); + + application()->shortcutMgr()->setSectionEnabled( moduleName() ); + /* BUG 0020498 : The Entry column is always shown at module activation The registration of column is moved into LightApp_Application @@ -253,6 +262,14 @@ bool LightApp_Module::deactivateModule( SUIT_Study* study ) anIt.value()->abort(); } + // Disable Display and Erase action + if ( action(myDisplay) ) + action(myDisplay)->setEnabled(false); + if ( action(myErase) ) + action(myErase)->setEnabled(false); + + application()->shortcutMgr()->setSectionEnabled( moduleName(), false ); + /* BUG 0020498 : The Entry column is always shown at module activation QString EntryCol = QObject::tr( "ENTRY_COLUMN" ); LightApp_DataModel* m = dynamic_cast( dataModel() ); @@ -388,9 +405,9 @@ QtxPopupMgr* LightApp_Module::popupMgr() QAction *disp = createAction( -1, tr( "TOP_SHOW" ), p, tr( "MEN_SHOW" ), tr( "STB_SHOW" ), - 0, d, false, this, SLOT( onShowHide() ) ), + 0, d, false, this, SLOT( onShowHide() ), QString("General:Show object(s)") ), *erase = createAction( -1, tr( "TOP_HIDE" ), p, tr( "MEN_HIDE" ), tr( "STB_HIDE" ), - 0, d, false, this, SLOT( onShowHide() ) ), + 0, d, false, this, SLOT( onShowHide() ) , QString("General:Hide object(s)") ), *dispOnly = createAction( -1, tr( "TOP_DISPLAY_ONLY" ), p, tr( "MEN_DISPLAY_ONLY" ), tr( "STB_DISPLAY_ONLY" ), 0, d, false, this, SLOT( onShowHide() ) ), *eraseAll = createAction( -1, tr( "TOP_ERASE_ALL" ), p, tr( "MEN_ERASE_ALL" ), tr( "STB_ERASE_ALL" ), diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index c1d8006d2..0e4a30755 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -27,6 +27,10 @@ # include $(top_srcdir)/adm_local/unix/make_common_starter.am +EXTRA_DIST += images + +QRC_FILES = qrc_LightApp.cxx + lib_LTLIBRARIES = libLightApp.la salomeinclude_HEADERS = \ @@ -157,8 +161,7 @@ endif if ENABLE_PLOT2DVIEWER MOC_FILES += LightApp_Plot2dSelector_moc.cxx endif -nodist_libLightApp_la_SOURCES = $(MOC_FILES) - +nodist_libLightApp_la_SOURCES = $(MOC_FILES) $(QRC_FILES) dist_salomeres_DATA = \ resources/icon_about.png \ resources/icon_applogo.png \ @@ -171,7 +174,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ LightApp_images.qm \ - LightApp_msg_en.qm + LightApp_msg_en.qm \ + LightApp_msg_fr.qm libLightApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \ $(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \ diff --git a/src/LightApp/images/en.png b/src/LightApp/images/en.png new file mode 100644 index 000000000..ff701e19f Binary files /dev/null and b/src/LightApp/images/en.png differ diff --git a/src/LightApp/images/fr.png b/src/LightApp/images/fr.png new file mode 100644 index 000000000..8332c4ec2 Binary files /dev/null and b/src/LightApp/images/fr.png differ diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index db336784e..bdfbfae04 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -33,6 +33,7 @@
+
@@ -55,6 +56,8 @@
+ + @@ -175,4 +178,27 @@
+ +
+ +
+
+ + +
+
+ + + + + + + +
+
+ + + + +
diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 1d391cd0f..aabf97e72 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default @@ -58,6 +37,11 @@ CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS LightApp_Application + + LANG_CHANGED + Application language has been changed. +The changes will be applied on the next application session. + MEN_DESK_THEME Theme @@ -462,6 +446,14 @@ CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITASPREF_HOR_AXIS_SCALE Horizontal axis scale: + + PREF_GROUP_LANGUAGE + Language + + + PREF_CURRENT_LANGUAGE + Current language + PREF_GROUP_STUDY Study properties @@ -641,8 +633,17 @@ File does not exist PREFERENCES_NOT_SUPPORTED - Preferences for module "%1" not supported + Preferences for module "%1" not supported + + + PREF_TAB_SHORTCUTS + Shortcuts + + + PREF_GROUP_SHORTCUTS + Shortcuts settings + LightApp_Module @@ -699,7 +700,7 @@ File does not exist LightApp_ModuleDlg DESCRIPTION - You're activating module + You're activating module <b>%1</b>.<br>Please, select required action by pressing the corresponding button below. diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts new file mode 100755 index 000000000..c1491a8ba --- /dev/null +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -0,0 +1,752 @@ + + + + + @default + + EXTERNAL_BROWSER_CANNOT_SHOW_PAGE + Le navigateur externe "%1" ne peut pas trouver la page de référence "%2". Voulez-vous changer sa location dans les préférences? + + + ABOUT_COPYRIGHT + Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE + +Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, +CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + + + ABOUT_CAPTION + A propos de %1 + + + APP_NAME + SALOME + + + ABOUT_LICENSE + GNU LGPL + + + ABOUT_VERSION + Version %1 + + + ENTRY_COLUMN + Entrée + + + + LightApp_Application + + LANG_CHANGED + La langue de l'application a été modifié. +Les modifications seront appliquées à la suivante session de l'application. + + + MEN_DESK_THEME + T&hème + + + TOT_THEME + Thème + + + PRP_THEME + Changer les propriétés du style + + + INF_TOOLBAR_MODULES + Modules + + + PREF_SHOW_LEGEND + Montrer la légende + + + MEN_DESK_RENAME + &Renommer + + + PREF_MULTI_FILE + Sauvegarder multi-fichier + + + MEN_DESK_PREFERENCES + &Préférences... + + + PREF_TRIHEDRON_SHOW + Montrer le trièdre + + + PREF_TRIHEDRON_SIZE + Taille du Trièdre + + + OBJECT_BROWSER + Navigateur d'Objets + + + PRP_DESK_PREFERENCES + Permettre de changer les préférences + + + PREF_GROUP_DIRECTORIES + Liste rapide de répertoires + + + PREF_GROUP_VTKVIEWER + Visualisateur VTK 3D + + + PREF_STORE_POS + Retenir les positions des fenêtres + + + PREF_AUTO_SAVE + Intervale d'enregistrement automatique (min) + + + PREF_AUTO_SAVE_DISABLED + Désactivé + + + PREF_PROJECTION_MODE + Mode de Projection: + + + PREF_ORTHOGRAPHIC + Orthogonal + + + PREF_PERSPECTIVE + Perspective + + + PREF_NAVIGATION + Navigation: + + + PREF_STANDARD_STYLE + Contrôles types Salomé + + + PREF_KEYFREE_STYLE + Style sans clavier + + + PREF_INCREMENTAL_SPEED + Incrément de vitesse: + + + PREF_INCREMENTAL_SPEED_MODE + Mode de Modification: + + + PREF_ARITHMETIC + Progression Arithmétique + + + PREF_GEOMETRICAL + Progression Géométrique + + + PREF_FRAME_SPACEMOUSE + Souris Spaciale + + + PREF_SHOW_STATIC_TRIHEDRON + Montrer le trièdre statique + + + PREF_SPACEMOUSE_FUNC_1 + Rediure l'incrément de vitesse + + + PREF_SPACEMOUSE_FUNC_2 + Rediure l'incrément de vitesse + + + PREF_SPACEMOUSE_FUNC_3 + Changement Dominant / Combiné + + + PREF_SPACEMOUSE_BTN_1 + Bouton 1 + + + PREF_SPACEMOUSE_BTN_2 + Bouton 2 + + + PREF_SPACEMOUSE_BTN_3 + Bouton 3 + + + PREF_SPACEMOUSE_BTN_4 + Bouton 4 + + + PREF_SPACEMOUSE_BTN_5 + Bouton 5 + + + PREF_SPACEMOUSE_BTN_6 + Bouton 6 + + + PREF_SPACEMOUSE_BTN_7 + Bouton 7 + + + PREF_SPACEMOUSE_BTN_8 + Bouton 8 + + + PREF_SPACEMOUSE_BTN_* + Bouton * + + + PREF_SPACEMOUSE_BTN_10 + Bouton 10 + + + PREF_SPACEMOUSE_BTN_11 + Bouton 11 + + + PREF_FRAME_RECORDING + Renregistrement AVI + + + PREF_ALL_DISLPAYED_FRAMES + Enregistrer tous les cadres visualisés + + + PREF_FPS + FPS + + + PREF_GROUP_TTL + Paramètres + + + PREF_PROGRESSIVE + Progressive + + + PREF_QUALITY + Qualité + + + PREF_RECORDING_MODE + Mode + + + PREF_SKIPPED_FRAMES + Enregistrer aux FPS donnés + + + PREF_FRAME_GROUP_NAMES + Noms des groupes + + + PREF_GROUP_NAMES_TEXT_COLOR + Couleur du Texte + + + PREF_GROUP_NAMES_TRANSPARENCY + Transparence + + + PREF_BOTTOM + Dessous + + + PREF_CURVE_TYPE + Type de Courbe: + + + PREF_ISOS_U + Numéro des isolignes au long de U + + + PREF_ISOS_V + Numéro des isolignes au long de V + + + PREF_POINTS + Points + + + PRP_MODULE + Changer au module "%1" + + + PREF_ASCII_FILE + Enregistrement ASCII + + + PREFERENCES_NOT_LOADED + Les préférences du module "<b>%N</b>" seront accessibles aussitôt que le module soit choisi + + + PREF_LINEAR + Linéaire + + + DATA_MODELS + Modèles de Données + + + PRP_RENAME + Renommer la fenêtre active + + + TOT_RENAME + Renommer + + + LOG_WINDOW + Fenêtre de Messages + + + PREF_SPLINE + Spline + + + PREF_OBJ_BROWSER_SEARCH_TOOL + Outil de recherche + + + PREF_AUTO_HIDE_SEARCH_TOOL + Activer auto-cacher + + + PREF_OBJ_BROWSER_SETTINGS + Paramètres du Navigateur d'Objets + + + PRP_APP_MODULE + Tourner au point neutre de la plate-forme SALOME + + + PREF_GROUP_PY_CONSOLE + Propriétés du console Python + + + PREF_GROUP_STYLE + Style Salomé + + + PREF_USE_SALOME_STYLE + Utiliser le style Salome + + + PREF_MARKER_SIZE + Taille de repère: + + + PREF_TAB_VIEWERS + Visualisateurs + + + PREF_APP + Application + + + PREF_TOP + Dessus + + + MEN_REFRESH + Rafraîchir + + + PREF_AUTO_SIZE_FIRST + Taille automatique pour la première colonne + + + PREF_RESIZE_ON_EXPAND_ITEM + Redimensionner les colonnes de l'objet agrandi + + + PREF_GROUP_SUPERV + Superviseur des Graphes + + + PREF_TAB_OBJBROWSER + Navigateur d'objets + + + PREF_TAB_GENERAL + Général + + + NEW_WINDOW_0 + Vue &GL + + + NEW_WINDOW_1 + Vue &Plot2d + + + NEW_WINDOW_2 + Vue &OCC + + + NEW_WINDOW_3 + Vue VT&K + + + NEW_WINDOW_4 + Vue &QxGraph + + + NEW_WINDOW_5 + Vue Qx&Scene + + + OBJ_BROWSER_NAME + Objet + + + PREF_LEGEND_POSITION + Position de la Légende: + + + PREF_RELATIVE_SIZE + Taille Relative + + + PREF_VIEWER_BACKGROUND + Couleur de l'arrière-plan + + + PREF_FONT + Font + + + PREF_LEFT + Gauche + + + PREF_TAB_DIRECTORIES + Répertoires + + + ACTIVATING_MODULE + Essayer d'activer le module "%1" + + + PREF_VERT_AXIS_SCALE + Echelle de l'axe verticale: + + + PREF_HOR_AXIS_SCALE + Echelle de l'axe horisontale: + + + PREF_GROUP_LANGUAGE + Langue + + + PREF_CURRENT_LANGUAGE + Langue actuel + + + PREF_GROUP_STUDY + Propiétés d'une Etude + + + PREF_CATEGORY_SALOME + SALOME + + + PREF_GROUP_OCCVIEWER + Visualisateur OCC 3D + + + PREF_LOGARITHMIC + Logarithmique + + + MEN_DESK_MODULE_HELP + Module &Aide + + + PREF_SUPERV_TITLE_COLOR + Couleur titre + + + PREF_PARAM + Paramètres + + + PREF_RIGHT + Droit + + + PREF_LINES + Lignes + + + INF_CANCELLED + L'activation du module est annulée + + + PREF_GROUP_EXT_BROWSER + Navigateur Externe + + + PREF_SUPERV_CTRL_COLOR + Couleur alternatif + + + PREF_GROUP_DEF_COLUMNS + Colonnnes de Défaut + + + PREF_GROUP_PLOT2DVIEWER + Visualisateur Plot2d + + + MEN_DESK_MRU + &Récemment Utilisés + + + TOT_DESK_PREFERENCES + Préférences + + + DEFINE_EXTERNAL_BROWSER + Le navigateur externe n'est pas trouvé. Voulez-vous le définir dans les préférences? + + + PREF_AUTO_SIZE + Taille automatique pour les autres colonnes + + + TOT_DESK_MRU + Récemment utilisés + + + ACTIVATE_MODULE_OP_NEW + &Nouveau + + + ACTIVATE_MODULE_OP_OPEN + &Ouvrir... + + + PYTHON_CONSOLE + Console Python + + + PREF_USE_ADVANCED_SELECTION_ALGORITHM + Utiliser l'Algorithme Avancé de Sélection + + + TOT_CLOSE + Fermer + + + MEN_DESK_CLOSE + &Fermer + + + PRP_CLOSE + Fermer la fenêtre active + + + TOT_CLOSE_ALL + Fermer tous + + + MEN_DESK_CLOSE_ALL + Fermer &Tous + + + PRP_CLOSE_ALL + Fermer toutes les fenêtres + + + TOT_GROUP_ALL + Grouper Tous + + + MEN_DESK_GROUP_ALL + &Grouper Tous + + + PRP_GROUP_ALL + Grouper toutes les fenêtres + + + ERR_DOC_NOT_EXISTS + Impossible d'ouvrir %1. +Le fichier n'existe pas + + + PREF_GROUP_MRU + Montrer les objets MRU + + + PREF_MRU_VISIBLE_COUNT + Numéro d'objets MRU + + + PREF_MRU_INSERT_MODE + Mode d'Insértion + + + PREF_MRU_MOVE_FIRST + Placer au commencement + + + PREF_MRU_MOVE_LAST + Placer à la fin + + + PREF_MRU_ADD_FIRST + Ajouter au commencement + + + PREF_MRU_ADD_LAST + Ajouter à la fin + + + PREF_MRU_LINK_TYPE + Référence type + + + PREF_MRU_LINK_AUTO + Auto + + + PREF_MRU_LINK_SHORT + Court + + + PREF_MRU_LINK_FULL + Complet + + + PREFERENCES_NOT_SUPPORTED + Les préférences du module "%1" ne sont pas supportées + + + PREF_TAB_SHORTCUTS + Shortcuts + + + PREF_GROUP_SHORTCUTS + Shortcuts settings + + + + LightApp_Module + + MEN_HIDE + Cacher + + + TOP_DISPLAY_ONLY + Montrer seulement + + + STB_DISPLAY_ONLY + Montrer seulement + + + MEN_DISPLAY_ONLY + Montrer Seulement + + + TOP_HIDE + Cacher + + + MEN_ERASE_ALL + Cacher tous + + + STB_HIDE + Cacher + + + STB_SHOW + Montrer + + + TOP_SHOW + Montrer + + + MEN_SHOW + Montrer + + + STB_ERASE_ALL + Cacher tous + + + TOP_ERASE_ALL + Cacher Tous + + + + LightApp_ModuleDlg + + DESCRIPTION + Vous activez le module + <b>%1</b>.<br>Choisissez l'action nécessaire avec la touche correspondante ci-dessous + + + CANCEL + &Annuler + + + CAPTION + Activer le module + + + + LightApp_NameDlg + + TLT_RENAME + Renommer + + + NAME_LBL + Nom: + + + + LightApp_PreferencesDlg + + IMPORT_PREFERENCES + Importer les préférences + + + CAPTION + Préférences + + + WARNING + Avertissement + + + IMPORT_BTN_TEXT + Importer + + + DEFAULT_QUESTION + Voulez-vous restaurer les préférences de défaut? + + + DEFAULT_BTN_TEXT + Defauts + + + diff --git a/src/LogWindow/Makefile.am b/src/LogWindow/Makefile.am index 492ebb8ff..166a2ac56 100755 --- a/src/LogWindow/Makefile.am +++ b/src/LogWindow/Makefile.am @@ -37,7 +37,8 @@ MOC_FILES = LogWindow_moc.cxx nodist_libLogWindow_la_SOURCES = $(MOC_FILES) nodist_salomeres_DATA = \ - LogWindow_msg_en.qm + LogWindow_msg_en.qm \ + LogWindow_msg_fr.qm libLogWindow_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx libLogWindow_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/LogWindow/resources/LogWindow_msg_en.ts b/src/LogWindow/resources/LogWindow_msg_en.ts index 91681176b..a7421d837 100644 --- a/src/LogWindow/resources/LogWindow_msg_en.ts +++ b/src/LogWindow/resources/LogWindow_msg_en.ts @@ -1,27 +1,6 @@ - - + + LogWindow diff --git a/src/LogWindow/resources/LogWindow_msg_fr.ts b/src/LogWindow/resources/LogWindow_msg_fr.ts new file mode 100755 index 000000000..1fc2bc231 --- /dev/null +++ b/src/LogWindow/resources/LogWindow_msg_fr.ts @@ -0,0 +1,42 @@ + + + + + LogWindow + + + EDIT_COPY_CMD + &Copier + + + + EDIT_CLEAR_CMD + &Effacer + + + + EDIT_SELECTALL_CMD + Choisir &Tous + + + + EDIT_SAVETOFILE_CMD + &Sauvegarder le journal au fichier... + + + + ERR_ERROR + Erreur + + + + ERR_CANT_SAVE_FILE + Impossible de sauvegarder le fichier + + + + BUT_OK + &OK + + + diff --git a/src/OCCViewer/Makefile.am b/src/OCCViewer/Makefile.am index 65d59fc7e..a9ab7c7c7 100755 --- a/src/OCCViewer/Makefile.am +++ b/src/OCCViewer/Makefile.am @@ -105,7 +105,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ OCCViewer_images.qm \ - OCCViewer_msg_en.qm + OCCViewer_msg_en.qm \ + OCCViewer_msg_fr.qm libOCCViewer_la_CPPFLAGS = $(QT_INCLUDES) $(OGL_INCLUDES) $(CAS_CPPFLAGS) \ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../OpenGLUtils diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index ee2ba5cb8..fd0992fba 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -1039,46 +1039,54 @@ void OCCViewer_ViewWindow::createActions() // Projections aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FRONT" ) ), - tr( "MNU_FRONT_VIEW" ), 0, this); + tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view"); aAction->setStatusTip(tr("DSC_FRONT_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onFrontView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, FrontId ); aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BACK" ) ), - tr( "MNU_BACK_VIEW" ), 0, this); + tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view"); aAction->setStatusTip(tr("DSC_BACK_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onBackView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, BackId ); aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TOP" ) ), - tr( "MNU_TOP_VIEW" ), 0, this); + tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view"); aAction->setStatusTip(tr("DSC_TOP_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onTopView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, TopId ); aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BOTTOM" ) ), - tr( "MNU_BOTTOM_VIEW" ), 0, this); + tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view"); aAction->setStatusTip(tr("DSC_BOTTOM_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onBottomView())); + this->addAction(aAction); + this->addAction(aAction); toolMgr()->registerAction( aAction, BottomId ); - + aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_LEFT" ) ), - tr( "MNU_LEFT_VIEW" ), 0, this); + tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view"); aAction->setStatusTip(tr("DSC_LEFT_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onLeftView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, LeftId ); aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RIGHT" ) ), - tr( "MNU_RIGHT_VIEW" ), 0, this); + tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view"); aAction->setStatusTip(tr("DSC_RIGHT_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onRightView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, RightId ); // Reset aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); + tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view"); aAction->setStatusTip(tr("DSC_RESET_VIEW")); connect(aAction, SIGNAL(triggered()), this, SLOT(onResetView())); + this->addAction(aAction); toolMgr()->registerAction( aAction, ResetId ); // Clone diff --git a/src/OCCViewer/resources/OCCViewer_msg_en.ts b/src/OCCViewer/resources/OCCViewer_msg_en.ts index 5fcc11b74..8b19e4c5b 100644 --- a/src/OCCViewer/resources/OCCViewer_msg_en.ts +++ b/src/OCCViewer/resources/OCCViewer_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/OCCViewer/resources/OCCViewer_msg_fr.ts b/src/OCCViewer/resources/OCCViewer_msg_fr.ts new file mode 100755 index 000000000..501547e8a --- /dev/null +++ b/src/OCCViewer/resources/OCCViewer_msg_fr.ts @@ -0,0 +1,310 @@ + + + + + @default + + MNU_FRONT_VIEW + Devant + + + ERROR + Erreur + + + MNU_DUMP_VIEW + Sauvegarder la scène + + + DSC_TOP_VIEW + Vue de dessus + + + MNU_PAN_VIEW + Panoramique + + + MNU_CLONE_VIEW + Dupliquer la scène + + + DSC_SHOW_TRIHEDRE + Monter/Cacher les axes de coordonnées dans la scène + + + MNU_SHOW_TRIHEDRE + Monter/Cacher les axes de coordonnées + + + MNU_TOP_VIEW + Dessus + + + DSC_GLOBALPAN_VIEW + Sélection d'un nouveau centre de la vue + + + DSC_ROTATE_VIEW + Tourner le point de vue autour du centre de la scène + + + MNU_ZOOM_VIEW + Zoom + + + DSC_PAN_VIEW + Redimensionner la vue + + + DSC_LEFT_VIEW + Vue de gauche + + + DSC_SHOOT_VIEW + Memorizer l'état courant de la scène et l'ajouter dans la liste + + + DSC_FITALL + Redimentionner la scène pour montrer tous les objets + + + MNU_FITALL + Montrer tous + + + MNU_ROTATE_VIEW + Rotation + + + DSC_FRONT_VIEW + Vue de devant + + + MNU_ROTATIONPOINTGRAVITY_VIEW + Point de Rotation : le centre de gravité + + + MNU_GLOBALPAN_VIEW + Panoramique globale + + + INF_APP_DUMP_VIEW + Clicher la vue + + + DSC_CLIPPING + Définir le plan de découpe + + + DSC_CLONE_VIEW + Ouvrir une nouvelle fenêtre de visualisation pour la scène en cours + + + INF_APP_SHOOT_VIEW + Sauvegarder la scène + + + MNU_CLIPPING + Plan de coupe + + + MNU_BACK_VIEW + Arrière + + + MNU_SHOOT_VIEW + Memorizer la Vue + + + DSC_CHANGINGROTATIONPOINT_VIEW + Changer le point, autour duquel la scène est tournée + + + MNU_BOTTOM_VIEW + Dessous + + + MNU_RESET_VIEW + Restaurer le point de vue + + + MNU_LEFT_VIEW + Gauche + + + DSC_RIGHT_VIEW + Vue de droit + + + MNU_CHANGINGROTATIONPOINT_VIEW + Changer le point de rotation + + + DSC_FITRECT + Redimensionner la scène pour ne montrer que sa partie choisie par l'encadré + + + MNU_FITRECT + Montrer l'encadré + + + DSC_BOTTOM_VIEW + Vue de dessous + + + DSC_DUMP_VIEW + Sauvegarder la scène en cours au fichier image + + + DSC_ZOOM_VIEW + Zoom la vue + + + MNU_ROTATIONPOINT000_VIEW + Point de Rotation : (0,0,0) + + + MNU_ROTATIONPOINTSELECTED_VIEW + Point de Rotation : le point choisi par l'utilisateur + + + DSC_RESET_VIEW + Restaurer le point de vue + + + ERR_DOC_CANT_SAVE_FILE + Il est impossible de sauvegarder le fichier + + + DSC_PRESETS_VIEW + Restaurer l'état mémorisé de la scène courante + + + MNU_PRESETS_VIEW + Restaurer la vue + + + MNU_RIGHT_VIEW + Droit + + + INF_APP_PRESETS_VIEW + Restaurer la scène + + + LBL_TOOLBAR_LABEL + Opérations de visualisation + + + DSC_BACK_VIEW + Vue d'arrière + + + DSC_SCALING + Changer l'échelle des axes de coordonnées + + + MNU_SCALING + Changer l'échelle + + + DSC_AMBIENT + Ne montrer que la lumière d'ambiance + + + MNU_AMBIENT + Ne montrer que la lumière d'ambiance + + + DSC_STYLE_SWITCH + Changer le style d'intéraction + + + MNU_STYLE_SWITCH + Changer le style d'intéraction + + + OCC_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg) + + + + OCCViewer_CreateRestoreViewDlg + + CAPTION + Restaurer la vue + + + + OCCViewer_SetRotationPointDlg + + LBL_X + X: + + + LBL_Y + Y: + + + LBL_Z + Z: + + + USE_BBCENTER + Utiliser le Centre du Cadre d'Objet + + + LBL_TOORIGIN + Implanter á l'Origine + + + CAPTION + Indiquer le point de rotation + + + LBL_SELECTPOINT + Choisir le Point dans la Vue + + + + OCCViewer_ViewManager + + OCC_VIEW_TITLE + Scène OCC :%M - visualisateur:%V + + + + OCCViewer_Viewer + + MEN_DUMP_VIEW + Sauvegarder la Vue + + + MEN_SHOW_TOOLBAR + Montrer la Barre d'Outils + + + MEN_CHANGE_BACKGROUD + Changer l'Arrière Plan + + + + OCCViewer_AxialScaleDlg + + DLG_SCALING + Changer l'échelle des axes + + + LBL_X + X: + + + LBL_Y + Y: + + + LBL_Z + Z: + + + diff --git a/src/ObjBrowser/Makefile.am b/src/ObjBrowser/Makefile.am index aa46ccd37..0e0f32a6e 100755 --- a/src/ObjBrowser/Makefile.am +++ b/src/ObjBrowser/Makefile.am @@ -45,7 +45,7 @@ MOC_FILES = \ nodist_libObjBrowser_la_SOURCES = $(MOC_FILES) -nodist_salomeres_DATA = OB_msg_en.qm +nodist_salomeres_DATA = OB_msg_en.qm OB_msg_fr.qm libObjBrowser_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../Qtx libObjBrowser_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/ObjBrowser/resources/OB_msg_en.ts b/src/ObjBrowser/resources/OB_msg_en.ts index cddaea49a..ae666a88d 100644 --- a/src/ObjBrowser/resources/OB_msg_en.ts +++ b/src/ObjBrowser/resources/OB_msg_en.ts @@ -1,26 +1,6 @@ - - + + + OB_Browser diff --git a/src/ObjBrowser/resources/OB_msg_fr.ts b/src/ObjBrowser/resources/OB_msg_fr.ts new file mode 100755 index 000000000..5717c12ee --- /dev/null +++ b/src/ObjBrowser/resources/OB_msg_fr.ts @@ -0,0 +1,38 @@ + + + + + OB_Browser + + MEN_EXPAND_ALL + Afficher Tous + + + MEN_COLLAPSE_ALL + Réduire Tous + + + MEN_FIND + Chercher + + + + OB_FindDlg + + FIND + Chercher + + + CLOSE + Fermer + + + CASE_SENSITIVE + Sensible à la casse + + + IS_REG_EXP + Expression Régulaire + + + diff --git a/src/Plot2d/Makefile.am b/src/Plot2d/Makefile.am index dac45b6e1..8cb2b6e21 100755 --- a/src/Plot2d/Makefile.am +++ b/src/Plot2d/Makefile.am @@ -87,7 +87,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ Plot2d_images.qm \ - Plot2d_msg_en.qm + Plot2d_msg_en.qm \ + Plot2d_msg_fr.qm libPlot2d_la_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) $(QWT_INCLUDES) \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index b2fc5e26e..7dcafc445 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -363,6 +363,10 @@ bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e ) } break; } + case QEvent::ContextMenu: + // Fix from SLN + // Do nothing because context menu is called from MouseRelease + return true; } } return QWidget::eventFilter( watched, e ); diff --git a/src/Plot2d/Plot2d_ViewModel.cxx b/src/Plot2d/Plot2d_ViewModel.cxx index 2e912da1a..a36346e0b 100755 --- a/src/Plot2d/Plot2d_ViewModel.cxx +++ b/src/Plot2d/Plot2d_ViewModel.cxx @@ -121,7 +121,9 @@ void Plot2d_Viewer::update() void Plot2d_Viewer::clearPrs() { SUIT_ViewManager* aMgr = getViewManager(); - QVector aViews = aMgr->getViews(); + QVector aViews; + if ( aMgr ) + aViews = aMgr->getViews(); unsigned int aSize = aViews.size(); for (uint i = 0; i < aSize; i++) { Plot2d_ViewWindow* aView = (Plot2d_ViewWindow*)aViews[i]; diff --git a/src/Plot2d/resources/Plot2d_msg_en.ts b/src/Plot2d/resources/Plot2d_msg_en.ts index 3a084267f..08b09ca76 100644 --- a/src/Plot2d/resources/Plot2d_msg_en.ts +++ b/src/Plot2d/resources/Plot2d_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/Plot2d/resources/Plot2d_msg_fr.ts b/src/Plot2d/resources/Plot2d_msg_fr.ts new file mode 100755 index 000000000..01ee4c8fe --- /dev/null +++ b/src/Plot2d/resources/Plot2d_msg_fr.ts @@ -0,0 +1,511 @@ + + + + + @default + + PLOT2D_CURVE_TYPE_LBL + Type de Courbe: + + + ERROR + Erreur + + + PLOT2D_SET_AS_DEFAULT_CHECK + Enregistrer comme les paramètres de defaut + + + TLT_SETUP_CURVE + Initialiser une Courbe + + + MNU_DUMP_VIEW + Clicher la vue... + + + PLOT2D_SCALE_MODE_HOR + Axe Horizontale: + + + PLOT2D_SCALE_MODE_VER + Axe Verticale: + + + MNU_PAN_VIEW + Panoramique + + + MNU_CLONE_VIEW + Cloner la Vue + + + POSTSCRIPT_FILES + Fichiers PostScript (*.ps) + + + ENCAPSULATED_POSTSCRIPT_FILES + Fichiers PostScript Encapsulés (*.eps) + + + DSC_GLOBALPAN_VIEW + Sélection d'un nouveau centre de la vue + + + PRP_PLOT2D_MODE_LINEAR_VER + Changer la vue au mode d'échelle linéaire au long de l'axe verticale + + + PRP_PLOT2D_MODE_LINEAR_HOR + Changer la vue au mode d'échelle linéaire au long de l'axe horizontale + + + CURVE_LINE_WIDTH_LAB + Largeur de la Ligne: + + + CURVE_TYPE_POPUP + Type de Courbe + + + TOT_PLOT2D_MODE_LINEAR_VER + Axe verticale: linéaire + + + TOT_PLOT2D_MODE_LINEAR_HOR + Axe horizontale: linéaire + + + FIT_DATA_TLT + Montrer le diapason des données + + + MNU_ZOOM_VIEW + Zoom + + + PLOT2D_GRID_TLT + Maillage / Repères des Axes + + + DSC_PAN_VIEW + Redimensionner la vue + + + DASHDOT_LINE_LBL + TiretPoint + + + PRP_PLOT2D_CURVES_SPLINES + Changer le mode de vue aux splines + + + INF_AXES_X + Axe X + + + PLOT2D_SCALE_TLT + Mode d'échelle + + + DSC_FITALL + Montrer tous les objets + + + MNU_FITALL + Montrer tous + + + TOT_PLOT2D_MODE_LOGARITHMIC_HOR + Axe horizontale: logarithmique + + + TOT_PLOT2D_MODE_LOGARITHMIC_VER + Axe Verticale: logarithmique + + + MNU_GLOBALPAN_VIEW + Panoramique Globale + + + INF_APP_DUMP_VIEW + Clicher la vue + + + PLOT2D_LEGEND_POSITION_BOTTOM + Dessous + + + INF_COORDINATES + Coordonnées: X : %1, Y : %2 + + + DSC_CLONE_VIEW + Ouvrir un nouveau visualisateur OCC pour la scène actuelle + + + DASH_LINE_LBL + Tiret + + + DTRIANGLE_MARKER_LBL + Triangle orienté en bas + + + UTRIANGLE_MARKER_LBL + Triangle orienté en haut + + + LTRIANGLE_MARKER_LBL + Triangle orienté à Gauche + + + RTRIANGLE_MARKER_LBL + Triangle orienté à droit + + + RECTANGLE_MARKER_LBL + Rectangle + + + TLT_SETUP_PLOT2D_VIEW + Plot 2d Paramètres de Visualisation + + + CURVE_LINE_TYPE_LAB + Type de la Ligne: + + + CROSS_MARKER_LBL + Croix + + + XCROSS_MARKER_LBL + Croix Diagonale + + + PLOT2D_ENABLE_VER_TITLE + Titre de l'axe Verticale + + + PLOT2D_ENABLE_HOR_TITLE + Titre d'Axe Horizontale + + + TOT_PLOT2D_SETTINGS + Paramètres + + + PLOT2D_CURVE_TYPE_LINES + Lignes + + + MEN_PLOT2D_CURVES_SPLINES + Dessiner les Splines + + + PRP_PLOT2D_MODE_LOGARITHMIC_HOR + Changer la vue au mode d'échelle logarithmique au long de l'axe horizontale + + + PRP_PLOT2D_MODE_LOGARITHMIC_VER + Changer la vue au mode d'échelle logarithmique au long de l'axe verticale + + + PLOT2D_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg) + + + PLOT2D_MAX_INTERVALS + Intervalles Maximaux + + + INF_AXES_Y_LEFT + Axe Y Gauche + + + CURVE_COLOR_LAB + Couleur: + + + CURVE_PREVIEW_LAB + Prévisualiser + + + DIAMOND_MARKER_LBL + Diamant + + + PLOT2D_LEGEND_POSITION_TOP + Dessus + + + TOT_PLOT2D_CHANGE_BACKGROUND + Changer l'arrière-plan + + + MEN_PLOT2D_CHANGE_BACKGROUND + Changer l'Arrère-Plan... + + + PRP_PLOT2D_CHANGE_BACKGROUND + Changer la couleur d'arrière plan + + + SOLID_LINE_LBL + Solide + + + PLOT2D_GRID_ENABLE_VER_MAJOR + La Verticale majeure + + + PLOT2D_GRID_ENABLE_HOR_MAJOR + La horizontale majeure + + + PLOT2D_GRID_ENABLE_VER_MINOR + La Verticale mineure + + + TOT_PLOT2D_CURVES_POINTS + Dessiner points + + + PLOT2D_GRID_ENABLE_HOR_MINOR + La horizontale mineure + + + PLOT2D_BACKGROUND_COLOR_LBL + Couleur d'arrière-plan: + + + WRN_XLOG_NOT_ALLOWED + On a détecté des points avec les valeurs non-positives sur l'abscisse. +L'échelle logarithmique de l'abscisse n'est pas permise. + + + WRN_YLOG_NOT_ALLOWED + On a détecté des points avec les valeurs non-positives sur l'ordonnée. +L'échelle logarithmique de l'ordonnée n'est pas permise. + + + DSC_FITRECT + Montrer la zone choisie par l'encadré + + + PLOT2D_LEGEND_POSITION_LEFT + Gauche + + + MNU_FITRECT + Montrer la Zone + + + DOT_LINE_LBL + Point + + + MEN_PLOT2D_CURVES_POINTS + Dessiner les Points + + + PRP_PLOT2D_CURVES_POINTS + Changer le mode de vue aux points + + + PLOT2D_SCALE_MODE_LOGARITHMIC + Logarithmique + + + PLOT2D_LEGEND_POSITION_RIGHT + Droit + + + DSC_DUMP_VIEW + Sauvegarder la vue actuelle au fichier image + + + WARNING + Avertissement + + + PLOT2D_ENABLE_LEGEND + Montrer la légende + + + DSC_ZOOM_VIEW + Zoomer la vue + + + PRP_PLOT2D_SETTINGS + Indiquer les paramètres de visualisation + + + INF_COORDINATES_SOME_Y + Coordonnées: X : %1, Y : %2 ( %3 ) + + + SCALING_POPUP + Echelle + + + PLOT2D_SCALE_MODE_LINEAR + Linéaire + + + TOT_PLOT2D_FITDATA + Montrer le Diapason + + + PLOT2D_CURVE_TYPE_POINTS + Points + + + PLOT2D_CURVE_TYPE_SPLINE + Spline + + + MEN_PLOT2D_FITDATA + Montrer &Ranger + + + MEN_PLOT2D_MODE_LOGARITHMIC_HOR + Axe Horizontale: Logarithmique + + + MEN_PLOT2D_MODE_LOGARITHMIC_VER + Axe Verticale: Logarithmique + + + PRP_PLOT2D_FITDATA + Monter le diapason de données indiqué + + + MEN_PLOT2D_MODE_LINEAR_VER + Axe Verticale: Linéaire + + + MEN_PLOT2D_MODE_LINEAR_HOR + Axe Horizontale: Linéaire + + + NONE_MARKER_LBL + Zéro + + + ERR_DOC_CANT_SAVE_FILE + Impossible de sauvegarder le fichier + + + MEN_PLOT2D_SHOW_LEGEND + Montrer &Légende + + + PRP_PLOT2D_SHOW_LEGEND + Activer/désactiver la légende + + + TOT_PLOT2D_SHOW_LEGEND + Montrer la Légende + + + INF_AXES_Y_RIGHT + Axe Y Droite + + + DAHSDOTDOT_LINE_LBL + TiretPointPoint + + + TOT_PLOT2D_CURVES_SPLINES + Dessiner splines + + + CURVE_MARKER_TYPE_LAB + Type de Repère: + + + MEN_PLOT2D_SETTINGS + &Paramètres + + + CIRCLE_MARKER_LBL + Circle + + + LBL_TOOLBAR_LABEL + Opérations de visualisation + + + NONE_LINE_LBL + Zéro + + + PLOT2D_MARKER_SIZE_LBL + Repère de Taille: + + + PLOT2D_ENABLE_MAIN_TITLE + Titre principal + + + TOT_PLOT2D_CURVES_LINES + Dessiner Lignes + + + PRP_PLOT2D_CURVES_LINES + Changer le mode de vue aux lignes + + + MEN_PLOT2D_CURVES_LINES + Dessiner les Lignes + + + + Plot2d_FitDataDlg + + FIT_HORIZONTAL + Montrer horizontale + + + MIN_VALUE_LAB + Min: + + + VERTICAL_AXIS + Axe Verticale + + + MAX_VALUE_LAB + Max: + + + HORIZONTAL_AXIS + Axe Horizontale + + + VERTICAL_LEFT_AXIS + Axe Gauche Verticale + + + FIT_ALL + Montrer tous + + + VERTICAL_RIGHT_AXIS + Axe droite verticale + + + FIT_VERTICAL + Montrer verticale + + + + Plot2d_ViewManager + + PLOT2D_VIEW_TITLE + Plot2d scène:%M - visualisateur:%V + + + diff --git a/src/PyConsole/Makefile.am b/src/PyConsole/Makefile.am index fe0b4a1f6..e28a2b67f 100755 --- a/src/PyConsole/Makefile.am +++ b/src/PyConsole/Makefile.am @@ -44,7 +44,8 @@ MOC_FILES = \ nodist_libPyConsole_la_SOURCES = $(MOC_FILES) nodist_salomeres_DATA = \ - PyConsole_msg_en.qm + PyConsole_msg_en.qm \ + PyConsole_msg_fr.qm libPyConsole_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) \ -I$(srcdir)/../PyInterp -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx diff --git a/src/PyConsole/resources/PyConsole_msg_en.ts b/src/PyConsole/resources/PyConsole_msg_en.ts index 986b476b1..85393a2bf 100644 --- a/src/PyConsole/resources/PyConsole_msg_en.ts +++ b/src/PyConsole/resources/PyConsole_msg_en.ts @@ -1,28 +1,6 @@ - - + + PyConsole_Console @@ -50,7 +28,6 @@ D&ump commands - PyConsole_Editor @@ -58,8 +35,8 @@ Dump commands - PYTHON_FILES_FILTER - PYTHON Files (*.py) + PYTHON_FILES_FILTER + PYTHON Files (*.py) diff --git a/src/PyConsole/resources/PyConsole_msg_fr.ts b/src/PyConsole/resources/PyConsole_msg_fr.ts new file mode 100755 index 000000000..c582d387e --- /dev/null +++ b/src/PyConsole/resources/PyConsole_msg_fr.ts @@ -0,0 +1,42 @@ + + + + + PyConsole_Console + + + EDIT_COPY_CMD + &Copier + + + + EDIT_PASTE_CMD + C&oller + + + + EDIT_CLEAR_CMD + &Effacer + + + + EDIT_SELECTALL_CMD + Choisir &Tous + + + EDIT_DUMPCOMMANDS_CMD + C&licher les commandes + + + + PyConsole_Editor + + TOT_DUMP_PYCOMMANDS + C&licher les commandes + + + PYTHON_FILES_FILTER + Fichiers PYTHON (*.py) + + + diff --git a/src/QDS/Makefile.am b/src/QDS/Makefile.am index cd641de0d..ff1bdea07 100755 --- a/src/QDS/Makefile.am +++ b/src/QDS/Makefile.am @@ -82,7 +82,7 @@ MOC_FILES = \ nodist_libQDS_la_SOURCES = $(MOC_FILES) -nodist_salomeres_DATA = QDS_msg_en.qm +nodist_salomeres_DATA = QDS_msg_en.qm QDS_msg_fr.qm libQDS_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) \ -I$(srcdir)/../Qtx -I$(srcdir)/../DDS diff --git a/src/QDS/resources/QDS_msg_en.ts b/src/QDS/resources/QDS_msg_en.ts index 0caa8c1f2..2388719f0 100644 --- a/src/QDS/resources/QDS_msg_en.ts +++ b/src/QDS/resources/QDS_msg_en.ts @@ -1,27 +1,6 @@ - - + + + QDS_Datum @@ -50,7 +29,7 @@ DATA_SHOULD_BE_VALUE - Should be%1 value + Should be %1 value DATA_INTEGER diff --git a/src/QDS/resources/QDS_msg_fr.ts b/src/QDS/resources/QDS_msg_fr.ts new file mode 100755 index 000000000..c31b476a1 --- /dev/null +++ b/src/QDS/resources/QDS_msg_fr.ts @@ -0,0 +1,51 @@ + + + + + QDS_Datum + + DATA_ERR_TITLE + Valeur incorrecte du paramètre + + + DATA_STRING + ligne non-vide + + + DATA_NON_EMPTY + non-vide + + + DATA_MIN_LIMIT + est plus de %1 + + + DATA_FLOAT + réelle + + + DATA_RANGE + au diapason [%1, %2] + + + DATA_SHOULD_BE_VALUE + Une valeur %1 est nécessaire + + + DATA_INTEGER + entière + + + DATA_INCORRECT_VALUE + La Valeur du paramètre "%1" n'est pas correcte. + + + DATA_MAX_LIMIT + est moins de %1 + + + DATA_INPUT_VALUE + Indiquez une valeur correcte. + + + diff --git a/src/Qtx/Makefile.am b/src/Qtx/Makefile.am index 771008a03..610935c55 100755 --- a/src/Qtx/Makefile.am +++ b/src/Qtx/Makefile.am @@ -67,7 +67,7 @@ salomeinclude_HEADERS = \ QtxResourceMgr.h \ QtxRubberBand.h \ QtxSearchTool.h \ - QtxShortcutEdit.h \ + QtxShortcutEdit.h \ QtxSplash.h \ QtxToolBar.h \ QtxToolTip.h \ @@ -192,3 +192,6 @@ nodist_libqtx_la_SOURCES = $(MOC_FILES) libqtx_la_CPPFLAGS = $(QT_INCLUDES) libqtx_la_LDFLAGS = $(QT_MT_LIBS) + +nodist_salomeres_DATA = \ + Qtx_msg_fr.qm diff --git a/src/Qtx/QtxAction.cxx b/src/Qtx/QtxAction.cxx index 0bc9508aa..b706f850a 100755 --- a/src/Qtx/QtxAction.cxx +++ b/src/Qtx/QtxAction.cxx @@ -67,14 +67,19 @@ private: Creates an action owned by \a parent. Parameter \a toggle can be used to make the action checkable. + Parameter \a shortcutAction can be used to assign the shortcut from + preferences. This parameter value corresponds to shortcut action identifier + in shortcut preferences. \param parent parent object \param toggle if \c true the action will be a toggle action + \param shortcutAction shortcut action identifier */ -QtxAction::QtxAction( QObject* parent, bool toggle ) +QtxAction::QtxAction( QObject* parent, bool toggle, const QString& shortcutAction ) : QWidgetAction( parent ) { setCheckable( toggle ); + setShortcutActionName(shortcutAction); QApplication::instance()->installEventFilter( this ); } @@ -85,6 +90,9 @@ QtxAction::QtxAction( QObject* parent, bool toggle ) Creates an action owned by \a parent. Parameters \a text, \a icon, \a menuText and \a accel specify the action's attributes. Parameter \a toggle can be used to make the action checkable. + Parameter \a shortcutAction can be used to assign the shortcut from + preferences. This parameter value corresponds to shortcut action identifier + in shortcut preferences. \param text tooltip text \param icon iconset @@ -92,9 +100,10 @@ QtxAction::QtxAction( QObject* parent, bool toggle ) \param accel shortcut key sequence \param parent parent object \param toggle if \c true the action will be a toggle action + \param shortcutAction shortcut action identifier */ -QtxAction::QtxAction( const QString& text, const QIcon& icon, - const QString& menuText, int accel, QObject* parent, bool toggle ) +QtxAction::QtxAction( const QString& text, const QIcon& icon, const QString& menuText, + int accel, QObject* parent, bool toggle, const QString& shortcutAction ) : QWidgetAction( parent ) { setIcon( icon ); @@ -102,6 +111,7 @@ QtxAction::QtxAction( const QString& text, const QIcon& icon, setToolTip( text ); setShortcut( accel ); setCheckable( toggle ); + setShortcutActionName(shortcutAction); QApplication::instance()->installEventFilter( this ); } @@ -112,22 +122,27 @@ QtxAction::QtxAction( const QString& text, const QIcon& icon, Creates an action owned by \a parent. Parameters \a text, \a menuText and \a accel specify the action's attributes. Parameter \a toggle can be used to make the action checkable. + Parameter \a shortcutAction can be used to assign the shortcut from + preferences. This parameter value corresponds to shortcut action identifier + in shortcut preferences. \param text tooltip text \param menuText menu text \param accel shortcut key sequence \param parent parent object \param toggle if \c true the action is a toggle action + \param shortcutAction shortcut action identifier */ QtxAction::QtxAction( const QString& text, const QString& menuText, - int accel, QObject* parent, bool toggle ) + int accel, QObject* parent, bool toggle, const QString& shortcutAction ) : QWidgetAction( parent ) { setText( menuText ); setToolTip( text ); setShortcut( accel ); setCheckable( toggle ); - + setShortcutActionName(shortcutAction); + QApplication::instance()->installEventFilter( this ); } @@ -208,3 +223,27 @@ void QtxAction::customEvent( QEvent* e ) else removedFrom( ae->widget() ); } + +/*! + \brief Return shortcut action name for the action. + + \return shortcut action name + \sa setShortcutActionName() +*/ +QString QtxAction::shortcutActionName() const +{ + return myShortcutActionName; +} + +/*! + \brief Set shortcut action name to the action. + + Shortcut action name is used for shortcuts customization. + + \param shortcutAction shortcut action name + \sa shortcutActionName() +*/ +void QtxAction::setShortcutActionName( const QString& shortcutAction ) +{ + myShortcutActionName = shortcutAction; +} diff --git a/src/Qtx/QtxAction.h b/src/Qtx/QtxAction.h index c7a87293f..4536fa5ba 100755 --- a/src/Qtx/QtxAction.h +++ b/src/Qtx/QtxAction.h @@ -43,18 +43,24 @@ class QTX_EXPORT QtxAction : public QWidgetAction class ActionNotify; public: - QtxAction( QObject* = 0, bool = false ); - QtxAction( const QString&, const QString&, int, QObject*, bool = false ); - QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, bool = false ); + QtxAction( QObject* = 0, bool = false, const QString& = QString() ); + QtxAction( const QString&, const QString&, int, QObject*, bool = false, const QString& = QString() ); + QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, bool = false, const QString& = QString() ); virtual ~QtxAction(); virtual bool eventFilter( QObject*, QEvent* ); + QString shortcutActionName() const; + void setShortcutActionName( const QString& ); + protected: virtual void addedTo( QWidget* ); virtual void removedFrom( QWidget* ); virtual void customEvent( QEvent* ); + +private: + QString myShortcutActionName; }; #ifdef WIN32 diff --git a/src/Qtx/QtxColorButton.cxx b/src/Qtx/QtxColorButton.cxx index af9a76673..173516dae 100644 --- a/src/Qtx/QtxColorButton.cxx +++ b/src/Qtx/QtxColorButton.cxx @@ -54,7 +54,7 @@ QtxColorButton::QtxColorButton( QWidget* parent ) : QToolButton( parent ) { setCheckable( false ); - setPopupMode( MenuButtonPopup ); + setPopupMode( InstantPopup ); QMenu* pm = new QMenu( this ); QGridLayout* grid = new QGridLayout( pm ); diff --git a/src/Qtx/QtxPagePrefMgr.cxx b/src/Qtx/QtxPagePrefMgr.cxx index 28a9db0d8..a67e97a5e 100644 --- a/src/Qtx/QtxPagePrefMgr.cxx +++ b/src/Qtx/QtxPagePrefMgr.cxx @@ -3071,7 +3071,7 @@ void QtxPagePrefSpinItem::setPrecision( const QVariant& prec ) if ( QtxDoubleSpinBox* dsb = ::qobject_cast( control() ) ) { if ( prec.canConvert( QVariant::Int ) ) { - dsb->setDecimals( prec.toInt() ); + dsb->setDecimals( qAbs( prec.toInt() ) ); dsb->setPrecision( prec.toInt() ); } } @@ -4245,7 +4245,17 @@ QtxPagePrefShortcutTreeItem::QtxPagePrefShortcutTreeItem( const QString& title, const QString& param ): QtxPageNamedPrefItem( title, parent, sect, "" ) { mySection = sect; + myShortcutTree = new QtxShortcutTree(); + + // Retrieve shortcuts common sections from resources + QtxResourceMgr* resMgr = resourceMgr(); + if ( resMgr ){ + QString generalSections = resourceMgr()->stringValue( "shortcuts_settings", "general_sections", QString() ); + QStringList sectionsList = generalSections.split( ";", QString::SkipEmptyParts ); + myShortcutTree->setGeneralSections( sectionsList ); + } + setControl( myShortcutTree ); } diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 0afcf7799..8328d8a0a 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #ifndef QT_NO_DOM #include #include @@ -2436,6 +2437,14 @@ void QtxResourceMgr::loadLanguage( const QString& pref, const QString& l ) else prefixList = parameters( resSection() ); + if ( pref.isEmpty() && lang != "en" ) { + // load Qt resources + QString qt_translations = QLibraryInfo::location( QLibraryInfo::TranslationsPath ); + QTranslator* trans = new QtxTranslator( 0 ); + if ( trans->load( QString("qt_%1").arg( lang ), qt_translations ) ) + QApplication::instance()->installTranslator( trans ); + } + for ( QStringList::ConstIterator iter = prefixList.begin(); iter != prefixList.end(); ++iter ) { QString prefix = *iter; diff --git a/src/Qtx/QtxShortcutEdit.cxx b/src/Qtx/QtxShortcutEdit.cxx index c5aa6eaa7..efa555de1 100755 --- a/src/Qtx/QtxShortcutEdit.cxx +++ b/src/Qtx/QtxShortcutEdit.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -251,13 +252,14 @@ bool QtxShortcutTree::eventFilter(QObject* obj, QEvent* event) if ( keyEvent->key() == Qt::Key_Delete || keyEvent->key() == Qt::Key_Backspace ) currentItem()->setText( 1, "" ); if ( text != "" ) { - currentItem()->setText( 1, text ); + if ( text.endsWith( "+" ) || checkUniqueness( currentItem(), text ) ) + currentItem()->setText( 1, text ); } return true; } if ( event->type() == QEvent::KeyRelease ) { if ( currentItem()->text( 1 ).endsWith( "+" ) ) - currentItem()->setText( 1, myPrevBindings[ currentItem()->parent()->text( 0 ) ][ currentItem()->text( 0 ) ] ); + currentItem()->setText( 1, myPrevBindings[ currentItem()->parent()->text( 0 ) ][ currentItem()->text( 0 ) ] ); else myPrevBindings[ currentItem()->parent()->text( 0 ) ][ currentItem()->text( 0 ) ] = currentItem()->text( 1 ); return true; @@ -277,7 +279,6 @@ void QtxShortcutTree::onCurrentItemChanged( QTreeWidgetItem* cur, QTreeWidgetIte prev->setText( 1, myPrevBindings[ prev->parent()->text( 0 ) ][ prev->text( 0 ) ] ); } - /*! \brief Set key bindings to the tree \param title the name of top-level item @@ -286,8 +287,12 @@ void QtxShortcutTree::onCurrentItemChanged( QTreeWidgetItem* cur, QTreeWidgetIte void QtxShortcutTree::setBindings( const QString& title, const ShortcutMap& theShortcutMap ) { QTreeWidgetItem* item= new QTreeWidgetItem(); + QFont font = item->font(0); + font.setBold(true); + if ( findItems( title, Qt::MatchFixedString ).isEmpty() ) { item->setText( 0, title ); + item->setFont( 0, font ); addTopLevelItem( item ); item->setFlags( Qt::ItemIsEnabled ); } else { @@ -315,10 +320,12 @@ ShortcutMap* QtxShortcutTree::bindings( const QString& sec ) const { ShortcutMap* aMap = new ShortcutMap(); QTreeWidgetItem* item = findItems( sec, Qt::MatchFixedString ).first(); - QList< QTreeWidgetItem* > childLst = item->takeChildren(); + int nbChildren = item->childCount(); - for( int i = 0; i < childLst.size(); i++ ) - aMap->insert( childLst.at(i)->text( 0 ), childLst.at(i)->text(1) ); + for( int i = 0; i < nbChildren; i++ ) { + QTreeWidgetItem* child = item->child(i); + aMap->insert( child->text( 0 ), child->text( 1 ) ); + } return aMap; } @@ -326,6 +333,72 @@ ShortcutMap* QtxShortcutTree::bindings( const QString& sec ) const void QtxShortcutTree::focusOutEvent ( QFocusEvent* event ) { QWidget::focusOutEvent( event ); - if ( currentItem()->isSelected() ) + if ( currentItem() && currentItem()->isSelected() ) currentItem()->setText( 1, myPrevBindings[ currentItem()->parent()->text( 0 ) ][ currentItem()->text( 0 ) ] ); } + +/*! + \brief Set the list of shortcuts general sections. + + Key combinations in general sections should not intersect + with any other key combinations. + + \param sectionsList list of common section names +*/ +void QtxShortcutTree::setGeneralSections( const QStringList& sectionsList ) +{ + myGeneralSections = sectionsList; +} + +/*! + \brief Check uniqueness of the shortcut. + \param item current item of the shortcut tree + \param shortcut shortcut appointed for the current item + \return \c true if the given shortcut is allowed +*/ +bool QtxShortcutTree::checkUniqueness( QTreeWidgetItem* item, const QString& shortcut ) +{ + // List of sections to check shortcut intersections + QStringList sectionsList; + + // Current section + QString currentSection = currentItem()->parent()->text( 0 ); + + // If the current section is general + if ( myGeneralSections.contains(currentSection) ) { + sectionsList = sections(); + int currentSectionIndex = sectionsList.indexOf(currentSection); + sectionsList.move( currentSectionIndex, 0); + } + else { + sectionsList = myGeneralSections; + sectionsList.prepend(currentSection); + } + + // Iterate on sections + QStringList::const_iterator it; + for( it = sectionsList.constBegin(); it != sectionsList.constEnd(); ++it ) { + QString section = *it; + + // Iterate on actual section + QTreeWidgetItem* sectionRoot = findItems( section, Qt::MatchFixedString ).first(); + int nbChildren = sectionRoot->childCount(); + + for( int i = 0; i < nbChildren; i++ ) { + QTreeWidgetItem* child = sectionRoot->child(i); + + if ( (child != item) && (shortcut == child->text( 1 )) ) { + bool res = QMessageBox::warning( parentWidget(), tr("Warning"), + tr("The \"%1\" shortcut has already used by the \"%2\" action.\n") + .arg(shortcut, section + ":" + child->text( 0 ) ) + + tr("Do you want to reassign it from that action to the current one?"), + QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes; + if (res) + child->setText( 1, "" ); + return res; + } + } + } + + return true; +} diff --git a/src/Qtx/QtxShortcutEdit.h b/src/Qtx/QtxShortcutEdit.h index 782402288..01791d761 100755 --- a/src/Qtx/QtxShortcutEdit.h +++ b/src/Qtx/QtxShortcutEdit.h @@ -69,16 +69,19 @@ public: void setBindings( const QString&, const ShortcutMap& ); ShortcutMap* bindings( const QString& ) const; QStringList sections() const; + void setGeneralSections( const QStringList& ); protected: virtual bool eventFilter( QObject*, QEvent* ); virtual void focusOutEvent( QFocusEvent* ); + virtual bool checkUniqueness( QTreeWidgetItem*, const QString& ); private slots: void onCurrentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* ); private: QMap< QString, ShortcutMap > myPrevBindings; + QStringList myGeneralSections; }; #endif // QTXSHORTCUTEDIT_H diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index d86270d85..437092838 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -124,7 +124,7 @@ void QtxTreeView::Header::contextMenuEvent( QContextMenuEvent* e ) QAction* sortAction = 0; if ( count() > 0 && myEnableSortMenu ) { menu.addSeparator(); - sortAction = menu.addAction( tr( "Enable sorting" ) ); + sortAction = menu.addAction( QtxTreeView::tr( "Enable sorting" ) ); sortAction->setCheckable( true ); sortAction->setChecked( isSortIndicatorShown() ); } diff --git a/src/Qtx/resources/Qtx_msg_fr.ts b/src/Qtx/resources/Qtx_msg_fr.ts new file mode 100644 index 000000000..346d564eb --- /dev/null +++ b/src/Qtx/resources/Qtx_msg_fr.ts @@ -0,0 +1,286 @@ + + + + + QtxTreeView + + Enable sorting + Activer le triage + + + + QtxWorkspaceAction + + Arranges the windows as overlapping tiles + Ranger les fenêtres en pavés superposés + + + Cascade + Cascade + + + Arranges the windows as nonoverlapping tiles + Ranger les fenêtres en pavés sans superposition + + + Tile + Pavé + + + Arranges the windows as nonoverlapping horizontal tiles + Ranger les fenêtres en pavés à l'horisontale et sans superposition + + + Tile horizontally + Ranger à l'horisontale + + + Arranges the windows as nonoverlapping vertical tiles + Ranger les fenêtres en pavés à la verticale et sans superposition + + + Tile vertically + Ranger au verticale + + + + QtxMainWindow + + Menu bar + Barre de menu + + + Status bar + Barre de statut + + + + QtxPathDialog + + Open file + Ouvrir le fichier + + + Save file + Sauvegarder le fichier + + + File name + Nom du fichier + + + File name not specified + Le nom du fichier n'est pas indiqué + + + File \"%1\" does not exist + Le fichier \"%1\" n'existe pas + + + File \"%1\" already exist. Do you want to overwrite it? + Le fichier \"%1\" déjà existe. Voulez-vous le réécrire? + + + Directory \"%1\" does not exist + Le répertoire \"%1\" n'existe pas + + + Directory \"%1\" can't be created because file with the same name exist + Il est impossible de créer le répertoire \"%1\" parce qu'un fichier avec ce nom déjà existe + + + Directory \"%1\" not empty. Do you want to remove all files in this directory? + Le répertoire \"%1\" n'est pas vide. Voulez-vous supprimer tous les fichier dans ce répertoire? + + + File dialog + Dialogue de fichier + + + All files (*.*) + Tous les fichiers (*.*) + + + + QtxFontEdit + + B + Bold + G + + + I + Italic + I + + + U + Underline + S + + + S + Strikethrough + R + + + + QtxPathListEdit + + Warning + Avertissement + + + Path \"%1\" doesn't exist. Add it to list anyway? + Le chemin \"%1\" n'existe pas. Faut-il l'ajouter dans la liste? + + + Error + Erreur + + + Location \"%1\" doesn't point to file + La location \"%1\" ne contient pas d'indication du fichier + + + Location \"%1\" doesn't point to directory + La location \"%1\" ne contient pas d'indication du répertoire + + + Path \"%1\" already exist in the list + Le chemin \"%1\" déjà existe dans la liste + + + + QtxMRUAction + + Most Recently Used + Récemment utilisés + + + Clear + Effacer + + + <Empty> + <Vide> + + + + QtxDialog + + &OK + &OK + + + &Cancel + &Annuler + + + C&lose + &Fermer + + + &Help + &Aide + + + &Apply + A&ppliquer + + + &Yes + &Oui + + + &No + &Non + + + + QtxSearchTool + + Case sensitive + Sensible à la casse + + + Regular expression + Expression régulaire + + + Wrap search + Terminer la recherche + + + + QtxSplash + + Error + Erreur + + + &OK + &OK + + + + QtxWorkstack + + Split vertically + Diviser verticalement + + + Split horizontally + Diviser horisontalement + + + Close + Fermer + + + Rename + Renommer + + + Enter new name: + Indiquer un nouveau nom + + + + QtxWorkstackAction + + Split the active window on two vertical parts + Diviser la fenêtre actuelle en deux parties verticales + + + Split vertically + Diviser à la verticale + + + Split the active window on two horizontal parts + Diviser la fenêtre actuelle en deux parties horisontales + + + Split horizontally + Diviser à l'horisontale + + + + QtxColorButton + + Auto + Auto + + + Other colors... + Autres couleurs... + + + + QtxColorScale + + Color scale + Echelle de couleurs + + + diff --git a/src/QxGraph/Makefile.am b/src/QxGraph/Makefile.am index a3ee2853c..d7366aee2 100755 --- a/src/QxGraph/Makefile.am +++ b/src/QxGraph/Makefile.am @@ -63,7 +63,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ QxGraph_images.qm \ - QxGraph_msg_en.qm + QxGraph_msg_en.qm \ + QxGraph_msg_fr.qm libQxGraph_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT diff --git a/src/QxGraph/resources/QxGraph_msg_en.ts b/src/QxGraph/resources/QxGraph_msg_en.ts index ddd193551..08f6833f9 100644 --- a/src/QxGraph/resources/QxGraph_msg_en.ts +++ b/src/QxGraph/resources/QxGraph_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/QxGraph/resources/QxGraph_msg_fr.ts b/src/QxGraph/resources/QxGraph_msg_fr.ts new file mode 100755 index 000000000..0a67787e4 --- /dev/null +++ b/src/QxGraph/resources/QxGraph_msg_fr.ts @@ -0,0 +1,31 @@ + + + + + @default + + MEN_CHANGE_BACKGROUND + Changer l'arrier-plan... + + + MNU_PAN_VIEW + Redimensionnement + + + DSC_PAN_VIEW + Redimensionner la vue + + + MNU_RESET_VIEW + Restaurer + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + LBL_TOOLBAR_LABEL + Opérations de Visualisation + + + diff --git a/src/QxScene/Makefile.am b/src/QxScene/Makefile.am index d877bf81e..72f9947c2 100755 --- a/src/QxScene/Makefile.am +++ b/src/QxScene/Makefile.am @@ -55,7 +55,8 @@ dist_salomeres_DATA= \ nodist_salomeres_DATA= \ QxSceneViewer_images.qm \ - QxSceneViewer_msg_en.qm + QxSceneViewer_msg_en.qm \ + QxSceneViewer_msg_fr.qm libQxScene_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT diff --git a/src/QxScene/resources/QxSceneViewer_msg_en.ts b/src/QxScene/resources/QxSceneViewer_msg_en.ts index 4ad001ec8..fe62d243d 100644 --- a/src/QxScene/resources/QxSceneViewer_msg_en.ts +++ b/src/QxScene/resources/QxSceneViewer_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/QxScene/resources/QxSceneViewer_msg_fr.ts b/src/QxScene/resources/QxSceneViewer_msg_fr.ts new file mode 100755 index 000000000..27fa779ac --- /dev/null +++ b/src/QxScene/resources/QxSceneViewer_msg_fr.ts @@ -0,0 +1,38 @@ + + + + + @default + + MEN_CHANGE_BACKGROUND + Changer l'arrier-plan + + + MNU_PAN_VIEW + Redimensionnement + + + DSC_PAN_VIEW + Redimensionner la vue + + + MNU_RESET_VIEW + Restaurer + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + LBL_TOOLBAR_LABEL + Opérations de Visualisation + + + + QxScene_ViewManager + + QXSCENE_VIEW_TITLE + QGraphics scène:%M - visualisateur:%V + + + diff --git a/src/STD/Makefile.am b/src/STD/Makefile.am index 7c023b577..2e8d99fb4 100755 --- a/src/STD/Makefile.am +++ b/src/STD/Makefile.am @@ -71,7 +71,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ STD_images.qm \ - STD_msg_en.qm + STD_msg_en.qm \ + STD_msg_fr.qm libstd_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx libstd_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/STD/resources/STD_msg_en.ts b/src/STD/resources/STD_msg_en.ts index b6c4b838d..d4b65578c 100644 --- a/src/STD/resources/STD_msg_en.ts +++ b/src/STD/resources/STD_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/STD/resources/STD_msg_fr.ts b/src/STD/resources/STD_msg_fr.ts new file mode 100755 index 000000000..caf464c0b --- /dev/null +++ b/src/STD/resources/STD_msg_fr.ts @@ -0,0 +1,490 @@ + + + + + @default + + TOT_DESK_EDIT_CUT + Découpe + + + PRP_DESK_EDIT_CUT + Couper la sélection et la placer dans la presse-papier + + + MEN_DESK_EDIT_CUT + &Découper + + + ERR_APP_NOAPP + Pas d'application + + + MEN_DESK_WINDOW + &Fenêtre + + + TOT_DESK_EDIT_COPY + Copier + + + MEN_DESK_WINDOW_CASCADE + &Cascade + + + PRP_DESK_EDIT_COPY + Copier la sélection dans la presse-papiers + + + PRP_DESK_WINDOW_CASCADE + Ranger les fenêtres en pavés superposés + + + TOT_DESK_FILE_SAVEAS + Enregistrer le document sous... + + + MEN_DESK_EDIT_COPY + &Copier + + + MSG_CANT_SAVE + Impossible de sauvegarder le fichier "%1". + + + INF_DESK_TOOLBAR_STANDARD + Standard + + + ALL_FILES + Tous les Fichiers (*.*) + + + DESK_DEFAULTTITLE + Qt Framework d'Applications + + + QUE_DESK_EXIT + Etes-vous sûr que vous voulez abandonner? + + + INF_INFO + Information + + + ERR_DOC_UNKNOWNTYPE_OPEN + Vous essayez d'ouvrir le document d'un type inconnu +( %1 ) + + + ERR_DOC_UNKNOWNTYPE_SAVE + Vous essayez de sauvegarder le document sous un type inconnu +( %1 ) + + + TOT_DESK_NEWWINDOW + Créer une nouvelle fenêtre + + + BUT_CANCEL + &Annuler + + + MEN_DESK_HELP_ABOUT + &A propos de... + + + PRP_DESK_NEWWINDOW + Créer une nouvelle Fenêtre + + + MEN_DESK_VIEW_STATUSBAR + &Barre de Status + + + MEN_DESK_NEWWINDOW + &Nouvelle Fenêtre + + + PRP_DESK_VIEW_STATUSBAR + Activer ou désactiver la barre de status + + + ERR_DOC_DIRWITHNAMEEXIST_SAVE + Impossible de sauvegarder le fichier %1. +Le répertoir avec ce nom existe sur la disque. Essayez d'utiliser un autre nom + + + BUT_NO + N&on + + + BUT_OK + O&k + + + FILTER_FILES + %1 Fichiers (%2) + + + PRP_DESK_WINDOW_ACTIVATE + Activer la fenêtre + + + TOT_DESK_FILE_PRINT + Imprimer un document + + + TOT_DESK_FILE_CLOSE + Fermer le document + + + TOT_DESK_FILE_NEW + Créer un nouveau document + + + PRP_DESK_FILE_NEW + Créer un nouveau document + + + PRP_DESK_FILE_MRU + Ouvrir un document + + + MEN_DESK_FILE_NEW + &Nouveau + + + MEN_DESK_FILE_MRU + &Fichiers Recents + + + TOT_DESK_EDIT_PASTE + Coller + + + MEN_DESK_VIEW_DOCKWINDOWS + W&indows + + + BUT_YES + O&ui + + + MEN_DESK_VIEW + &Vue + + + PRP_DESK_HELP_ABOUT + Montre la dialogue 'A propos' + + + MEN_DESK_FILE + Fic&hier + + + MEN_DESK_EDIT + &Editer + + + MEN_DESK_HELP + A&ide + + + ERR_ERROR + Erreur + + + ERR_DESK_NOAPP + Pas d'applications enregistrées + + + INF_DESK_DOC_CREATE + Créer un nouveau document + + + QUE_DOC_ALREADYOPEN + Le document %1 est déjà ouvert. +Voulez-vous le rouvrir? + + + BUT_APPLY + A&ppliquer + + + BUT_CLOSE + &Fermer + + + INF_DESK_EXIT + Abandonner + + + ERR_UNKNOWN + Erreur Inconnue + + + BUT_HELP + A&ide + + + PRP_DESK_FILE_CLOSE + Fermer le document actuel + + + PRP_DESK_FILE_PRINT + imprimer le document actuel + + + WRN_WARNING + Avertissement + + + TOT_DESK_HELP_ABOUT + A propos... + + + MEN_DESK_VIEW_TOOLBARS + Barres d'&Outils + + + PRP_DESK_WINDOW_HSPLIT + Diviser la fenêtre actuelle en deux parties horizontales + + + MEN_DESK_WINDOW_HSPLIT + Division &Horizontale + + + PRP_DESK_EDIT_PASTE + Insérer le contenu du Presse-papiers au point d'insertion + + + DLG_LOAD_STUDY_CAPTION + Ouvrir une Etude + + + PRP_DESK_HELP_SEARCH + Chercher de l'information sur le sujet + + + PRP_DESK_FILE_SAVEAS + Sauvegarder le document actuel sous un nouveau nom + + + INF_READY + Prêt + + + INF_CANCELLED + Annulé + + + PRP_DESK_WINDOW_VSPLIT + Diviser la fenêtre actuelle en deux parties verticales + + + MEN_DESK_WINDOW_VSPLIT + Division &Verticale + + + PRP_DESK_WINDOW_TILE + Ranger les fenêtres en pavés non-superposés + + + MEN_DESK_HELP_CONTENTS + &Contenu + + + PRP_DESK_HELP_CONTENTS + Montre le sommaire de la référence documentaire + + + MEN_DESK_WINDOW_HTILE + &Paver Horizontalement + + + MEN_DESK_WINDOW_VTILE + Paver Vertica&lement + + + ERR_DOC_PERMISSIONDENIED_SAVE + Impossible de sauvegardet le fichier %1. Authorisaton refusée. + + + INF_DESK_DOCALREADYOPEN + Impossible de sauvegarder le document sous un nom du document déjà ouvert. +Indiquez un autre nom du document que vous allez sauvegarder. +( %1 ) + + + TIT_FILE_SAVEAS + Enregistrer sous + + + MEN_DESK_FILE_CLOSE + Fer&mer + + + MSG_FILE_EXISTS + Le Fichier "%1" déjà existe. +Voulez-vous le réécrire? + + + MEN_DESK_FILE_PRINT + &Imprimer + + + MEN_DESK_HELP_SEARCH + &Recherche... + + + MEN_DESK_VIEW_STDTOOLBAR + &Standard + + + MEN_DESK_FILE_SAVEAS + Enre&gistrer Sous... + + + PRP_DESK_VIEW_STDTOOLBAR + Activer ou désactiver la barre usuelle + + + TOT_DESK_FILE_SAVE + Enregistrer un document + + + TOT_DESK_FILE_EXIT + Abandonner l'application + + + TOT_DESK_FILE_LOAD + Ouvrir le document + + + TOT_DESK_FILE_OPEN + Ouvrir un document + + + TOT_DESK_FILE_REOPEN + Rouvrir un document + + + PRP_DESK_FILE_EXIT + Abandonner l'application + + + PRP_DESK_FILE_OPEN + Ouvrir un document + + + PRP_DESK_FILE_REOPEN + Rouvrir le document actuel d'un fichier + + + PRP_DESK_FILE_SAVE + Sauvegarder le document actuel + + + PRP_DESK_FILE_LOAD + Ouvrir un document + + + PRP_DESK_WINDOW_HTILE + Ranger les fenêtres en pavés horizontales non-superposés + + + PRP_DESK_WINDOW_VTILE + Ranger les fenêtres en pavés verticales non-superposés + + + MEN_DESK_WINDOW_TILE + &Pavé + + + MEN_DESK_FILE_EXIT + A&bandonner + + + MEN_DESK_FILE_OPEN + &Ouvrir... + + + MEN_DESK_FILE_REOPEN + &Rouvrir + + + MEN_DESK_FILE_LOAD + Connec&ter... + + + MEN_DESK_FILE_SAVE + &Enregistrer + + + MEN_DESK_EDIT_PASTE + Co&ller + + + MEN_STUDIES_CHOICE + Choisir l'Etude Existante + + + + STD_Application + + INF_DOC_MODIFIED + Le document a été modifié. +Voulez-vous sauvegarder les modifications? + + + INF_DOC_SAVING + Sauvegarder l'étude + + + INF_DOC_SAVED + L'étude %1 est sauvegardée + + + TOT_DOCK_WINDOWS + Montrer / cacher les fenêtres encrables et les barres d'outils + + + MEN_DOCK_WINDOWS + Fenêtres et Barres d'outils + + + ABOUT_INFO + SUIT Std application + + + INF_DOC_SAVING_FAILS + Impossible de sauvegarder le fichier "%1". +Probablement, l'action n'est pas authorisée ou la disque est remplie. +Essayez d'utiliser un autre nom de fichier. + + + INF_DOCUMENT_MODIFIED + Le document "%1" a été modifié. +Voulez-vous sauvegarder les changements? + + + CLOSE_STUDY + Fermer l'étude actuelle + + + CLOSE_QUESTION + Voulez-vous sauvegarder l'étude avant de la fermer? + + + REOPEN_STUDY + Rouvrir l'étude + + + REOPEN_QUESTION + Voulez-vous rouvrir l'étude? +Toutes les modifications introduites après le dernier enregistrement seront perdues. + + + diff --git a/src/SUIT/Makefile.am b/src/SUIT/Makefile.am index 1cf970288..9b1df08d9 100755 --- a/src/SUIT/Makefile.am +++ b/src/SUIT/Makefile.am @@ -61,7 +61,8 @@ salomeinclude_HEADERS = \ SUIT_TreeModel.h \ SUIT_ViewManager.h \ SUIT_ViewModel.h \ - SUIT_ViewWindow.h + SUIT_ViewWindow.h \ + SUIT_ShortcutMgr.h dist_libsuit_la_SOURCES = \ SUIT_Accel.cxx \ @@ -92,7 +93,8 @@ dist_libsuit_la_SOURCES = \ SUIT_TreeModel.cxx \ SUIT_ViewManager.cxx \ SUIT_ViewModel.cxx \ - SUIT_ViewWindow.cxx + SUIT_ViewWindow.cxx \ + SUIT_ShortcutMgr.cxx MOC_FILES = \ SUIT_Accel_moc.cxx \ @@ -113,12 +115,14 @@ MOC_FILES = \ SUIT_TreeModel_moc.cxx \ SUIT_ViewManager_moc.cxx \ SUIT_ViewModel_moc.cxx \ - SUIT_ViewWindow_moc.cxx + SUIT_ViewWindow_moc.cxx \ + SUIT_ShortcutMgr_moc.cxx nodist_libsuit_la_SOURCES = $(MOC_FILES) nodist_salomeres_DATA = \ - SUIT_msg_en.qm + SUIT_msg_en.qm \ + SUIT_msg_fr.qm libsuit_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../Qtx -I$(srcdir)/../ObjBrowser diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 7624b5c6a..e7129b5e8 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -26,6 +26,7 @@ #include "SUIT_Session.h" #include "SUIT_Desktop.h" #include "SUIT_ResourceMgr.h" +#include "SUIT_ShortcutMgr.h" #include #include @@ -37,6 +38,7 @@ #include #include + /*! \class StatusLabel \brief Status bar customization label. Used to workaroubd desktop resizing bug. @@ -123,6 +125,9 @@ void SUIT_Application::start() { if ( desktop() ) desktop()->show(); + + // Initialize shortcut manager + SUIT_ShortcutMgr::Init(); } /*! @@ -174,6 +179,15 @@ SUIT_ResourceMgr* SUIT_Application::resourceMgr() const return SUIT_Session::session()->resourceMgr(); } +/*! + \brief Get access to shortcut manager. + \return global shortcut manager +*/ +SUIT_ShortcutMgr* SUIT_Application::shortcutMgr() const +{ + return SUIT_ShortcutMgr::getShortcutMgr(); +} + #define DEFAULT_MESSAGE_DELAY 3000 /*! @@ -612,9 +626,10 @@ QList SUIT_Application::actionIds() const */ QAction* SUIT_Application::createAction( const int id, const QString& text, const QIcon& icon, const QString& menu, const QString& tip, const int key, - QObject* parent, const bool toggle, QObject* reciever, const char* member ) + QObject* parent, const bool toggle, QObject* reciever, + const char* member, const QString& shortcutAction ) { - QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle ); + QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction ); a->setStatusTip( tip ); if ( reciever && member ) diff --git a/src/SUIT/SUIT_Application.h b/src/SUIT/SUIT_Application.h index e04cee4f5..3773977fc 100755 --- a/src/SUIT/SUIT_Application.h +++ b/src/SUIT/SUIT_Application.h @@ -37,6 +37,7 @@ class QWidget; class SUIT_Desktop; class SUIT_ViewModel; class SUIT_ResourceMgr; +class SUIT_ShortcutMgr; class SUIT_Study; #ifdef WIN32 @@ -97,6 +98,8 @@ public: SUIT_ResourceMgr* resourceMgr() const; + SUIT_ShortcutMgr* shortcutMgr() const; + //! Puts the message to the status bar void putInfo ( const QString&, const int = 0 ); @@ -164,7 +167,8 @@ protected: int registerAction( const int, QAction* ); QAction* createAction( const int, const QString&, const QIcon&, const QString&, const QString&, const int, QObject* = 0, - const bool = false, QObject* = 0, const char* = 0 ); + const bool = false, QObject* = 0, const char* = 0, + const QString& = QString() ); protected slots: virtual void onDesktopActivated(); @@ -173,6 +177,7 @@ private: SUIT_Study* myStudy; SUIT_Desktop* myDesktop; QMap myActionMap; + SUIT_ShortcutMgr* myShortcutMgr; QLabel* myStatusLabel; }; diff --git a/src/SUIT/SUIT_ShortcutMgr.cxx b/src/SUIT/SUIT_ShortcutMgr.cxx new file mode 100644 index 000000000..44eb8a950 --- /dev/null +++ b/src/SUIT/SUIT_ShortcutMgr.cxx @@ -0,0 +1,187 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "SUIT_ShortcutMgr.h" + +#include "SUIT_Session.h" +#include "SUIT_ResourceMgr.h" + +#include + +#include +#include + +SUIT_ShortcutMgr* SUIT_ShortcutMgr::myShortcutMgr = NULL; + +/*! + \brief Constructor +*/ +SUIT_ShortcutMgr::SUIT_ShortcutMgr() +: QObject() +{ + qApp->installEventFilter( this ); +} + +/*! + \brief Destructor +*/ +SUIT_ShortcutMgr::~SUIT_ShortcutMgr() +{ + qApp->removeEventFilter( this ); +} + +/*! + \brief Create new instance of shortcut manager. +*/ +void SUIT_ShortcutMgr::Init() +{ + if( myShortcutMgr==NULL ) + myShortcutMgr = new SUIT_ShortcutMgr(); +} + +/*! + \brief Return shortcut manager. +*/ +SUIT_ShortcutMgr* SUIT_ShortcutMgr::getShortcutMgr() +{ + Init(); + + return myShortcutMgr; +} + +/*! + \brief Custom event filter for qapplication . + + Redefined from QObject::eventFilter(); +*/ +bool SUIT_ShortcutMgr::eventFilter( QObject* o, QEvent* e ) +{ + if ( e->type() == QEvent::ActionAdded ) { + QActionEvent* anActionEvent = (QActionEvent*)e; + if (anActionEvent) { + QtxAction* anAction = qobject_cast( anActionEvent->action() ); + if ( anAction ) + processAction( anAction ); + } + } + + return QObject::eventFilter( o, e ); +} + +/*! + \brief Return key sequence for shortcut action name. + \param actionName name of shortcut action in preferences + \return key sequence defined in preferences or empty sequence +*/ +QKeySequence SUIT_ShortcutMgr::getShortcutByActionName( const QString& actionName ) const +{ + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + + QString section = actionName.section( resMgr->sectionsToken(), 0, 0 ); + section.prepend( QString("shortcuts") + resMgr->sectionsToken() ); + QString parameter = actionName.section( resMgr->sectionsToken(), 1, 1 ); + + QString shortcutValue; + bool hasValue = resMgr->value( section, parameter, shortcutValue, false ); + + if ( !hasValue ) + return QKeySequence(); + + return QKeySequence::fromString( shortcutValue ); +} + +/*! + \brief Set shortcut to the given action if the shortcut is defined. + \param action action to process + */ +void SUIT_ShortcutMgr::processAction( QtxAction* action ) +{ + QString shortcutActionName = action->shortcutActionName(); + + if ( !shortcutActionName.isEmpty() ) { + // Add action to the actions map + if ( !myShortcutActions.contains( shortcutActionName, action ) ) { + myShortcutActions.insert( shortcutActionName, action ); + connect( action, SIGNAL( destroyed( QObject* ) ), + this, SLOT ( onActionDestroyed( QObject* ) ) ); + } + + QKeySequence keySeq = getShortcutByActionName( shortcutActionName ); + action->setShortcut( keySeq ); + } +} + +/*! + \brief Enable/disable a shortcuts section. + + Enables or disables actions which belong to the given shortcuts section. + Only actions which have an active desktop as a parent widget + are taken into account. + + \param section shorcuts section + \param on if \c true - action will be enabled, otherwise - disabled +*/ +void SUIT_ShortcutMgr::setSectionEnabled( const QString& section, const bool on ) +{ + QMap::ConstIterator it; + for ( it = myShortcutActions.constBegin(); it != myShortcutActions.constEnd(); ++it ) { + QtxAction* action = it.value(); + QString shortcutActionName = action->shortcutActionName(); + QString actionSection = shortcutActionName.section( ":", 0, 0 ); + if ( actionSection == section ) { + // Check if the action parent widget equals to the active desktop + SUIT_Application* app = SUIT_Session::session()->activeApplication(); + if ( !app ) + return; + if ( action->parentWidget() == (QWidget*)app->desktop() ) + action->setEnabled( on ); + } + } +} + +/*! + \brief Update shortcuts from preferences. +*/ +void SUIT_ShortcutMgr::updateShortcuts() +{ + QMap::ConstIterator it; + for ( it = myShortcutActions.constBegin(); it != myShortcutActions.constEnd(); ++it ) { + QtxAction* action = it.value(); + QKeySequence keySeq = getShortcutByActionName( action->shortcutActionName() ); + action->setShortcut( keySeq ); + } +} + +/*! + \brief Called when the corresponding action is destroyed. + + Removes destroyed action from the actions list. + + \param obj action being destroyed +*/ +void SUIT_ShortcutMgr::onActionDestroyed( QObject* obj ) +{ + QtxAction* anAction = (QtxAction*)obj; + + if ( anAction ) + myShortcutActions.remove( anAction->shortcutActionName(), anAction ); +} diff --git a/src/SUIT/SUIT_ShortcutMgr.h b/src/SUIT/SUIT_ShortcutMgr.h new file mode 100644 index 000000000..eafd854e2 --- /dev/null +++ b/src/SUIT/SUIT_ShortcutMgr.h @@ -0,0 +1,75 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef SUIT_SHORTCUTMGR_H +#define SUIT_SHORTCUTMGR_H + +#include "SUIT.h" + +#include +#include + +class QtxAction; + +class QKeySequence; + +#if defined WIN32 +#pragma warning( disable: 4251 ) +#endif + +/*! + \class SUIT_ShortcutMgr + \brief Class which manages shortcuts customization. +*/ +class SUIT_EXPORT SUIT_ShortcutMgr: public QObject +{ + Q_OBJECT +public: + static void Init(); + static SUIT_ShortcutMgr* getShortcutMgr(); + + void setSectionEnabled( const QString&, const bool = true ); + void updateShortcuts(); + +protected: + SUIT_ShortcutMgr(); + virtual ~SUIT_ShortcutMgr(); + +private slots: + void onActionDestroyed( QObject* ); + +private: + virtual bool eventFilter( QObject* o, QEvent* e ); + + void processAction( QtxAction* ); + QKeySequence getShortcutByActionName( const QString& ) const; + +private: + static SUIT_ShortcutMgr* myShortcutMgr; + QMultiMap myShortcutActions; +}; + +#if defined WIN32 +#pragma warning( default: 4251 ) +#endif + +#endif diff --git a/src/SUIT/resources/SUIT_msg_en.ts b/src/SUIT/resources/SUIT_msg_en.ts index d477c7f9c..c9465cf2c 100644 --- a/src/SUIT/resources/SUIT_msg_en.ts +++ b/src/SUIT/resources/SUIT_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/SUIT/resources/SUIT_msg_fr.ts b/src/SUIT/resources/SUIT_msg_fr.ts new file mode 100755 index 000000000..cf287361a --- /dev/null +++ b/src/SUIT/resources/SUIT_msg_fr.ts @@ -0,0 +1,150 @@ + + + + + @default + + MEN_DESK_WINDOW + &Fenêtre + + + ERR_CANT_DUMP_VIEW + Impossible de clicher le contenu de la vue au fichier. + + + TLT_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg) + + + MEN_DESK_WINDOW_CASCADE + &Cascade + + + PRP_DESK_WINDOW_CASCADE + Superposer les fenêtres + + + ERR_DIR_NOT_EXIST + Le répertoire "%1" n'existe pas! + + + ERR_FILE_NOT_DIR + "%1" n'est pas un répertoire! + + + CONTINUE + Continuer + + + CANCEL + Annuler + + + ERR_FILE_NOT_EXIST + Le fichier "%1" n'existe pas! + + + QUE_DOC_FILEEXISTS + Le fichier %1 déjà existe. Faut-il le réécrire? + + + PRP_DESK_WINDOW_ACTIVATE + Activer la fenêtre + + + ERR_PERMISSION_DENIED + Impossible de sauvegarder le fichier "%1". +Autorisation interdite. + + + ERR_OPEN_PERMISSION_DENIED + Impossible de sauvegarder le fichier "%1". +Autorisation interdite. + + + ERR_DIR_READ_PERMISSION_DENIED + Impossible de sauvegarder le répertoire "%1". +Autorisation interdite. + + + ERR_DIR_WRITE_PERMISSION_DENIED + Impossible de sauvegarder le répertoire "%1". +Autorisation interdite. + + + ERR_ERROR + Erreur + + + QUE_FILE_EXISTS + Le fichier "%1" déjà existe. +Faut-il le réécrire? + + + WRN_WARNING + Avertissement + + + TLT_DUMP_VIEW + Clicher la Vue au Fichier + + + PRP_DESK_WINDOW_TILE + Placer les fenêtres sans superposition + + + MEN_DESK_WINDOW_VTILE + Paver &Verticalement + + + INF_DIRECTORIES_FILTER + Répertoires + + + PRP_DESK_WINDOW_VTILE + Placer les fenêtres verticalement et sans superposition + + + MEN_DESK_WINDOW_TILE + &Paver + + + NAME_COLUMN + Nom + + + + SUIT_Study + + OPERATION_LAUNCH + Lancer l'Opération + + + PREVIOUS_NOT_FINISHED + L'opération précédente n'est pas aboutie et sera interrompue + + + + SUIT_FileDlg + + LAB_QUICK_PATH + Chemin Court: + + + BUT_ADD_PATH + Ajouter un chemin + + + INF_DESK_DOC_OPEN + Ouvrir un Fichier + + + INF_DESK_DOC_SAVE + Sauvegarder un Fichier + + + ALL_FILES_FILTER + Tous les Fichiers (*) + + + diff --git a/src/SUITApp/Makefile.am b/src/SUITApp/Makefile.am index 30e2e8264..cc87c70de 100644 --- a/src/SUITApp/Makefile.am +++ b/src/SUITApp/Makefile.am @@ -46,7 +46,7 @@ MOC_FILES = \ nodist_libSUITApp_la_SOURCES = $(MOC_FILES) -nodist_salomeres_DATA = SUITApp_msg_en.qm +nodist_salomeres_DATA = SUITApp_msg_en.qm SUITApp_msg_fr.qm libSUITApp_la_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) \ -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Style diff --git a/src/SUITApp/SUITApp.cxx b/src/SUITApp/SUITApp.cxx index 989542ba4..9668c4e18 100644 --- a/src/SUITApp/SUITApp.cxx +++ b/src/SUITApp/SUITApp.cxx @@ -248,7 +248,7 @@ int main( int argc, char* argv[] ) { if ( resMgr ) { - resMgr->loadLanguage( false ); + resMgr->loadLanguage(); splash = QtxSplash::splash( QPixmap() ); splash->readSettings( resMgr ); diff --git a/src/SUITApp/resources/SUITApp_msg_en.ts b/src/SUITApp/resources/SUITApp_msg_en.ts index 23ba569c8..b67d2ec37 100644 --- a/src/SUITApp/resources/SUITApp_msg_en.ts +++ b/src/SUITApp/resources/SUITApp_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/SUITApp/resources/SUITApp_msg_fr.ts b/src/SUITApp/resources/SUITApp_msg_fr.ts new file mode 100755 index 000000000..92f8f53fb --- /dev/null +++ b/src/SUITApp/resources/SUITApp_msg_fr.ts @@ -0,0 +1,19 @@ + + + + + @default + + APP_OK + Ok + + + APP_ERROR + Erreur + + + APP_UNK_EXCEPTION + Exception inconnue + + + diff --git a/src/SUPERVGraph/Makefile.am b/src/SUPERVGraph/Makefile.am index f33bbbbcd..35e262500 100755 --- a/src/SUPERVGraph/Makefile.am +++ b/src/SUPERVGraph/Makefile.am @@ -49,7 +49,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ SUPERVGraph_images.qm \ - SUPERVGraph_msg_en.qm + SUPERVGraph_msg_en.qm \ + SUPERVGraph_msg_fr.qm libSUPERVGraph_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT diff --git a/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts b/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts index 922fe3dcd..6a21a259e 100644 --- a/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts +++ b/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts b/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts new file mode 100755 index 000000000..047e85194 --- /dev/null +++ b/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts @@ -0,0 +1,27 @@ + + + + + @default + + MNU_PAN_VIEW + Redimensionnement + + + DSC_PAN_VIEW + Redimensionnement de la vue + + + MNU_RESET_VIEW + Restaurer + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + LBL_TOOLBAR_LABEL + Opérations de Visualisation + + + diff --git a/src/SVTK/Makefile.am b/src/SVTK/Makefile.am index 6f626d02f..9ecf180b4 100755 --- a/src/SVTK/Makefile.am +++ b/src/SVTK/Makefile.am @@ -136,6 +136,7 @@ dist_salomeres_DATA=\ nodist_salomeres_DATA = \ SVTK_msg_en.qm \ + SVTK_msg_fr.qm \ SVTK_images.qm libSVTK_la_CPPFLAGS = \ diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 10c16646e..a8fa48f19 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -1634,52 +1634,59 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Projections anAction = new QtxAction(tr("MNU_FRONT_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ), - tr( "MNU_FRONT_VIEW" ), 0, this); + tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view"); anAction->setStatusTip(tr("DSC_FRONT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView())); + this->addAction(anAction); mgr->registerAction( anAction, FrontId ); anAction = new QtxAction(tr("MNU_BACK_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ), - tr( "MNU_BACK_VIEW" ), 0, this); + tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view"); anAction->setStatusTip(tr("DSC_BACK_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onBackView())); + this->addAction(anAction); mgr->registerAction( anAction, BackId ); anAction = new QtxAction(tr("MNU_TOP_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ), - tr( "MNU_TOP_VIEW" ), 0, this); + tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view"); anAction->setStatusTip(tr("DSC_TOP_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onTopView())); + this->addAction(anAction); mgr->registerAction( anAction, TopId ); anAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ), - tr( "MNU_BOTTOM_VIEW" ), 0, this); + tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view"); anAction->setStatusTip(tr("DSC_BOTTOM_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView())); + this->addAction(anAction); mgr->registerAction( anAction, BottomId ); anAction = new QtxAction(tr("MNU_LEFT_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ), - tr( "MNU_LEFT_VIEW" ), 0, this); + tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view"); anAction->setStatusTip(tr("DSC_LEFT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView())); + this->addAction(anAction); mgr->registerAction( anAction, LeftId ); anAction = new QtxAction(tr("MNU_RIGHT_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ), - tr( "MNU_RIGHT_VIEW" ), 0, this); + tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view"); anAction->setStatusTip(tr("DSC_RIGHT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onRightView())); + this->addAction(anAction); mgr->registerAction( anAction, RightId ); // Reset anAction = new QtxAction(tr("MNU_RESET_VIEW"), theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); + tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view"); anAction->setStatusTip(tr("DSC_RESET_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onResetView())); + this->addAction(anAction); mgr->registerAction( anAction, ResetId ); // onViewTrihedron: Shows - Hides Trihedron diff --git a/src/SVTK/resources/SVTK_msg_en.ts b/src/SVTK/resources/SVTK_msg_en.ts index 9d7454fcf..3663ce51e 100644 --- a/src/SVTK/resources/SVTK_msg_en.ts +++ b/src/SVTK/resources/SVTK_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default @@ -534,11 +513,11 @@ Please, refer to the documentation. LBL_TOBBCENTER Set to Bounding Box Center - + LBL_TOORIGIN Set to Origin - + LBL_SELECTPOINT Select Point from View diff --git a/src/SVTK/resources/SVTK_msg_fr.ts b/src/SVTK/resources/SVTK_msg_fr.ts new file mode 100755 index 000000000..be1f001ae --- /dev/null +++ b/src/SVTK/resources/SVTK_msg_fr.ts @@ -0,0 +1,622 @@ + + + + + @default + + MNU_FRONT_VIEW + Arrière + + + ERROR + Erreur + + + MNU_DUMP_VIEW + Clicher la scène... + + + DSC_TOP_VIEW + Vue de dessus + + + MNU_PAN_VIEW + Panoramique + + + MNU_TOP_VIEW + Devant + + + DSC_GLOBALPAN_VIEW + Sélection d'un nouveau centre de la vue + + + DSC_ROTATE_VIEW + Tourner le point de vue autour du centre de la scène + + + MNU_ZOOM_VIEW + Zoom + + + DSC_PAN_VIEW + Redimensionner la vue + + + DSC_LEFT_VIEW + Vue de gauche + + + DSC_FITALL + Redimensionner la scène pour montrer tous les objets + + + MNU_FITALL + Montrer Tous + + + MNU_ROTATE_VIEW + Rotation + + + DSC_SHOW_TRIHEDRON + Montrer/Cacher les axes de coordonnées dans la scène + + + DSC_FRONT_VIEW + Vue de devant + + + MNU_GLOBALPAN_VIEW + Panoramique globale + + + INF_APP_DUMP_VIEW + Clicher la vue + + + MNU_BACK_VIEW + Arrière + + + MNU_SHOW_TRIHEDRON + Montrer les axes de coordonnées + + + DSC_CHANGINGROTATIONPOINT_VIEW + Changer le point, autour duquel la scène est tournée + + + MNU_BOTTOM_VIEW + Dessous + + + MNU_RESET_VIEW + Restaurer + + + MNU_LEFT_VIEW + Gauche + + + DSC_RIGHT_VIEW + Vue de droit + + + MNU_CHANGINGROTATIONPOINT_VIEW + Changer le Point de Rotation + + + DSC_FITRECT + Redimensionner la scène pour ne montrer que sa partie choisie par l'encadré + + + MNU_FITRECT + Montrer l'encadré + + + DSC_BOTTOM_VIEW + Vue de dessous + + + DSC_DUMP_VIEW + Sauvegarder la scène actuelle au fichier image + + + DSC_ZOOM_VIEW + Zoomer la vue + + + VTK_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg) + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + ERR_DOC_CANT_SAVE_FILE + Impossible de sauvegarder le fichier + + + MNU_RIGHT_VIEW + Droit + + + LBL_TOOLBAR_LABEL + Opérations de Visualisation + + + DSC_BACK_VIEW + Vue d'arrière + + + SVTK_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg *.pdf *.ps *.eps) + + + MNU_VIEWPARAMETERS_VIEW + Changer les Paramètres de Visualisation + + + DSC_VIEWPARAMETERS_VIEW + Changer les paramètres de la vue + + + MNU_SVTK_PARALLEL_MODE + Mode Orthogonal + + + DSC_SVTK_PARALLEL_MODE + Choisir la projection orthogonale + + + MNU_SVTK_PERSPECTIVE_MODE + Mode Perspective + + + DSC_SVTK_PERSPECTIVE_MODE + Choisir la projection perspective + + + DSC_SVTK_STYLE_SWITCH + Changer le style d'intéraction + + + MNU_SVTK_STYLE_SWITCH + Changer le Style d'Interaction + + + + SVTK_CubeAxesDlg + + X_AXIS + Axe X + + + Y_AXIS + Axe Y + + + Z_AXIS + Axe Z + + + CAPTION + Axes Graduées + + + IS_VISIBLE + Est visible + + + FONT + Font + + + NAME + Nom + + + TICK_MARKS + Marques de Graduation + + + LABELS + Repères + + + LENGTH + Longueur + + + NUMBER + Numéro + + + OFFSET + Décalage + + + AXIS_NAME + Nom de l'Axe + + + + SVTK_FontWidget + + BOLD + Gras + + + ARIAL + Arial + + + TIMES + Times + + + ITALIC + Italique + + + SHADOW + Ombré + + + COURIER + Courier + + + + SVTK_ViewWindow + + DSC_SVTK_UPDATE_RATE + Fréquence de mise à jour + + + DSC_SVTK_SCALING + Mise à l'échelle + + + MNU_SVTK_SCALING + Echelle + + + MNU_SVTK_GRADUATED_AXES + Axes Graduées + + + DSC_SVTK_GRADUATED_AXES + Axes Graduées + + + MNU_SVTK_UPDATE_RATE + Fréquence de mise à jour + + + DSC_SVTK_RECORDING_START + Commencer l'enregistrement + + + MNU_SVTK_RECORDING_START + Commencer + + + DSC_SVTK_RECORDING_PLAY + Reprendre l'enregistrement + + + MNU_SVTK_RECORDING_PLAY + Reprendre + + + DSC_SVTK_RECORDING_PAUSE + Pauser l'enregistrement + + + MNU_SVTK_RECORDING_PAUSE + Pauser + + + DSC_SVTK_RECORDING_STOP + Arrêter l'enregistrement + + + MNU_SVTK_RECORDING_STOP + Arrêter + + + LBL_TOOLBAR_RECORD_LABEL + Opérations d'Enregistrement + + + MSG_NO_AVI_MAKER + l'outil jpeg2yuv, requis pour enregistrer les fichiers AVI, n'est pas disponible. +Adressez-vous à la documentation. + + + + SVTK_NonIsometricDlg + + LBL_X + X: + + + LBL_Y + Y: + + + LBL_Z + Z: + + + MEN_SCALING + Echelle + + + DLG_TITLE + Mise à l'échelle + + + + SVTK_RecorderDlg + + ALL_DISLPAYED_FRAMES + Enregistrer tous les cadres visualisés + + + CLOSE + Fermer + + + DLG_RECORDER_TITLE + Enregistrer + + + FILE_NAME + Sauvegarder au fichier : + + + FLT_ALL_FILES + Tous les Fichiers (*.*) + + + FLT_AVI_FILES + Fichiers AVI (*.avi) + + + FPS + FPS : + + + HELP + Aide + + + PROGRESSIVE + Progressive + + + QUALITY + Qualité : + + + RECORDING_MODE + Mode : + + + SETTINGS + Paramètres + + + SKIPPED_FRAMES + Enregistrer avec FPS donné + + + START + Commencer + + + + SVTK_SetRotationPointDlg + + LBL_X + X: + + + LBL_Y + Y: + + + LBL_Z + Z: + + + LBL_CENTER_OF_BOUNDING_BOX + Centre de la boîte englobante + + + RBUTTONGROUP_TITLE + Le type du point de rotation + + + USE_BBCENTER + Utiliser le Centre de la boîte englobante + + + LBL_ORIGIN + Origine du système de coordonnées + + + LBL_SELECTED_POINT + Point Choisi + + + LBL_TOORIGIN + Réinitialiser + + + LBL_SELECTPOINT + Choisir un Point dans la Vue + + + DLG_TITLE + Définir le Point de Rotation + + + + SVTK_ViewParameterDlg + + LBL_X + X : + + + LBL_Y + Y : + + + LBL_Z + Z : + + + LBL_DX + DX : + + + LBL_DY + DY : + + + LBL_DZ + DZ : + + + PROJECTION_MODE + Mode de Projection + + + ORTHOGONAL_MODE + Orthogonal + + + PERSPECTIVE_MODE + Perspective + + + USE_BBCENTER + Utiliser le Centre de la Boîte Englobante + + + LBL_TOBBCENTER + Initialiser au Centre de la Boîte Englobante + + + LBL_TOORIGIN + Initialiser à l'Origine + + + LBL_SELECTPOINT + Choisir un Point de la Vue + + + FOCAL_POINT + Point Focal + + + CAMERA_POSITION + Position de la Caméra + + + WORLD_COORDINATES + Coordonnées du Monde + + + FOCAL_RELATIVE + Relative au Point Focal + + + PROJECTION_DIRECTION + Direction de la Projection : + + + FOCAL_DISTANCE + Distance Focale : + + + VIEW_UP_DIRECTION + Direction du Regard en Haut: + + + ZOOMING + Zoom + + + LBL_SCALE + Echelle + + + LBL_VIEW_ANGLE + Angle de Visualisation + + + DLG_TITLE + Paramètres de la Visualisation + + + + SVTK_UpdateRateDlg + + INFORMATION_FRAME_TITLE + Information sur le Rendu + + + STILL + La fréquence réduite de mise à jour , FPS + + + INPUT_FRAME_TITLE + Activer + + + NUMBER_CELLS + Nombre de Cellules, - + + + DESIRED + La fréquence de mise à jour requise, FPS + + + CURRENT_FPS + La fréquence actuelle de mise à jour , FPS + + + DLG_TITLE + Fréquence de mise à jour + + + + SVTK_ViewManager + + VTK_VIEW_TITLE + VTK scène:%1 - visualisateur:%2 + + + + SVTK_Viewer + + MEN_DUMP_VIEW + Clicher la Vue... + + + MEN_SHOW_TOOLBAR + Montrer la barre d'outils + + + MEN_CHANGE_BACKGROUD + Changer l'arrière-plan... + + + diff --git a/src/SalomeApp/Makefile.am b/src/SalomeApp/Makefile.am index 9c94a2680..c82f8e5eb 100755 --- a/src/SalomeApp/Makefile.am +++ b/src/SalomeApp/Makefile.am @@ -98,13 +98,16 @@ nodist_libSalomeApp_la_SOURCES = $(MOC_FILES) # python modules salomepython_PYTHON = salome_pluginsmanager.py +dist_salomescript_DATA = addvars2notebook.py + dist_salomeres_DATA = \ resources/SalomeApp.ini \ resources/SalomeApp.xml nodist_salomeres_DATA = \ SalomeApp_images.qm \ - SalomeApp_msg_en.qm + SalomeApp_msg_en.qm \ + SalomeApp_msg_fr.qm libSalomeApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) \ $(CAS_CPPFLAGS) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) @KERNEL_CXXFLAGS@ \ diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 8dc5250f3..00bf15f8f 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -84,6 +84,7 @@ #include #include #include +#include #include #include @@ -205,26 +206,45 @@ void SalomeApp_Application::start() // import/execute python scripts if ( pyfiles.count() > 0 && activeStudy() ) { SalomeApp_Study* appStudy = dynamic_cast( activeStudy() ); - if ( appStudy ) { + PyConsole_Console* pyConsole = pythonConsole(); + if ( appStudy && pyConsole ) { _PTR(Study) aStudy = appStudy->studyDS(); if ( !aStudy->GetProperties()->IsLocked() ) { for (uint j = 0; j < pyfiles.count(); j++ ) { QFileInfo fi ( pyfiles[j] ); - PyConsole_Console* pyConsole = pythonConsole(); - if ( pyConsole ) { - QString extension = fi.suffix().toLower(); - if ( fi.exists() ) { - // execute python script - QString command = QString( "execfile(r\"%1\")" ).arg( fi.absoluteFilePath() ); - pyConsole->exec( command ); - } - else { - // import python module - QString command = QString( "import %1" ).arg( pyfiles[j] ); - if ( extension == "py" ) - command = QString( "import %1" ).arg( fi.completeBaseName() ); - pyConsole->exec( command ); - } + QFileInfo fipy ( pyfiles[j] + ".py" ); + QString command = QString( "execfile(r\"%1\")" ); + if ( fi.isAbsolute() ) { + if ( fi.exists() ) + pyConsole->exec( command.arg( fi.absoluteFilePath() ) ); + else if ( fipy.exists() ) + pyConsole->exec( command.arg( fipy.absoluteFilePath() ) ); + else + qDebug() << "Can't execute file" << pyfiles[j]; + } + else { + bool found = false; + QStringList dirs; + dirs << QDir::currentPath(); + if ( ::getenv( "PYTHONPATH" ) ) + dirs += QString( ::getenv( "PYTHONPATH" ) ).split( QRegExp( "[:|;]" ) ); + foreach( QString dir, dirs ) { + qDebug() << "try" << QFileInfo( dir, pyfiles[j] ).absoluteFilePath(); + qDebug() << "try" << QFileInfo( dir, pyfiles[j] + ".py" ).absoluteFilePath(); + if ( QFileInfo( dir, pyfiles[j] ).exists() ) { + pyConsole->exec( command.arg( QFileInfo( dir, pyfiles[j] ).absoluteFilePath() ) ); + found = true; + break; + } + else if ( QFileInfo( dir, pyfiles[j] + ".py" ).exists() ) { + pyConsole->exec( command.arg( QFileInfo( dir, pyfiles[j] + ".py" ).absoluteFilePath() ) ); + found = true; + break; + } + } + if ( !found ) { + qDebug() << "Can't execute file" << pyfiles[j]; + } } } } diff --git a/src/SalomeApp/addvars2notebook.py b/src/SalomeApp/addvars2notebook.py new file mode 100644 index 000000000..6f2375543 --- /dev/null +++ b/src/SalomeApp/addvars2notebook.py @@ -0,0 +1,67 @@ + +import os +import os.path + +def addvars2notebook(filename): + # + vars_and_values = [] + contents = [] + # + directory = os.path.dirname(filename) + base = os.path.basename(filename) + prefix = base[:-3] # remove ".py" + prefix = prefix + '_' + from os import listdir + l = listdir(directory) + for f in l: + if f.find(prefix) != 0: continue + if f[-3:] != ".py": continue + module = f[len(prefix):-3] + try: + mod = __import__("addvars2notebook_%s"%(module)) + except ImportError: + continue + try: + func = mod.addvars2notebook + except AttributeError: + continue + fff = os.path.join(directory, f) + content = func(fff, vars_and_values) + contents.append([fff, content]) + pass + # + if vars_and_values: + stream = open(filename) + content = stream.read() + stream.close() + fields = content.split("import iparameters") + if len(fields) == 2: + begin = fields[0] + if begin.find("## NoteBook E.A.") >= 0: + begin = begin.split("## NoteBook E.A.")[0] + pass + end = "import iparameters" + fields[1] + content = begin + content += "## NoteBook E.A.\n" + for var, value in vars_and_values: + content += "notebook.set(%s,%s)\n"%(var.__repr__(), value) + pass + content += end + stream = open(filename, "w") + stream.write(content) + stream.close() + # + for fff, content in contents: + stream = open(fff, "w") + stream.write(content) + stream.close() + pass + pass + pass + # + return + +if __name__ == "__main__": + import sys + addvars2notebook(sys.argv[1]) + pass diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index 46ab023a5..542811fc7 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -42,6 +42,7 @@
+
@@ -64,6 +65,8 @@
+ + @@ -223,4 +226,27 @@
+ +
+ +
+
+ + +
+
+ + + + + + + +
+
+ + + + +
diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.ts b/src/SalomeApp/resources/SalomeApp_msg_en.ts index e12a7d532..2e04655b5 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.ts +++ b/src/SalomeApp/resources/SalomeApp_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default @@ -87,15 +66,15 @@ Python file must include only letters, digits and underscores and start from let ERR_INCOMPATIBLE_TYPE - Variable with name "%1" has incompatible numeric type + Variable with name "%1" has incompatible numeric type ERR_INVALID_VALUE - Value hasn't been validated + Value hasn't been validated ERR_NO_VARIABLE - Variable with name "%1" doesn't exist + Variable with name "%1" doesn't exist @@ -185,6 +164,10 @@ Do you want to reload it ? TOT_DESK_CATALOG_GENERATOR Catalog generator
+ + TOT_DESK_ADD_VARS_TO_NOTEBOOK + Add vars to notebook + PUBLISH_IN_STUDY Publish in study @@ -277,6 +260,10 @@ Do you want to reload it ? PRP_DESK_CATALOG_GENERATOR Generates XML catalog of a component's interface + + PRP_DESK_ADD_VARS_TO_NOTEBOOK + Add variables of the study to the notebook + PRP_DESK_FILE_DUMP_STUDY Dumps study to the python script @@ -309,6 +296,10 @@ Do you want to reload it ? MEN_DESK_CATALOG_GENERATOR Catalog &Generator + + MEN_DESK_ADD_VARS_TO_NOTEBOOK + Add vars to NoteBook + APPCLOSE_CAPTION Close active study @@ -382,101 +373,101 @@ Do you want to reload it ?
NoteBook_Table - - REMOVE_VARIABLE_IS_USED - Variable with name "%1" is used in the study. + + REMOVE_VARIABLE_IS_USED + Variable with name "%1" is used in the study. Do you really want to remove it? - - - RENAME_VARIABLE_IS_USED - Variable with name "%1" is used in the study. + + + RENAME_VARIABLE_IS_USED + Variable with name "%1" is used in the study. Do you really want to rename it? - - - VARNAME_COLUMN - Variable Name - - - VARVALUE_COLUMN - Variable Value - - - VARVALUE_INCORRECT - Variable Value Incorrect: %1 - - - VARNAME_INCORRECT - Variable Name Incorrect :%1 - - - VARNAME_EXISTS - Variable with name "%1" exists - + + + VARNAME_COLUMN + Variable Name + + + VARVALUE_COLUMN + Variable Value + + + VARVALUE_INCORRECT + Variable Value Incorrect: %1 + + + VARNAME_INCORRECT + Variable Name Incorrect :%1 + + + VARNAME_EXISTS + Variable with name "%1" exists + SalomeApp_NoteBookDlg - - NOTEBOOK_TITLE - Salome NoteBook - - - BUT_UPDATE_STUDY - &Update Study - - - BUT_REMOVE - &Remove - - - BUT_APPLY_AND_CLOSE - A&pply and Close - - - BUT_HELP - &Help - - - CLOSE_CAPTION - Close NoteBook - - - CLOSE_DESCRIPTION - Do you want to save changes you made to NoteBook? - - - INCORRECT_DATA - At least one variable has been defined incorrectly. + + NOTEBOOK_TITLE + Salome NoteBook + + + BUT_UPDATE_STUDY + &Update Study + + + BUT_REMOVE + &Remove + + + BUT_APPLY_AND_CLOSE + A&pply and Close + + + BUT_HELP + &Help + + + CLOSE_CAPTION + Close NoteBook + + + CLOSE_DESCRIPTION + Do you want to save changes you made to NoteBook? + + + INCORRECT_DATA + At least one variable has been defined incorrectly. Please edit its parameters or remove it from table. - - - ERR_UPDATE_STUDY_FAILED - Failed to update study! - + + + ERR_UPDATE_STUDY_FAILED + Failed to update study! + - SalomeApp_DoubleSpinBox - - VALID_RANGE_VAR_MSG - Specify either a variable name or + SalomeApp_DoubleSpinBox + + VALID_RANGE_VAR_MSG + Specify either a variable name or a floating-point value in range ( %1; %2 ) with %3-digit precision - - - VALID_RANGE_NOVAR_MSG - Specify a floating-point value in range ( %1; %2 ) + + + VALID_RANGE_NOVAR_MSG + Specify a floating-point value in range ( %1; %2 ) with %3-digit precision - + - SalomeApp_IntSpinBox - - VALID_RANGE_VAR_MSG - Specify either a variable name or + SalomeApp_IntSpinBox + + VALID_RANGE_VAR_MSG + Specify either a variable name or an integer value in range ( %1; %2 ) - - - VALID_RANGE_NOVAR_MSG - Specify an integer value in range ( %1; %2 ) - + + + VALID_RANGE_NOVAR_MSG + Specify an integer value in range ( %1; %2 ) +
diff --git a/src/SalomeApp/resources/SalomeApp_msg_fr.ts b/src/SalomeApp/resources/SalomeApp_msg_fr.ts new file mode 100755 index 000000000..16e6b53e1 --- /dev/null +++ b/src/SalomeApp/resources/SalomeApp_msg_fr.ts @@ -0,0 +1,461 @@ + + + + + @default + + WRN_FILE_NAME_BAD + Indiquez le nom de fichier correctement. +Le fichier Python ne devrait inclure que de lettres, chiffres et soulignages et commencer avec une lettre ou soulignage. + + + WRN_FILE_NOT_EXIST + Le fichier %1 n'existe pas. + + + CLOSE_LOCKED_STUDY + Fermer l'étude? + + + PUBLISH_IN_STUDY + Publier dans l'étude + + + BUT_NEW + &Nouvelle + + + SAVE_POINT_ROOT_NAME + Etats d'IHM + + + SAVE_POINT_ROOT_TOOLTIP + Etats d'IHM persistents + + + SAVE_GUI_STATE + Sauvegarder l'état d'IHM + + + BUT_LOAD + &Charger + + + BUT_OPEN + &Ouvrir + + + SAVE_POINT_OBJECT_TOOLTIP + Sauvegarder l'état d'IHM: %1 + + + SAVE_POINT_DEF_NAME + L'état d'IHM: + + + VALUE_COLUMN + Valeur + + + IOR_COLUMN + IOR + + + REFENTRY_COLUMN + Ref.Entrée + + + ERR_INCOMPATIBLE_TYPE + Le tupe numérique de la variable "%1" n'est pas compatible + + + ERR_INVALID_VALUE + La valeur n'a pas été validée + + + ERR_NO_VARIABLE + La variable "%1" n'existe pas. + + + + SalomeApp_Application + + ALL_FILES_FILTER + Tous les fichiers (*.*) + + + APPCLOSE_UNLOAD + V&ider + + + APPCLOSE_CLOSE + &Fermer sans modifications + + + MEN_WINDOWS_NEW + Nouvelle Fenêtre + + + MEN_DELETE_INVALID_REFERENCE + Supprimer la Référence Invalide + + + TOT_FILE_DESK_PREFERENCES + Préférences + + + MEN_DELETE_VS + Supprimer + + + MEN_OPENWITH + Activer Module %1 + + + MEN_DESK_REGISTRY_DISPLAY + Enregistrer &Visualiser + + + APPCLOSE_SAVE + &Sauvegarder && Fermer + + + TOT_DESK_FILE_LOAD_SCRIPT + Ouvrit un script python + + + PREF_STORE_VISUAL_STATE + Sauvegarder/restaurer le dernier ètat d'IHM + + + PRP_DESK_FILE_SAVE_GUI_STATE + Sauvegarder l'état actuel des visualisateurs, des scènes, etc. + + + MEN_DESK_FILE_SAVE_GUI_STATE + Sauvegarder l'état d'IHM + + + TOT_DESK_FILE_SAVE_GUI_STATE + Sauvegarder l'état d'IHM + + + MEN_RESTORE_VS + Restaurer + + + WRN_DUMP_STUDY_FAILED + Impossible de clipper l'Sauvegarder l'étude + + + MEN_DESK_PROPERTIES + Pro&priétés... + + + QUE_DOC_ALREADYEXIST + Ce document %1 déjà existe dans l'étude. +Allez-vous rouvrir ce document ? + + + MEN_RENAME_VS + Renommer + + + TOT_DESK_CATALOG_GENERATOR + Générateur du Catalogue + + + PUBLISH_IN_STUDY + Publier dans l'étude + + + PREF_OBJ_BROWSER_SETTINGS + Paramètres + + + PRP_DESK_REGISTRY_DISPLAY + Visualiser le contenu du Registre du serveur CORBA + + + PYTHON_FILES_FILTER + Fichiers PYTHON (*.py) + + + APPCLOSE_DESCRIPTION + Voulez-vous fermer ou vider l'étude avant de la fermer? + + + PRP_DESK_PROPERTIES + Editer les propriétés de l'étude + + + PREF_TAB_OBJBROWSER + Navigateur d'Objets + + + STUDY_LOCKED + BLOQUEE + + + APPCLOSE_CANCEL + &Annuler + + + OBJ_BROWSER_NAME + Objet + + + TOT_DESK_REGISTRY_DISPLAY + Visualiser Registre + + + OBJ_BROWSER_COLUMN_0 + Entrée + + + OBJ_BROWSER_COLUMN_1 + Valeur + + + OBJ_BROWSER_COLUMN_2 + IOR + + + OBJ_BROWSER_COLUMN_3 + Entrée de Référence + + + PREF_CATEGORY_SALOME + SALOME + + + PYTHON_CONSOLE + Console Python + + + MEN_DESK_FILE_LOAD_SCRIPT + Ouvrir Scrip&t... + + + MEN_DESK_TOOLS + &Outils + + + TOT_DESK_FILE_DUMP_STUDY + Clicher l'étude + + + MEN_VIEW_WNDS + Windows + + + MEN_DESK_FILE_DUMP_STUDY + &Clicher l'étude... + + + PRP_DESK_CATALOG_GENERATOR + Générer une catalogue XML de l'interface du composant + + + PRP_DESK_FILE_DUMP_STUDY + Clicher l'étude au script python + + + TOT_DESK_FILE_NOTEBOOK + Ouvrir le Carnet + + + MEN_DESK_FILE_NOTEBOOK + Car&net... + + + PRP_DESK_FILE_NOTEBOOK + Ouvrir le Carnet + + + TOT_DESK_PROPERTIES + Propriétés de l'étude + + + PREF_GROUP_DEF_COLUMNS + Colonnes de Défaut + + + PRP_DESK_FILE_LOAD_SCRIPT + Ouvrir le script python du fichier + + + MEN_DESK_CATALOG_GENERATOR + Catalogue &Générateur + + + APPCLOSE_CAPTION + Fermer l'étude actuelle + + + MEN_DESK_MRU + Le plus recemment utilisé + + + TOT_DESK_MRU + Le plus recemment utilisé + + + ACTIVATE_MODULE_OP_LOAD + &Charger... + + + + SalomeApp_StudyPropertiesDlg + + PRP_MODE_FROM_SCRATCH + du début + + + PRP_AUTHOR + Autheur + + + PRP_LOCKED + Bloqué + + + PRP_MODIFICATIONS + Modifications + + + PRP_NO + Non + + + PRP_YES + Oui + + + PRP_MODIFIED + Modifié + + + PRP_DATE + Crée + + + PRP_MODE + Mode + + + PRP_MODE_FROM_COPYFROM + copier de + + + TLT_STUDY_PROPERTIES + Propriétés de l'étude + + + + SalomeApp_ExitDlg + + SHUTDOWN_SERVERS + Arreter les serveurs autonomes + + + + NoteBook_Table + + REMOVE_VARIABLE_IS_USED + La variable "%1" est utilisée dans l'étude. +Est-ce que vous allez vraiment la supprimer? + + + RENAME_VARIABLE_IS_USED + La variable "%1" est utilisée dans l'étude. +Est-ce que vous allez vraiment la renommer? + + + VARNAME_COLUMN + Nom de la Variable + + + VARVALUE_COLUMN + Valeur de la Variable + + + VARVALUE_INCORRECT + La Valeur de la Variable n'est pas correcte: %1 + + + VARNAME_INCORRECT + Le Nom de la Variable n'est pas correct: %1 + + + VARNAME_EXISTS + La Variable "%1" existe + + + + SalomeApp_NoteBookDlg + + NOTEBOOK_TITLE + Carnet Salome + + + BUT_UPDATE_STUDY + &Mettre l'étude à jour + + + BUT_REMOVE + &Supprimer + + + BUT_APPLY_AND_CLOSE + A&ppliquer et Fermer + + + BUT_HELP + &Aide + + + CLOSE_CAPTION + Fermer le Carnet + + + CLOSE_DESCRIPTION + Allez-vous sauvegarder les changements faits au Carnet? + + + INCORRECT_DATA + Au moins une variable a été définie incorrectement. +Editez ses paramètres ou l'éliminez de la table. + + + ERR_UPDATE_STUDY_FAILED + Impossible de mettre l'étude à jour! + + + + SalomeApp_DoubleSpinBox + + VALID_RANGE_VAR_MSG + Indiquez le nom de la variable ou +la valeur du point flottant au diapason ( %1; %2 ) +avec la précision de %3 chiffres + + + VALID_RANGE_NOVAR_MSG + Indiquez la valeur du point flottant au diapason ( %1; %2 ) +avec la précision de %3 chiffres + + + + SalomeApp_IntSpinBox + + VALID_RANGE_VAR_MSG + Indiquez le nom de la variable ou +une valeur entière au diapason ( %1; %2 ) + + + VALID_RANGE_NOVAR_MSG + Indiquez une valeur entière au diapason ( %1; %2 ) + + + diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 7e3be00c3..594ca26fb 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -401,7 +401,6 @@ void shutdownServers( SALOME_NamingService* theNS ) // ---------------------------- MAIN ----------------------- int main( int argc, char **argv ) { - if(getenv ("DEBUGGER")) { setsig(SIGSEGV,&Handler); @@ -440,7 +439,7 @@ int main( int argc, char **argv ) SUIT_ResourceMgr resMgr( "SalomeApp", QString( "%1Config" ) ); resMgr.setCurrentFormat( "xml" ); resMgr.setWorkingMode( QtxResourceMgr::IgnoreUserValues ); - resMgr.loadLanguage( "LightApp", "en" ); + resMgr.loadLanguage( "LightApp" ); // splash = QtxSplash::splash( QPixmap() ); splash->readSettings( &resMgr ); diff --git a/src/Style/Makefile.am b/src/Style/Makefile.am index 4b2d215a5..ec4efbf62 100644 --- a/src/Style/Makefile.am +++ b/src/Style/Makefile.am @@ -65,3 +65,5 @@ libSalomeStyle_la_LDFLAGS = $(QT_MT_LIBS) \ ../Qtx/libqtx.la dist_salomeres_DATA = resources/SalomeStyle.xml + +nodist_salomeres_DATA = Style_msg_fr.qm diff --git a/src/Style/Style_PrefDlg.cxx b/src/Style/Style_PrefDlg.cxx index 326dbcc03..e748d06c6 100644 --- a/src/Style/Style_PrefDlg.cxx +++ b/src/Style/Style_PrefDlg.cxx @@ -127,7 +127,7 @@ void Style_PrefDlg::PaletteEditor::addColumn( const QString& title ) l->addWidget( myActiveLab = new QLabel( tr( "Active" ), myContainer ), myCurrentRow, myCurrentColumn*4+1 ); l->addWidget( myInactiveLab = new QLabel( tr( "Inactive" ), myContainer ), myCurrentRow, myCurrentColumn*4+2 ); - l->addWidget( myDisabledLab = new QLabel( tr( "Disable" ), myContainer ), myCurrentRow, myCurrentColumn*4+3 ); + l->addWidget( myDisabledLab = new QLabel( tr( "Disabled" ), myContainer ), myCurrentRow, myCurrentColumn*4+3 ); int w = 0; w = qMax( w, myActiveLab->sizeHint().width() ); w = qMax( w, myInactiveLab->sizeHint().width() ); @@ -376,7 +376,7 @@ QString Style_PrefDlg::PaletteEditor::idToName( int id ) case Style_Model::BrightText: // 7 name = tr( "Bright text" ); break; case Style_Model::ButtonText: // 8 - name = tr( "Buttont text" ); break; + name = tr( "Button text" ); break; case Style_Model::Base: // 9 name = tr( "Base" ); break; case Style_Model::Window: // 10 @@ -496,7 +496,7 @@ Style_PrefDlg::Style_PrefDlg( QWidget* parent ) main->setMargin( 0 ); main->setSpacing( SPACING ); // create main widgets - myStyleCheck = new QCheckBox( tr( "Use SALOME Style" ), this ); + myStyleCheck = new QCheckBox( tr( "Enable SALOME Style" ), this ); QFrame* fr = new QFrame( this ); fr->setFrameStyle( QFrame::Box | QFrame::Sunken ); diff --git a/src/Style/resources/Style_msg_fr.ts b/src/Style/resources/Style_msg_fr.ts new file mode 100644 index 000000000..8ff55f0d4 --- /dev/null +++ b/src/Style/resources/Style_msg_fr.ts @@ -0,0 +1,287 @@ + + + + + Style_PrefDlg + + Quick + Rapide + + + Auto + Auto + + + Base colors + Couleurs de base + + + Additional colors + Couleurs supplémentaires + + + Active + Actif + + + Inactive + Désactivé + + + Disabled + Désactivé + + + Window text + Texte du fenêtre + + + Button + Touche + + + Light + Clair + + + Midlight + Demi-clair + + + Dark + Foncé + + + Mid + Moyen + + + Text + Texte + + + Bright text + Texte éclairé + + + Button text + Texte de la touche + + + Base + Base + + + Window + Fenêtre + + + Shadow + Ombre + + + Highlight + Surligner + + + Highlighted text + Texte surligné + + + Link + Lien + + + Visited link + Lien visité + + + Alternate base + Base alternative + + + Tooltip base + Base d'infobulle + + + Tooltip text + Texte d'infobulle + + + Border top + Frontière de dessus + + + Border bottom + Frontière de dessous + + + Tab border top + Frontière de dessus de l'onglet + + + Tab border bottom + Frontière de dessous de l'onglet + + + Field light + Champ clair + + + Field dark + Champ foncé + + + Slider + Barre de défilement + + + Lines + Lignes + + + Widget center + Centre de l'objet-fenêtre + + + Widget border + Frontière de l'objet-fenêtre + + + Header + Titre + + + Progress bar + Barre de progrès + + + Pointer + Pointeur + + + Checked + Coché + + + Table grid + Maillage de la table + + + SALOME style preferences + Préférences de style Salomé + + + Enable SALOME Style + Activer le style Salomé + + + Font + Caractères + + + Type + Type + + + None + Aucun + + + Horizontal + Horisontal + + + Inclined + Incliné + + + Transparency + Transparence + + + Widgets rounding + Arrondi des objets-fenêtres + + + Buttons + Touches + + + Edit boxes + Editer les boîtes + + + Frames + Cadres + + + Sliders + Barres de défilement + + + Anti-aliased borders + Frontières d'anticrénelage + + + Handle + Pointeur + + + Horizontal spacin + Espacement horisontal + + + Vertical spacing + Espacement vertical + + + Splitter handle size + Taille du pointeur du diviseur + + + Slider handle size + Taille du curseur de la barre de défilement + + + Widget effect + Effet de l'objet-fenêtre + + + Highlight widgets + Surligner les objets fenêtres + + + Auto raise widgets + Activer l'objet fenêtre automatiquement + + + Colors + Couleurs + + + Properties + Paramètres + + + [ Current ] + [ Actuel ] + + + [ Default ] + [ Défaut ] + + + Delete user theme + Supprimer la thème d'utilisateur + + + Remove theme %1? + Supprimer la thème %1? + + + Custom schema + Schéma actuel + + + diff --git a/src/TOOLSGUI/Makefile.am b/src/TOOLSGUI/Makefile.am index 0c41e9a8d..462bb6d65 100755 --- a/src/TOOLSGUI/Makefile.am +++ b/src/TOOLSGUI/Makefile.am @@ -48,7 +48,8 @@ nodist_libToolsGUI_la_SOURCES = $(MOC_FILES) # .po files to transform in .qm nodist_salomeres_DATA = \ - ToolsGUI_msg_en.qm + ToolsGUI_msg_en.qm \ + ToolsGUI_msg_fr.qm libToolsGUI_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(BOOST_CPPFLAGS) \ @KERNEL_CXXFLAGS@ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx index ef267b1e3..bc4a9f85d 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx @@ -20,48 +20,30 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME RegistryDisplay : GUI for Registry server implementation -// File : ToolsGUI_RegWidget.cxx -// Author : Pascale NOYRET, EDF -// # include "ToolsGUI_RegWidget.h" -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include -# include - -# include -# include - -# include - -typedef int PIXELS; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include #define MARGIN_SIZE 11 #define SPACING_SIZE 6 #define MIN_SPIN_WIDTH 100 -#define BOLD( text ) ( QString( "" ) + QString( text ) + QString( "" ) ) +#define BOLD( text ) QString( "%1" ).arg( QString( text ) ) static const char* const time_data[] = { "16 16 6 1", @@ -138,315 +120,32 @@ static const char* const refresh_data[] = { "......aaaaa....."}; /*! - \brief Create components list. + \brief Get access to the Registry service \internal \param orb CORBA ORB reference - \return list of registered components + \return reference to the Registry service */ -static Registry::Components_var MakeRegistry( CORBA::ORB_var& orb ) +static Registry::Components_ptr GetRegistry( CORBA::ORB_ptr orb ) { - - const char *registryName="Registry" ; + static const char* registryName = "Registry"; + Registry::Components_var aRegistry; - SALOME_NamingService &naming = *SINGLETON_::Instance() ; - naming.init_orb( orb ) ; + SALOME_NamingService& naming = *SINGLETON_::Instance(); + naming.init_orb( orb ); - // Recuperation de la reference de l'objet - CORBA::Object_var object = 0 ; + CORBA::Object_var object = 0; try { - SCRUTE(registryName) ; - object = naming.Resolve( registryName ) ; - if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ; + object = naming.Resolve( registryName ); + if ( CORBA::is_nil( object ) ) throw CommException( "Unable to find the Registry service" ); + aRegistry = Registry::Components::_narrow( object ); } - catch( const ServiceUnreachable& ex ) + catch( const CORBA::Exception& ex ) { - MESSAGE( ex.what() ) - exit( EXIT_FAILURE ) ; - } - catch( const CORBA::Exception& ) - { - exit( EXIT_FAILURE ) ; - } - - // Specialisation de l'objet generique - - return Registry::Components::_narrow( object ) ; -} - -/*! - \class ToolsGUI_RegWidget::InfoWindow - \brief Information window. - \internal -*/ - -class ToolsGUI_RegWidget::InfoWindow : public QMainWindow -{ -public: - InfoWindow( QWidget* parent ); - - void setText( const QString& text ); - -protected: - void keyPressEvent( QKeyEvent * e ); - -private: - QTextEdit* myTextView; -}; - -/*! - \brief Constructor. - \internal - \param parent parent widget -*/ -ToolsGUI_RegWidget::InfoWindow::InfoWindow( QWidget* parent ) -: QMainWindow( parent ) -{ - setAttribute( Qt::WA_DeleteOnClose ); - - myTextView = new QTextEdit( this ); - myTextView->setReadOnly( true ); - setCentralWidget( myTextView ); - setMinimumSize( 450, 250 ); -} - -/*! - \brief Set text to the information window. - \internal - \param text ionfo text -*/ -void ToolsGUI_RegWidget::InfoWindow::setText( const QString& text ) -{ - myTextView->setText( text ); -} - -/*! - \brief Key press event handler. Closeswindow on \c Escape key pressing. - \internal - \param e key press event -*/ -void ToolsGUI_RegWidget::InfoWindow::keyPressEvent( QKeyEvent * e ) -{ - QMainWindow::keyPressEvent( e ); - if ( e->key() == Qt::Key_Escape ) - close(); -} - -/*! - \class ToolsGUI_RegWidget::HelpWindow - \brief Help window. - \internal -*/ - -class ToolsGUI_RegWidget::HelpWindow : public QMainWindow -{ -public: - HelpWindow( QWidget* parent ); - ~HelpWindow(); - - void setText( const QString& text ); - -private: - QTextEdit* myTextView; -}; - -/*! - \brief Constructor. - \internal - \param parent parent widget -*/ -ToolsGUI_RegWidget::HelpWindow::HelpWindow( QWidget* parent ) -: QMainWindow( parent ) -{ - setAttribute( Qt::WA_DeleteOnClose ); - setWindowTitle( tr( "Help" ) ); - - myTextView = new QTextEdit( this ); - myTextView->setReadOnly( true ); - QPalette pal = myTextView->palette(); - - pal.setBrush( QPalette::Active, QPalette::Highlight, QBrush( QColor( 0, 0, 128 ) ) ); - pal.setBrush( QPalette::Active, QPalette::HighlightedText, QBrush( Qt::white ) ); - pal.setBrush( QPalette::Active, QPalette::Base, QBrush( QColor( 255,255,220 ) ) ); - pal.setBrush( QPalette::Active, QPalette::Text, QBrush( Qt::black ) ); - - pal.setBrush( QPalette::Inactive, QPalette::Highlight, QBrush( QColor( 0, 0, 128 ) ) ); - pal.setBrush( QPalette::Inactive, QPalette::HighlightedText, QBrush( Qt::white ) ); - pal.setBrush( QPalette::Inactive, QPalette::Base, QBrush( QColor( 255,255,220 ) ) ); - pal.setBrush( QPalette::Inactive, QPalette::Text, QBrush( Qt::black ) ); - - pal.setBrush( QPalette::Disabled, QPalette::Highlight, QBrush( QColor( 0, 0, 128 ) ) ); - pal.setBrush( QPalette::Disabled, QPalette::HighlightedText, QBrush( Qt::white ) ); - pal.setBrush( QPalette::Disabled, QPalette::Base, QBrush( QColor( 255,255,220 ) ) ); - pal.setBrush( QPalette::Disabled, QPalette::Text, QBrush( Qt::black ) ); - - myTextView->setPalette( pal ); - - setCentralWidget( myTextView ); - setMinimumSize( 450, 250 ); - - QFile f ( "tmp.txt" ); - if ( f.open( QIODevice::ReadOnly ) ) { - QTextStream t( &f ); - while ( !t.atEnd() ) { - myTextView->append( t.readLine() ); - } + MESSAGE( "Error: can't access Registry server" ); } - f.close(); -} - -/*! - \brief Destructor. - \internal -*/ -ToolsGUI_RegWidget::HelpWindow::~HelpWindow() -{ -}; - -/*! - \brief Set text to the help window. - \internal - \param text help text -*/ -void ToolsGUI_RegWidget::HelpWindow::setText( const QString& text ) -{ - myTextView->setText( text ); -} - -/*! - \class ToolsGUI_RegWidget::IntervalWindow - \brief Dialog box to enter time delay between registry window updates - \internal -*/ - -class ToolsGUI_RegWidget::IntervalWindow : public QDialog -{ -public: - IntervalWindow( QWidget* parent ); - ~IntervalWindow(); - - QPushButton* Ok(); - QPushButton* Cancel(); - - int getValue(); - void setValue( int ); - -private: - QSpinBox* mySpinBox; - QPushButton* myButtonOk; - QPushButton* myButtonCancel; -}; - -/*! - \brief Constructor. - \internal - \param parent parent widget -*/ -ToolsGUI_RegWidget::IntervalWindow::IntervalWindow ( QWidget* parent ) -: QDialog( parent ) -{ - setModal( true ); - setAttribute( Qt::WA_DeleteOnClose ); - - setWindowTitle( tr( "Refresh Interval" ) ); - setSizeGripEnabled( true ); - - QGridLayout* topLayout = new QGridLayout( this ); - topLayout->setSpacing( SPACING_SIZE ); - topLayout->setMargin( MARGIN_SIZE ); - - QGroupBox* intervalGrp = new QGroupBox( this ); - intervalGrp->setObjectName( "intervalGrp" ); - QGridLayout* intervalGrpLayout = new QGridLayout( intervalGrp ); - intervalGrpLayout->setAlignment( Qt::AlignTop ); - intervalGrpLayout->setSpacing( SPACING_SIZE ); - intervalGrpLayout->setMargin( MARGIN_SIZE ); - - QHBoxLayout* aBtnLayout = new QHBoxLayout; - aBtnLayout->setSpacing( SPACING_SIZE ); - aBtnLayout->setMargin( 0 ); - - myButtonOk = new QPushButton( this ); - myButtonOk->setObjectName( "buttonOk" ); - myButtonOk->setText( tr( "BUT_OK" ) ); - myButtonOk->setAutoDefault( TRUE ); - myButtonOk->setDefault( TRUE ); - - myButtonCancel = new QPushButton( this ); - myButtonCancel->setObjectName( "buttonCancel" ); - myButtonCancel->setText( tr( "BUT_CANCEL" ) ); - myButtonCancel->setAutoDefault( TRUE ); - - QLabel* TextLabel = new QLabel( intervalGrp ); - TextLabel->setObjectName( "TextLabel" ); - TextLabel->setText( tr( "Please, enter a number of seconds:" ) ); - - mySpinBox = new QSpinBox( intervalGrp ); - mySpinBox->setMinimum( 1 ); - mySpinBox->setMaximum( 999999999 ); - mySpinBox->setSingleStep( 1 ); - mySpinBox->setObjectName( "SpinBox" ); - mySpinBox->setValue( 100 ); - mySpinBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); - mySpinBox->setMinimumWidth(MIN_SPIN_WIDTH); - - intervalGrpLayout->addWidget(TextLabel, 0, 0); - intervalGrpLayout->addWidget(mySpinBox, 0, 1); - - aBtnLayout->addWidget( myButtonOk ); - aBtnLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - aBtnLayout->addWidget( myButtonCancel ); - - topLayout->addWidget( intervalGrp, 0, 0 ); - topLayout->addLayout( aBtnLayout, 1, 0 ); -} - -/*! - \brief Destructor - \internal -*/ -ToolsGUI_RegWidget::IntervalWindow::~IntervalWindow() -{ -} - -/*! - \brief Set time interval value - \internal - \param size interval value -*/ -void ToolsGUI_RegWidget::IntervalWindow::setValue( const int size ) -{ - mySpinBox->setValue(size); -} - -/*! - \brief Get time interval value - \internal - \return interval value -*/ -int ToolsGUI_RegWidget::IntervalWindow::getValue() -{ - return mySpinBox->value(); -} -/*! - \brief Get \c OK button - \internal - \return a pointer to \c OK button -*/ -QPushButton* ToolsGUI_RegWidget::IntervalWindow::Ok() -{ - return myButtonOk; -} - -/*! - \brief Get \c Cancel button - \internal - \return a pointer to \c Cancel button -*/ -QPushButton* ToolsGUI_RegWidget::IntervalWindow::Cancel() -{ - return myButtonCancel; + return aRegistry._retn(); } /*! @@ -462,7 +161,7 @@ ToolsGUI_RegWidget* ToolsGUI_RegWidget::myRegWidgetPtr = 0; \param orb CORBA ORB reference \param parent parent widget */ -ToolsGUI_RegWidget* ToolsGUI_RegWidget::GetRegWidget( CORBA::ORB_var& orb, +ToolsGUI_RegWidget* ToolsGUI_RegWidget::GetRegWidget( CORBA::ORB_ptr orb, QWidget* parent ) { if ( !myRegWidgetPtr ) @@ -470,99 +169,108 @@ ToolsGUI_RegWidget* ToolsGUI_RegWidget::GetRegWidget( CORBA::ORB_var& orb, return myRegWidgetPtr; } -/*! - \brief This virtual function is reimplenented to disable popup menu on dock areas - (instead of QMainWindow::setDockMenuEnabled( false ) method used in Qt3). - \return always 0 to disable menu -*/ -QMenu* ToolsGUI_RegWidget::createPopupMenu() -{ - QMenu* aPopup = 0; - return aPopup; -} - /*! \brief Constructor \param orb CORBA ORB reference \param parent parent widget */ -ToolsGUI_RegWidget::ToolsGUI_RegWidget( CORBA::ORB_var& orb, QWidget* parent ) -: QMainWindow( parent, Qt::Window ), - _VarComponents( MakeRegistry(orb) ), - _clients( 0 ), - _history( 0 ), - _parent( parent ), - _tabWidget( 0 ), - _refresh( 0 ), - _interval( 0 ), - myInfoWindow( 0 ), - myHelpWindow( 0 ), - myIntervalWindow( 0 ) +ToolsGUI_RegWidget::ToolsGUI_RegWidget( CORBA::ORB_ptr orb, QWidget* parent ) +: QMainWindow( parent ) { - setAttribute( Qt::WA_DeleteOnClose ); + myOrb = CORBA::ORB::_duplicate( orb ); - if ( parent ) - setWindowIcon( parent->windowIcon() ); - - // pixmap for buttons - QPixmap image_refresh ( ( const char** ) refresh_data ); - QPixmap image_interval( ( const char** ) time_data ); - QPixmap image_close ( ( const char** ) close_data ); + // set window attributes + setAttribute( Qt::WA_DeleteOnClose ); + setWindowTitle( tr( "TLT_REGISTRY" ) ); - // Buttons definition - QToolBar* topbar = new QToolBar( tr("Toolbar"), this ); - topbar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); - addToolBar( Qt::TopToolBarArea, topbar ); + // show status bar + statusBar(); - _refresh = topbar->addAction(image_refresh, tr( "Refresh" ), this, SLOT( slotListeSelect() )); - _refresh->setToolTip( "" ); - _refresh->setStatusTip( tr("Immediately updates list of components") ); + // get main menu bar + QMenuBar* mainMenu = menuBar(); - /* PAL5540 - this button is needless - QPushButton* help = new QPushButton( tr( "Help" ), topbar ); - connect( help, SIGNAL( clicked() ), this, SLOT( slotHelp() ) ); - QToolTip::add( help, "", toolTipGroup(), tr("Opens Help window") ); - */ + // add 'Actions' menu + QMenu* m = mainMenu->addMenu( tr( "MNU_ACTIONS" ) ); + // add 'Actions' toolbar + QToolBar* tb = addToolBar( tr( "TB_ACTIONS" ) ); + + // create actions + myActions[Refresh] = new QAction( QPixmap( refresh_data ), tr( "MEN_REFRESH" ), this ); + myActions[Refresh]->setStatusTip( tr( "STB_REFRESH" ) ); + connect( myActions[Refresh], SIGNAL( triggered() ), this, SLOT( refresh() ) ); + m->addAction( myActions[Refresh] ); + tb->addAction( myActions[Refresh] ); - _interval = topbar->addAction(image_interval, tr( "Interval" ), this, SLOT( slotSelectRefresh() )); - _interval->setToolTip( "" ); - _interval->setStatusTip( tr("Changes refresh interval") ); - - topbar->addSeparator(); - - _close = topbar->addAction( image_close, tr("Close"), this, SLOT( close() )); - _close->setToolTip( "" ); - _close->setStatusTip( tr("Closes Registry window") ); + myActions[Interval] = new QAction( QPixmap( time_data ), tr( "MEN_INTERVAL" ), this ); + myActions[Interval]->setStatusTip( tr( "STB_INTERVAL" ) ); + connect( myActions[Interval], SIGNAL( triggered() ), this, SLOT( refreshInterval() ) ); + m->addAction( myActions[Interval] ); + tb->addAction( myActions[Interval] ); - // Display area and associated slots definition - _tabWidget = new QTabWidget( this ); - _clients = new QTreeWidget( _tabWidget ); - SetListe(); - _history = new QTreeWidget( _tabWidget ); - SetListeHistory(); - - _tabWidget->addTab( _clients, tr( "Running" ) ); - _tabWidget->addTab( _history, tr( "History" ) ); - connect( _tabWidget, SIGNAL( currentChanged( QWidget* )), this, SLOT( slotListeSelect() ) ); - connect( _clients, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( slotClientChanged( QTreeWidgetItem* , int ) ) ); - connect( _history, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( slotHistoryChanged( QTreeWidgetItem* , int ) ) ); - setCentralWidget( _tabWidget ); + m->addSeparator(); + tb->addSeparator(); + + myActions[Close] = new QAction( QPixmap( close_data ), tr( "MEN_CLOSE" ), this ); + myActions[Close]->setStatusTip( tr( "STB_CLOSE" ) ); + connect( myActions[Close], SIGNAL( triggered() ), this, SLOT( close() ) ); + m->addAction( myActions[Close] ); + tb->addAction( myActions[Close] ); + + // central widget + setCentralWidget( new QWidget( this ) ); + + // Create tab widget: SALOME serives list (running and history) + QTabWidget* tabWidget = new QTabWidget( centralWidget() ); + + myViews[Clients] = new QTreeWidget( tabWidget ); + myViews[Clients]->setColumnCount( 6 ); + myViews[Clients]->setAllColumnsShowFocus( true ); + myViews[Clients]->setRootIsDecorated( false ); + QStringList runningLabels; + runningLabels << tr( "HDR_COMPONENT" ) << tr( "HDR_PID" ) << tr( "HDR_USERNAME" ) + << tr( "HDR_HOSTNAME" ) << tr( "HDR_STARTED" ) << tr( "HDR_HELLO" ); + myViews[Clients]->setHeaderLabels( runningLabels ); + tabWidget->addTab( myViews[Clients], tr( "TAB_RUNNING" ) ); + + myViews[History] = new QTreeWidget( tabWidget ); + myViews[History]->setColumnCount(6); + myViews[History]->setAllColumnsShowFocus( true ); + myViews[History]->setRootIsDecorated( false ); + QStringList historyLabels; + historyLabels << tr( "HDR_COMPONENT" ) << tr( "HDR_PID" ) << tr( "HDR_USERNAME" ) + << tr( "HDR_HOSTNAME" ) << tr( "HDR_STARTED" ) << tr( "HDR_FINISHED" ); + myViews[History]->setHeaderLabels( historyLabels ); + tabWidget->addTab( myViews[History], tr( "TAB_HISTORY" ) ); + + connect( tabWidget, SIGNAL( currentChanged( int ) ), this, SLOT( refresh() ) ); + connect( myViews[Clients], SIGNAL( itemActivated( QTreeWidgetItem*, int ) ), + this, SLOT( showDetails( QTreeWidgetItem*, int ) ) ); + connect( myViews[History], SIGNAL( itemActivated( QTreeWidgetItem*, int ) ), + this, SLOT( showDetails( QTreeWidgetItem*, int ) ) ); + + // create information window + myDetails = new QTextEdit( centralWidget() ); + myDetails->setReadOnly( true ); + myDetails->setMinimumHeight( 100 ); + + // layout widgets + QVBoxLayout* topLayout = new QVBoxLayout( centralWidget() ); + topLayout->setMargin( 0 ); + topLayout->setSpacing( SPACING_SIZE ); + topLayout->addWidget( tabWidget ); + topLayout->addWidget( myDetails ); - // Timer definition (used to automaticaly refresh the display area) - _counter = new QTimer( this ); - connect( _counter, SIGNAL( timeout() ), this, SLOT( slotListeSelect() ) ); - myRefreshInterval = 10; - _counter->start( myRefreshInterval * 1000 ); + // install auto-update timer + myTimer = new QTimer( this ); + connect( myTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); + myTimer->start( 10000 ); // 10 seconds by default - PIXELS xpos = 160 ; - PIXELS ypos = 100 ; - PIXELS largeur = 800 ; - PIXELS hauteur = 350 ; - setGeometry( xpos, ypos, largeur, hauteur ) ; - setWindowTitle( tr( "Registry" ) ) ; - statusBar()->showMessage(" "); - - slotListeSelect(); + // resize window and set its position + resize( 800, 400 ); + Qtx::alignWidget( (QWidget*)this, (QWidget*)QApplication::desktop(), Qtx::AlignCenter ); + + // refresh registry information + refresh(); } /*! @@ -570,277 +278,115 @@ ToolsGUI_RegWidget::ToolsGUI_RegWidget( CORBA::ORB_var& orb, QWidget* parent ) */ ToolsGUI_RegWidget::~ToolsGUI_RegWidget() { - _counter->stop(); myRegWidgetPtr = 0; }; /*! - \brief Event filter - \param object event receiver - \param event event being processed - \return \c true if event processing should be stopped -*/ -bool ToolsGUI_RegWidget::eventFilter( QObject* object, QEvent* event ) -{ - if ( object ) { - if ( object == myHelpWindow && event->type() == QEvent::Close ) { - myHelpWindow = 0; - } - else if ( object == myInfoWindow && event->type() == QEvent::Close ) { - myInfoWindow = 0; - } - else if ( object == myIntervalWindow && event->type() == QEvent::Close ) { - myIntervalWindow = 0; - } - else if ( object == _clients && event->type() == QEvent::KeyPress ) { - QKeyEvent* ke = (QKeyEvent*)event; - if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) { - slotClientChanged( _clients->currentItem(), 0 ); - } - } - else if ( object == _history && event->type() == QEvent::KeyPress ) { - QKeyEvent* ke = (QKeyEvent*)event; - if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) { - slotHistoryChanged( _history->currentItem(), 0 ); - } - } - } - return QMainWindow::eventFilter( object, event ); -} - -/*! - \brief Search item in the list. - \param name component name - \param pid PID - \param machine machine name - \param listclient list of registry data - \return item index or -1 if it is not found. -*/ -int ToolsGUI_RegWidget::numitem( const QString& name, - const QString& pid, - const QString& machine, - const Registry::AllInfos* listclient ) -{ - for (CORBA::ULong i=0; ilength(); i++) { - const Registry::Infos & c_info=(*listclient)[i]; - ASSERT( c_info.name!=NULL); - QString b; - b.setNum(int(c_info.pid)); - if ( (name.compare(QString(c_info.name)) == 0) && - (machine.compare(QString(c_info.machine)) == 0) && - (pid.compare(b) == 0) ) { - return i; - } - } - return -1; -} - -/*! - \brief Get description text, containing information about client. + \brief Get description text, containing information about the service. \param c_info client info data \return formatted client description */ -QString ToolsGUI_RegWidget::setlongText( const Registry::Infos& c_info ) +QString ToolsGUI_RegWidget::getDetails( const Registry::Infos& c_info ) { - ASSERT( c_info.name != NULL ); - QString a = QString( "

" ) + tr( "Code" ) + QString( " : " ); - a.append( QString( c_info.name ) ); - a.append( "



" ); - a.append( "" ); // ASV: 28.07.06 : added tags to make the text font be - // fixed width (looks much better on Windows) - a.append( tr( "Process Id" ) + QString( " : " ) ); - a.append( BOLD( QString::number( int( c_info.pid ) ) ) ); - a.append( QString( " " ) + tr( "on machine" ) + QString( " " ) ); - a.append( BOLD( c_info.machine ) ); - a.append( QString( " " ) + tr( "ip address" ) + QString( " : " ) ); - a.append( BOLD( c_info.adip ) ); - a.append( "
" ); - - a.append( tr( "launched by user" ) + QString( " " ) ); - a.append( BOLD( c_info.pwname ) ); - a.append( QString( " ( " ) + tr( "pid" ) + QString( " : " ) ); - a.append( BOLD( QString::number( int( c_info.uid ) ) ) ); - a.append( QString( " )
" ) + tr( "in directory" ) + QString( " " )); - a.append( BOLD( c_info.cdir ) ); - - time_t aTime; - a.append( QString( "
" ) + tr( "begins" ) + QString( " " ) ); - aTime = time_t(c_info.tc_start); - char * t1 = (char * )duplicate(ctime(&aTime)); - t1 [strlen(t1) -1 ] = ' '; - a.append( BOLD( t1 ) ); - delete [] t1; - a.append( "
" ); - - if (c_info.tc_hello != 0 ) { - aTime = time_t(c_info.tc_hello); - char * t2 = (char * )duplicate(ctime(&aTime)); - t2 [strlen(t2) -1 ] = ' '; - a.append( tr( "last signal" ) + QString(" : ") ); - a.append( BOLD( t2 ) ); + QString a; + if ( c_info.name != NULL ) { + time_t aStarted( c_info.tc_start ); + time_t aLastPing( c_info.tc_hello ); + time_t aFinished( c_info.tc_end ); + + a.append( BOLD( tr( "INFO_SERVICE" ).arg( QString( c_info.name ) ) ) ); a.append( "
" ); - delete [] t2; - } - if ((c_info.tc_end - c_info.difftime) != 0) { - aTime = time_t(c_info.tc_end); - char * t3 = (char * )duplicate(ctime(&aTime)); - t3 [strlen(t3) -1 ] = ' '; - a.append( tr( "ends" ) + QString( " " ) ); - a.append( BOLD( t3 ) ); a.append( "
" ); - delete [] t3; - } - else { - a.append( tr( "still running" ) + QString( "
" ) ); - } - - SCRUTE(c_info.difftime); - if (c_info.difftime!= 0) { - a.append( QString( "(" ) + tr( "Time on" ) + QString( " " ) ); - a.append( BOLD( c_info.machine ) ); - a.append( QString( " " ) + tr( "differs from server's time. The difference is" ) + QString( " " )); - a.append( BOLD( QString::number( int( c_info.difftime ) ) ) ); - a.append( QString( " " ) + tr( "seconds" ) + QString( ")
" ) ); + a.append( tr( "INFO_PROCESS" ).arg( BOLD( QString::number( c_info.pid ) ), + BOLD( c_info.machine ), + BOLD( c_info.adip ), + BOLD( c_info.pwname ), + BOLD( QString::number( c_info.uid ) ), + BOLD( c_info.cdir ) ) ); + a.append( "
" ); + a.append( "
" ); + a.append( tr( "INFO_STARTED" ).arg( BOLD( QString( ctime( &aStarted ) ).trimmed() ) ) ); + a.append( "
" ); + if ( c_info.tc_hello != 0 ) { + a.append( tr( "INFO_LAST_PING" ).arg( BOLD( QString( ctime( &aLastPing ) ).trimmed() ) ) ); + a.append( "
" ); + } + if ( c_info.tc_end - c_info.difftime != 0 ) { + a.append( tr( "INFO_FINISHED" ).arg( BOLD( QString( ctime( &aFinished ) ).trimmed() ) ) ); + a.append( "
" ); + } + else { + a.append( tr( "INFO_RUNNING" ) ); + a.append( "
" ); + } + if ( c_info.difftime != 0 ) { + a.append( tr( "INFO_TIME_DIFF" ).arg( BOLD( c_info.machine ), BOLD( QString::number( c_info.difftime ) ) ) ); + a.append( "
" ); + } + a.append( "
" ); // ASV: 28.07.06 : added tags to make the text font be + // fixed width (looks much better on Windows) } - a.append( "" ); // ASV: 28.07.06 : added tags to make the text font be - // fixed width (looks much better on Windows) return a; - } /*! - \brief Close event handler. - \param e close event + \brief Refresh registry information */ -void ToolsGUI_RegWidget::closeEvent( QCloseEvent* e ) +void ToolsGUI_RegWidget::refresh() { - if ( myInfoWindow ) - myInfoWindow->close(); - if ( myHelpWindow ) - myHelpWindow->close(); - if (myIntervalWindow) - myIntervalWindow->close(); - e->accept(); -}; - -/*! - \brief Setup clients list. -*/ -void ToolsGUI_RegWidget::SetListe() -{ - _clients->installEventFilter( this ); - _clients->setColumnCount(6); - _clients->setAllColumnsShowFocus( true ); - QStringList aLabels; - aLabels << tr("Component") << tr("PID") << tr("User Name") << tr("Machine") << tr("begins") << tr("hello"); - _clients->setHeaderLabels( aLabels ); - //_clients->setColumnAlignment( 1, Qt::AlignRight ); -} - -/*! - \brief Setup history list. -*/ -void ToolsGUI_RegWidget::SetListeHistory() -{ - _history->installEventFilter( this ); - _history->setColumnCount(6); - _history->setAllColumnsShowFocus( true ); - QStringList aLabels; - aLabels << tr("Component") << tr("PID") << tr("User Name") << tr("Machine") << tr("begins") << tr("ends"); - _history->setHeaderLabels( aLabels ); - //_history->setColumnAlignment( 1, Qt::AlignRight ); -} - -/*! - \brief Update history list -*/ -void ToolsGUI_RegWidget::InfoHistory() -{ - - _history->clear(); try { - time_t aTime; - _serverhistory = _VarComponents->history(); - for (CORBA::ULong i=0; i<_serverhistory->length(); i++) { - const Registry::Infos & c_info=(*_serverhistory)[i]; - ASSERT( c_info.name!=NULL); - QString a; - a.setNum(int(c_info.pid)); - aTime = time_t(c_info.tc_start); - char * t1 = (char * )duplicate(ctime(&aTime)); - t1 [strlen(t1) -1 ] = ' '; - aTime = time_t(c_info.tc_end); - char * t2 = (char * )duplicate(ctime(&aTime)); - t2 [strlen(t2) -1 ] = ' '; - QStringList anItem; - anItem << QString(c_info.name) << a << QString(c_info.pwname) << QString(c_info.machine) << QString(t1) << QString(t2); - QTreeWidgetItem * item = new QTreeWidgetItem(_history, anItem); - item=0 ; - delete [] t1; - delete [] t2; - + // get reference to the Registry service + Registry::Components_var aRegistry = GetRegistry( myOrb ); + if ( aRegistry->_is_nil() ) { + myActions[Interval]->setDisabled( true ); + myActions[Refresh]->setDisabled( true ); + myTimer->stop(); + MESSAGE( "Sorry, no more Registry Server" ); + statusBar()->showMessage( tr( "ERR_NO_REGISTRY" ) ); + return; } - } - catch( ... ) { - _interval->setDisabled( TRUE ) ; - _refresh->setDisabled( TRUE ) ; - _counter->stop(); - MESSAGE("Sorry, No more Registry Server") ; - statusBar()->showMessage( tr( "Sorry, No more Registry Server" ) ) ; - } -} -/*! - \brief Update clients list -*/ -void ToolsGUI_RegWidget::InfoReg() -{ - _clients->clear(); - try { - time_t aTime; - _serverclients = _VarComponents->getall(); - for (CORBA::ULong i=0; i<_serverclients->length(); i++) { - const Registry::Infos & c_info=(*_serverclients)[i]; - ASSERT( c_info.name!=NULL); - QString a; - a.setNum(int(c_info.pid)); - aTime = time_t(c_info.tc_start); - char * t1 = (char * )duplicate(ctime(&aTime)); - t1 [strlen(t1) -1 ] = ' '; - aTime = time_t(c_info.tc_hello); - char * t2 = (char * )duplicate(ctime(&aTime)); - t2 [strlen(t2) -1 ] = ' '; - QStringList anItem; - anItem << QString(c_info.name) << a << QString(c_info.pwname) << QString(c_info.machine) << QString(t1) << QString(t2); - QTreeWidgetItem * item = new QTreeWidgetItem(_clients, anItem); - item=0 ; - delete [] t1; - delete [] t2; - + myData[Clients] = aRegistry->getall(); + myData[History] = aRegistry->history(); + + // update current services list + myViews[Clients]->clear(); + for ( int i = 0; i < myData[Clients]->length(); i++ ) { + const Registry::Infos& c_info = (*myData[Clients])[i]; + time_t aStarted = time_t( c_info.tc_start ); + time_t aLastPing = time_t( c_info.tc_hello ); + QStringList aData; + aData << QString( c_info.name ) + << QString::number( c_info.pid ) + << QString( c_info.pwname ) + << QString( c_info.machine ) + << QString( ctime( &aStarted ) ).trimmed() + << QString( ctime( &aLastPing ) ).trimmed(); + myViews[Clients]->addTopLevelItem( new QTreeWidgetItem( aData ) ); } - } - catch( ... ) { - _interval->setDisabled( TRUE ) ; - _refresh->setDisabled( TRUE ) ; - _counter->stop(); - MESSAGE("Sorry, No more Registry Server") ; - statusBar()->showMessage( tr( "Sorry, No more Registry Server" ) ) ; - } -} -/*! - \brief Called when \c Refresh button is clicked -*/ -void ToolsGUI_RegWidget::slotListeSelect() -{ - try { - ASSERT(_tabWidget->currentWidget() != NULL); - if (_tabWidget->currentWidget () == _clients) InfoReg(); - else if (_tabWidget->currentWidget () == _history) InfoHistory(); + // update history + myViews[History]->clear(); + for ( int i = 0; i < myData[History]->length(); i++ ) { + const Registry::Infos& c_info = (*myData[History])[i]; + time_t aStarted = time_t( c_info.tc_start ); + time_t aFinished = time_t( c_info.tc_end ); + QStringList aData; + aData << QString( c_info.name ) + << QString::number( c_info.pid ) + << QString( c_info.pwname ) + << QString( c_info.machine ) + << QString( ctime( &aStarted ) ).trimmed() + << QString( ctime( &aFinished ) ).trimmed(); + myViews[History]->addTopLevelItem( new QTreeWidgetItem( aData ) ); + } } catch( ... ) { - MESSAGE("Sorry, No more Registry Server") ; - statusBar()->showMessage( tr( "Sorry, No more Registry Server" ) ) ; + myActions[Interval]->setDisabled( true ); + myActions[Refresh]->setDisabled( true ); + myTimer->stop(); + MESSAGE( "Sorry, no more Registry Server" ); + statusBar()->showMessage( tr( "ERR_NO_REGISTRY" ) ); } } @@ -848,105 +394,27 @@ void ToolsGUI_RegWidget::slotListeSelect() \brief Called when \c Interval button is clicked (open dialog box to change refresh interval). */ -void ToolsGUI_RegWidget::slotSelectRefresh() +void ToolsGUI_RegWidget::refreshInterval() { - myIntervalWindow = new ToolsGUI_RegWidget::IntervalWindow(this); - myIntervalWindow->installEventFilter( this ); - myIntervalWindow->setValue(myRefreshInterval); - myIntervalWindow->show(); - connect( myIntervalWindow->Cancel(), SIGNAL( clicked() ), myIntervalWindow, SLOT( close() ) ); - connect( myIntervalWindow->Ok(), SIGNAL( clicked() ), this, SLOT( slotIntervalOk() ) ); + bool ok; + int sec = QInputDialog::getInt( this, tr( "TLT_REFRESH_INTERVAL" ), tr( "LAB_REFRESH_INTERVAL" ), + myTimer->interval() / 1000, 1, 24 * 60 * 60, 1, &ok ); + if ( ok ) + myTimer->start( sec * 1000 ); } /*! - \brief Called when IntervalWindow's \c OK button is clicked -*/ -void ToolsGUI_RegWidget::slotIntervalOk() -{ - myRefreshInterval = myIntervalWindow->getValue(); - _counter->start( myRefreshInterval * 1000 ); - SCRUTE(myRefreshInterval); - myIntervalWindow->close(); -} -/*! - \brief Called when \c Help button is clicked + \brief Show details about the chosen service. + \param item item activated by the user + \param column column index */ -void ToolsGUI_RegWidget::slotHelp() +void ToolsGUI_RegWidget::showDetails( QTreeWidgetItem* item, int column ) { - if ( !myHelpWindow ) { - myHelpWindow = new ToolsGUI_RegWidget::HelpWindow( this ); - myHelpWindow->installEventFilter( this ); - } - myHelpWindow->show(); - myHelpWindow->raise(); - myHelpWindow->activateWindow(); + if ( !item || column < 0 ) return; + int i = sender() == myViews[Clients] ? Clients : History; + int idx = myViews[i]->indexOfTopLevelItem( item ); + int size = myData[i]->length(); + if ( idx < 0 || idx > size-1 ) return; + const Registry::Infos& c_info = (*myData[i])[idx]; + myDetails->setText( getDetails( c_info ) ); } - -/*! - \brief Called when user clicks on item in \c Running list - \param item item clicked by the user -*/ -void ToolsGUI_RegWidget::slotClientChanged( QTreeWidgetItem* item, int col ) -{ - if ( !item || col < 0 ) - return; - - blockSignals( true ); // for sure that item will not be deleted when refreshing - - int numeroItem = numitem(item->text(0), item->text(1), item->text(3), _serverclients); - SCRUTE(numeroItem) ; - SCRUTE(item->text(1).toLatin1().constData()) ; - - ASSERT(numeroItem>=0) ; - ASSERT((size_t)numeroItem<_serverclients->length()) ; - const Registry::Infos & c_info=(*_serverclients)[numeroItem]; - ASSERT( c_info.name!=NULL); - - if ( !myInfoWindow ) { - myInfoWindow = new ToolsGUI_RegWidget::InfoWindow( this ); - myInfoWindow->installEventFilter( this ); - } - QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name ); - myInfoWindow->setWindowTitle(a); - myInfoWindow->setText( ToolsGUI_RegWidget::setlongText( c_info) ); - myInfoWindow->show(); - myInfoWindow->raise(); - myInfoWindow->activateWindow(); - - blockSignals( false ); // enabling signals again -} - -/*! - \brief Called when user clicks on item in \c History list - \param item item clicked by the user -*/ -void ToolsGUI_RegWidget::slotHistoryChanged( QTreeWidgetItem* item, int col ) -{ - if ( !item || col < 0 ) - return; - - blockSignals( true ); // for sure that item will not be deleted when refreshing - - int numeroItem = numitem(item->text(0), item->text(1), item->text(3), _serverhistory); - - SCRUTE(numeroItem) ; - SCRUTE(item->text(1).toLatin1().constData()) ; - ASSERT(numeroItem>=0) ; - ASSERT((size_t)numeroItem<_serverhistory->length()) ; - const Registry::Infos & c_info=(*_serverhistory)[numeroItem]; - ASSERT( c_info.name!=NULL); - - if ( !myInfoWindow ) { - myInfoWindow = new ToolsGUI_RegWidget::InfoWindow( this ); - myInfoWindow->installEventFilter( this ); - } - QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name ); - myInfoWindow->setWindowTitle(a); - myInfoWindow->setText( ToolsGUI_RegWidget::setlongText( c_info ) ); - myInfoWindow->show(); - myInfoWindow->raise(); - myInfoWindow->activateWindow(); - - blockSignals( false ); // enabling signals again -} - diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index 586cc9867..657bed022 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -20,88 +20,55 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME RegistryDisplay : GUI for Registry server implementation -// File : ToolsGUI_RegWidget.h -// Author : Pascale NOYRET, EDF -// #ifndef TOOLSGUI_REGWIDGET_H #define TOOLSGUI_REGWIDGET_H #include "ToolsGUI.h" #include +#include #include #include CORBA_CLIENT_HEADER(SALOME_Registry) -class QTabWidget; class QTreeWidget; class QTreeWidgetItem; -class QWidget; class QTimer; -class QCloseEvent; class QAction; +class QTextEdit; class TOOLSGUI_EXPORT ToolsGUI_RegWidget : public QMainWindow { Q_OBJECT - class HelpWindow; - class IntervalWindow; - class InfoWindow; + enum { Refresh, Interval, Close }; + enum { Clients, History }; - ToolsGUI_RegWidget( CORBA::ORB_var& orb, QWidget* parent = 0 ); + ToolsGUI_RegWidget( CORBA::ORB_ptr orb, QWidget* parent = 0 ); public: ~ToolsGUI_RegWidget(); - void SetListe(); - void SetListeHistory(); - void InfoReg(); - void InfoHistory(); - - bool eventFilter( QObject* object, QEvent* event ); - - static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_var& orb, + static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_ptr orb, QWidget* parent = 0 ); - virtual QMenu* createPopupMenu(); +private slots: + void refresh(); + void showDetails( QTreeWidgetItem*, int ); + void refreshInterval(); -public slots: - void slotHelp(); - void slotListeSelect(); - void slotClientChanged( QTreeWidgetItem*, int ); - void slotHistoryChanged( QTreeWidgetItem*, int ); - void slotSelectRefresh(); - void slotIntervalOk(); - -protected: - static QString setlongText( const Registry::Infos& c_info ); - int numitem( const QString& name, - const QString& pid, - const QString& machine, - const Registry::AllInfos* clistclient ); - void closeEvent( QCloseEvent* e ); +private: + static QString getDetails( const Registry::Infos& c_info ); -protected : - QTreeWidget* _clients; - QTreeWidget* _history; - QWidget* _parent; - QTabWidget* _tabWidget; - QAction* _refresh; - QAction* _interval; - QAction* _close; - QTimer* _counter; - Registry::AllInfos* _serverhistory; - Registry::AllInfos* _serverclients; - InfoWindow* myInfoWindow; - HelpWindow* myHelpWindow; - IntervalWindow* myIntervalWindow; - int myRefreshInterval; - private: - const Registry::Components_var _VarComponents; - static ToolsGUI_RegWidget* myRegWidgetPtr; + static ToolsGUI_RegWidget* myRegWidgetPtr; + + CORBA::ORB_var myOrb; + QMap myData; + QMap myActions; + QMap myViews; + QTextEdit* myDetails; + QTimer* myTimer; }; #endif // TOOLSGUI_REGWIDGET_H diff --git a/src/TOOLSGUI/resources/ToolsGUI_msg_en.ts b/src/TOOLSGUI/resources/ToolsGUI_msg_en.ts index 8f25a61e5..4337da127 100644 --- a/src/TOOLSGUI/resources/ToolsGUI_msg_en.ts +++ b/src/TOOLSGUI/resources/ToolsGUI_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default @@ -125,4 +104,119 @@ File doesn't exist IDL : + + ToolsGUI_RegWidget + + TLT_REFRESH_INTERVAL + Refresh Interval + + + LAB_REFRESH_INTERVAL + New refresh interval (in seconds) + + + TLT_REGISTRY + Registry + + + MNU_ACTIONS + Actions + + + TB_ACTIONS + Actions + + + MEN_REFRESH + Refresh + + + STB_REFRESH + Immediately updates list of components + + + MEN_INTERVAL + Refresh interval... + + + STB_INTERVAL + Change refresh interval + + + MEN_CLOSE + Close + + + STB_CLOSE + Close Registry window + + + TAB_RUNNING + Running + + + TAB_HISTORY + History + + + HDR_COMPONENT + Component + + + HDR_PID + PID + + + HDR_USERNAME + User name + + + HDR_HOSTNAME + Host name + + + HDR_STARTED + Started + + + HDR_FINISHED + Finished + + + HDR_HELLO + Last ping + + + ERR_NO_REGISTRY + Error: Registry Server is not found + + + INFO_SERVICE + Service : %1 + + + INFO_PROCESS + Process ( PID : %1 ) on the machine %2 ( ip address : %3 ); launched by the user %4 ( UID : %5 ) in directory %6. + + + INFO_STARTED + Started : %1 + + + INFO_LAST_PING + Last signal : %1 + + + INFO_FINISHED + Finished : %1 + + + INFO_RUNNING + Still running + + + INFO_TIME_DIFF + Time on %1 differs from server's time. The difference is %2 seconds. + + diff --git a/src/TOOLSGUI/resources/ToolsGUI_msg_fr.ts b/src/TOOLSGUI/resources/ToolsGUI_msg_fr.ts new file mode 100755 index 000000000..189eeccaa --- /dev/null +++ b/src/TOOLSGUI/resources/ToolsGUI_msg_fr.ts @@ -0,0 +1,222 @@ + + + + + @default + + TOOLS_WRN_WARNING + Avertissement + + + TOOLS_BUT_BROWSE + Naviquer... + + + TOOLS_ERR_ERROR + Erreur + + + TOOLS_ERR_FILE_NOT_EXIST + %1 +Le fichier n'existe pas + + + TOOLS_BUT_OK + &Ok + + + TOOLS_BUT_APPLY + &Appliquer + + + TOOLS_BUT_CLOSE + &Fermer + + + + ToolsGUI_CatalogGeneratorDlg + + TOOLS_MEN_EXPORT + Exporter + + + TOOLS_MEN_IMPORT + Importer + + + TOOLS_VERSION + Version : + + + TOOLS_COMP_NAME + Nom : + + + TOOLS_COMP_TYPE + Type : + + + TOOLS_XML_FILE + XML : + + + TOOLS_PNG_FILE + Icône : + + + TOOLS_SUPPLEMENT + Données du Composant Supplémentaires + + + TOOLS_AUTHOR + Autheur : + + + TOOLS_COMP_MULTISTD + Multiétude : + + + TOOLS_COMP_USERNAME + NomUtilisateur : + + + TOOLS_CATALOG_GENERATOR + Générateur du Catalogue + + + TOOLS_FILES + Fichiers + + + TOOLS_MEN_IMPORT_PNG + Fichiers PNG ( *.png ) + + + TOOLS_MEN_IMPORT_IDL + Fichiers IDL ( *.idl ) + + + TOOLS_MEN_EXPORT_XML + Fichiers XML ( *.xml ) + + + TOOLS_IDL_FILE + IDL : + + + + ToolsGUI_RegWidget + + TLT_REFRESH_INTERVAL + Fréquence d'actualisation + + + LAB_REFRESH_INTERVAL + Nouvelle fréquence d'actualisation (en secondes) + + + TLT_REGISTRY + Registre + + + MNU_ACTIONS + Actions + + + TB_ACTIONS + Actions + + + MEN_REFRESH + Refresh + + + STB_REFRESH + Met à jour toutb de suite la liste des composants + + + MEN_INTERVAL + Fréquence d'actualisation... + + + STB_INTERVAL + Changer la fréquence d'actualisation + + + MEN_CLOSE + Fermer + + + STB_CLOSE + Fermer la fenêtre du Registre + + + TAB_RUNNING + En cours + + + TAB_HISTORY + Historique + + + HDR_COMPONENT + Composant + + + HDR_PID + PID + + + HDR_USERNAME + Nom de l'utilisateur + + + HDR_HOSTNAME + Nom de l'hôte + + + HDR_STARTED + Commencé + + + HDR_FINISHED + Fini + + + HDR_HELLO + Dernier ping + + + ERR_NO_REGISTRY + Erreur: le Serveur du Registre n'est pas trouvé + + + INFO_SERVICE + Service : %1 + + + INFO_PROCESS + Le procédé ( PID : %1 ) sur la station %2 ( ip adresse : %3 ); lancé par l'utilisateur %4 ( UID : %5 ) au répertoire %6. + + + INFO_STARTED + Commencé : %1 + + + INFO_LAST_PING + Dernier signal : %1 + + + INFO_FINISHED + Fini : %1 + + + INFO_RUNNING + Demeure en cours + + + INFO_TIME_DIFF + Le temps de la station %1 est différent du temps du serveur. La différence est %2 secondes. + + + diff --git a/src/VTKViewer/Makefile.am b/src/VTKViewer/Makefile.am index b5187b295..56da23db4 100755 --- a/src/VTKViewer/Makefile.am +++ b/src/VTKViewer/Makefile.am @@ -59,7 +59,8 @@ salomeinclude_HEADERS = \ VTKViewer_MarkerWidget.h \ VTKViewer_MarkerDlg.h \ VTKViewer_PolyDataMapper.h \ - VTKViewer_DataSetMapper.h + VTKViewer_DataSetMapper.h \ + VTKViewer_CellCenters.h dist_libVTKViewer_la_SOURCES = \ VTKViewer_CellLocationsArray.cxx \ @@ -87,7 +88,8 @@ dist_libVTKViewer_la_SOURCES = \ VTKViewer_MarkerWidget.cxx \ VTKViewer_MarkerDlg.cxx \ VTKViewer_PolyDataMapper.cxx \ - VTKViewer_DataSetMapper.cxx + VTKViewer_DataSetMapper.cxx \ + VTKViewer_CellCenters.cxx MOC_FILES = \ VTKViewer_RenderWindow_moc.cxx \ @@ -131,7 +133,8 @@ dist_salomeres_DATA = \ nodist_salomeres_DATA = \ VTKViewer_images.qm \ - VTKViewer_msg_en.qm + VTKViewer_msg_en.qm \ + VTKViewer_msg_fr.qm libVTKViewer_la_CPPFLAGS = $(QT_INCLUDES) $(VTK_INCLUDES) $(CAS_CPPFLAGS) \ -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT diff --git a/src/VTKViewer/VTKViewer_CellCenters.cxx b/src/VTKViewer/VTKViewer_CellCenters.cxx new file mode 100644 index 000000000..91c998856 --- /dev/null +++ b/src/VTKViewer/VTKViewer_CellCenters.cxx @@ -0,0 +1,184 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "VTKViewer_CellCenters.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +vtkCxxRevisionMacro(VTKViewer_CellCenters, "$Revision$"); +vtkStandardNewMacro(VTKViewer_CellCenters); + +/*! + * Class : VTKViewer_CellCenters + * Description : Filter computing geometrical centers of given cells + * (differs from native vtk filter by small fix for VTK_CONVEX_POINT_SET cells) + */ + +/*! + Constructor +*/ +VTKViewer_CellCenters::VTKViewer_CellCenters() +{ +} + +/*! + Redefined main method +*/ +int VTKViewer_CellCenters::RequestData( + vtkInformation *vtkNotUsed(request), + vtkInformationVector **inputVector, + vtkInformationVector *outputVector) +{ + // get the info objects + vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); + vtkInformation *outInfo = outputVector->GetInformationObject(0); + + // get the input and ouptut + vtkDataSet *input = vtkDataSet::SafeDownCast( + inInfo->Get(vtkDataObject::DATA_OBJECT())); + vtkPolyData *output = vtkPolyData::SafeDownCast( + outInfo->Get(vtkDataObject::DATA_OBJECT())); + + vtkIdType cellId, numCells; + int subId; + vtkCellData *inCD; + vtkPointData *outPD; + vtkPoints *newPts; + vtkCell *cell; + double x[3], pcoords[3]; + double *weights; + + inCD=input->GetCellData(); + outPD=output->GetPointData(); + + if ( (numCells = input->GetNumberOfCells()) < 1 ) + { + vtkWarningMacro(<<"No cells to generate center points for"); + return 1; + } + + newPts = vtkPoints::New(); + newPts->SetNumberOfPoints(numCells); + weights = new double [input->GetMaxCellSize()]; + + int abort=0; + vtkIdType progressInterval = numCells/10 + 1; + int hasEmptyCells = 0; + for (cellId=0; cellId < numCells && !abort; cellId++) + { + if ( ! (cellId % progressInterval) ) + { + vtkDebugMacro(<<"Processing #" << cellId); + this->UpdateProgress (0.5*cellId/numCells); + abort = this->GetAbortExecute(); + } + + cell = input->GetCell(cellId); + if (cell->GetCellType() != VTK_EMPTY_CELL) + { + // fix for VTK_CONVEX_POINT_SET cells + if (cell->GetCellType() == VTK_CONVEX_POINT_SET ) + { + x[0] = x[1] = x[2] = 0; + vtkPoints* aPoints = cell->GetPoints(); + int aNbPoints = aPoints->GetNumberOfPoints(); + for( int i = 0; i < aNbPoints; i++ ) + { + double aCoord[3]; + aPoints->GetPoint( i, aCoord ); + x[0] += aCoord[0]; + x[1] += aCoord[1]; + x[2] += aCoord[2]; + } + x[0] /= aNbPoints; + x[1] /= aNbPoints; + x[2] /= aNbPoints; + } + else + { + subId = cell->GetParametricCenter(pcoords); + cell->EvaluateLocation(subId, pcoords, x, weights); + } + newPts->SetPoint(cellId,x); + } + else + { + hasEmptyCells = 1; + } + } + + if ( this->VertexCells ) + { + vtkIdType pts[1]; + vtkCellData *outCD=output->GetCellData(); + vtkCellArray *verts = vtkCellArray::New(); + verts->Allocate(verts->EstimateSize(1,numCells),1); + + for (cellId=0; cellId < numCells && !abort; cellId++) + { + if ( ! (cellId % progressInterval) ) + { + vtkDebugMacro(<<"Processing #" << cellId); + this->UpdateProgress (0.5+0.5*cellId/numCells); + abort = this->GetAbortExecute(); + } + + cell = input->GetCell(cellId); + if (cell->GetCellType() != VTK_EMPTY_CELL) + { + pts[0] = cellId; + verts->InsertNextCell(1,pts); + } + } + + output->SetVerts(verts); + verts->Delete(); + if (!hasEmptyCells) + { + outCD->PassData(inCD); //only if verts are generated + } + } + + // clean up and update output + output->SetPoints(newPts); + newPts->Delete(); + + if (!hasEmptyCells) + { + outPD->PassData(inCD); //because number of points = number of cells + } + if (weights) + { + delete [] weights; + } + + return 1; +} diff --git a/src/VTKViewer/VTKViewer_CellCenters.h b/src/VTKViewer/VTKViewer_CellCenters.h new file mode 100644 index 000000000..7057d7961 --- /dev/null +++ b/src/VTKViewer/VTKViewer_CellCenters.h @@ -0,0 +1,60 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef VTKVIEWER_CELLCENTERS_H +#define VTKVIEWER_CELLCENTERS_H + +#include "VTKViewer.h" + +#include + +#ifdef WIN32 +#pragma warning ( disable:4251 ) +#endif + +/*! + * Class : VTKViewer_CellCenters + * Description : Filter computing geometrical centers of given cells + * (differs from native vtk filter by small fix for VTK_CONVEX_POINT_SET cells) + */ +class VTKVIEWER_EXPORT VTKViewer_CellCenters : public vtkCellCenters +{ +public: + vtkTypeRevisionMacro(VTKViewer_CellCenters,vtkCellCenters); + + static VTKViewer_CellCenters *New(); + +protected: + VTKViewer_CellCenters(); + + virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); + +private: + VTKViewer_CellCenters(const VTKViewer_CellCenters&); // Not implemented. + void operator=(const VTKViewer_CellCenters&); // Not implemented. +}; + +#ifdef WIN32 +#pragma warning ( default:4251 ) +#endif + +#endif diff --git a/src/VTKViewer/resources/VTKViewer_msg_en.ts b/src/VTKViewer/resources/VTKViewer_msg_en.ts index 76b6902fa..c737763d7 100644 --- a/src/VTKViewer/resources/VTKViewer_msg_en.ts +++ b/src/VTKViewer/resources/VTKViewer_msg_en.ts @@ -1,27 +1,6 @@ - - + + + @default diff --git a/src/VTKViewer/resources/VTKViewer_msg_fr.ts b/src/VTKViewer/resources/VTKViewer_msg_fr.ts new file mode 100755 index 000000000..530b17a89 --- /dev/null +++ b/src/VTKViewer/resources/VTKViewer_msg_fr.ts @@ -0,0 +1,207 @@ + + + + + @default + + MNU_FRONT_VIEW + Devant + + + ERROR + Erreur + + + MNU_DUMP_VIEW + Clipper une vue... + + + DSC_TOP_VIEW + Vue de dessus + + + MNU_PAN_VIEW + Panoramique + + + MNU_TOP_VIEW + Dessus + + + DSC_GLOBALPAN_VIEW + Sélection d'un nouveau centre de la vue + + + DSC_ROTATE_VIEW + Tourner le point de vue autour du centre de la scène + + + MNU_ZOOM_VIEW + Zoom + + + DSC_PAN_VIEW + Redimensionner la vue + + + DSC_LEFT_VIEW + Vue de gauche + + + DSC_FITALL + Redimensionner la scène pour montrer tous les objets + + + MNU_FITALL + Montrer tous + + + MNU_ROTATE_VIEW + Rotation + + + DSC_SHOW_TRIHEDRON + Montrer/Cacher les axes de coordonnées dans la scène + + + DSC_FRONT_VIEW + Vue de Devant + + + MNU_GLOBALPAN_VIEW + Panoramique Globale + + + INF_APP_DUMP_VIEW + Clicher la vue + + + MNU_BACK_VIEW + Arrière + + + MNU_SHOW_TRIHEDRON + Montrer/Cacher les axes de coordonnées + + + MNU_BOTTOM_VIEW + Dessous + + + MNU_RESET_VIEW + Restaurer le point de vue + + + MNU_LEFT_VIEW + Gauche + + + DSC_RIGHT_VIEW + Veu de Droit + + + DSC_FITRECT + Redimensionner la scène pour ne montrer que la partie choisie par l'encadré + + + MNU_FITRECT + Montrer l'encadré + + + DSC_BOTTOM_VIEW + Vue de Dessous + + + DSC_DUMP_VIEW + Sauvegarder la scène en cours au fichier image + + + DSC_ZOOM_VIEW + Zoom la vue + + + VTK_IMAGE_FILES + Fichiers Images (*.bmp *.png *.jpg *.jpeg) + + + DSC_RESET_VIEW + Restaurer le Point de Vue + + + ERR_DOC_CANT_SAVE_FILE + Il est impossible de sauvegarder le fichier + + + MNU_RIGHT_VIEW + Droit + + + LBL_TOOLBAR_LABEL + Visualiser les Opérations + + + DSC_BACK_VIEW + Vue d'Arrière + + + + VTKViewer_MarkerDlg + + SET_MARKER_TLT + Définir le Repère Point + + + + VTKViewer_MarkerWidget + + STANDARD_MARKER + Standard + + + CUSTOM_MARKER + Personnalisé + + + TYPE + Type: + + + SCALE + Echelle: + + + CUSTOM + Texture: + + + BROWSE + Naviguer... + + + LOAD_TEXTURE_TLT + Charger une Texture + + + + VTKViewer_ViewManager + + VTK_VIEW_TITLE + VTK scène:%M - visualisateur:%V + + + + VTKViewer_Viewer + + MEN_DUMP_VIEW + Clicher la Vue... + + + MEN_SHOW_TOOLBAR + Montrer la Barre d'Outils + + + MEN_CHANGE_BACKGROUD + Changer l'Arrière-Plan... + + +