)
SET(MEDOPGUITS_SOURCES
- MEDOP_msg_en.ts
- MEDOP_msg_fr.ts
+ MED_images.ts
+ MED_msg_en.ts
+ MED_msg_fr.ts
)
SET(COMMON_DEFINITIONS "${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-SET(COMMON_FLAGS
+SET(COMMON_FLAGS
${CAS_KERNEL}
- ${QT_MT_LIBS}
- ${OMNIORB_LIBS}
- ${PLATFORM_LIBS}
+ ${QT_MT_LIBS}
+ ${OMNIORB_LIBS}
+ ${PLATFORM_LIBS}
${BOOST_LIBS}
- SalomeIDLMED
- MEDOPGUI_dialogs
- MEDOPFactoryEngine
+ SalomeIDLMED
+ MEDOPGUI_dialogs
+ MEDOPFactoryEngine
${qtx}
- ${suit}
+ ${suit}
${SalomeObject}
- ${SalomeLifeCycleCORBA}
- ${SalomeKernelHelpers}
- ${SalomeApp}
- ${SalomeGuiHelpers}
- ${SalomeTreeData}
+ ${SalomeLifeCycleCORBA}
+ ${SalomeKernelHelpers}
+ ${SalomeApp}
+ ${SalomeGuiHelpers}
+ ${SalomeTreeData}
${OpUtil}
${CAM}
${LightApp}
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Guillaume Boulant (EDF)
+// Author : Guillaume Boulant (EDF)
#include "DatasourceController.hxx"
#include "DatasourceConstants.hxx"
}
void DatasourceController::createActions() {
- //
+ //
// Main actions (toolbar and menubar)
//
- QString label = QString("Add Data Source");
- QString tooltip = QString("Add a file data source (file providing med data)");
- QString icon = QString("datasource_add.png");
+ QString label = tr("LAB_ADD_DATA_SOURCE");
+ QString tooltip = tr("TIP_ADD_DATA_SOURCE");
+ QString icon = tr("ICO_DATASOURCE_ADD");
int actionId;
actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddDatasource()),icon,tooltip);
_salomeModule->addActionInToolbar(actionId);
- label = QString("Add Image Source");
- tooltip = QString("Create a Data Source from an image file");
- icon = QString("image_add.png");
+ label = tr("LAB_ADD_IMAGE_SOURCE");
+ tooltip = tr("TIP_ADD_IMAGE_SOURCE");
+ icon = tr("ICO_IMAGE_ADD");
actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddImagesource()),icon,tooltip);
_salomeModule->addActionInToolbar(actionId);
-
+
//
// Actions for popup menu only
//
// Expand field timeseries
- label = QString("Expand field timeseries");
- icon = QString("datasource_expandfield.png");
+ label = tr("LAB_EXPAND_FIELD");
+ icon = tr("ICO_DATASOURCE_EXPAND_FIELD");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnExpandField()),icon);
_salomeModule->addActionInPopupMenu(actionId);
-
+
// Create a control view
- label = QString("Visualize");
- icon = QString("datasource_view.png");
+ label = tr("LAB_VISUALIZE");
+ icon = tr("ICO_DATASOURCE_VIEW");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualize()),icon);
_salomeModule->addActionInPopupMenu(actionId);
// Use in workspace
- label = QString("Use in workspace");
- icon = QString("datasource_use.png");
+ label = tr("LAB_USE_IN_WORKSPACE");
+ icon = tr("ICO_DATASOURCE_USE");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnUseInWorkspace()),icon);
_salomeModule->addActionInPopupMenu(actionId);
// Change underlying mesh (note that this action creates a new field in
// the workspace that corresponds to a copy of the selected field
// modified by the change of the underlying mesh.
- label = QString("Change underlying mesh");
- icon = QString("datasource_changeUnderlyingMesh.png");
+ label = tr("LAB_CHANGE_MESH");
+ icon = tr("ICO_DATASOURCE_CHANGE_MESH");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnChangeUnderlyingMesh()),icon);
_salomeModule->addActionInPopupMenu(actionId);
}
SALOMEDS::SComponent_var root = _studyEditor->findRoot(QCHARSTAR(_salomeModule->moduleName()));
SALOMEDS::SObject_var soDatasource = _studyEditor->newObject(root);
_studyEditor->setName(soDatasource,datasourceHandler->name);
- _studyEditor->setIcon(soDatasource,"datasource.png");
+ _studyEditor->setIcon(soDatasource,tr("ICO_DATASOURCE").toStdString().c_str());
_studyEditor->setParameterInt(soDatasource,OBJECT_ID,datasourceHandler->id);
-
+
// We can add the meshes as children of the datasource
- MEDOP::MeshHandlerList * meshHandlerList =
+ MEDOP::MeshHandlerList * meshHandlerList =
MEDOPFactoryClient::getDataManager()->getMeshList(datasourceHandler->id);
-
+
for(CORBA::ULong iMesh=0; iMesh<meshHandlerList->length(); iMesh++) {
MEDOP::MeshHandler meshHandler = (*meshHandlerList)[iMesh];
SALOMEDS::SObject_var soMesh = _studyEditor->newObject(soDatasource);
_studyEditor->setName(soMesh,meshHandler.name);
- _studyEditor->setIcon(soMesh,"datasource_mesh.png");
+ _studyEditor->setIcon(soMesh,tr("ICO_DATASOURCE_MESH").toStdString().c_str());
_studyEditor->setParameterInt(soMesh,OBJECT_ID,meshHandler.id);
_studyEditor->setParameterBool(soMesh,OBJECT_IS_IN_WORKSPACE,false);
-
+
// We add the field timeseries defined on this mesh, as children
// of the mesh SObject
MEDOP::FieldseriesHandlerList * fieldseriesHandlerList =
MEDOPFactoryClient::getDataManager()->getFieldseriesListOnMesh(meshHandler.id);
-
+
for(CORBA::ULong iFieldseries=0; iFieldseries<fieldseriesHandlerList->length(); iFieldseries++) {
MEDOP::FieldseriesHandler fieldseriesHandler = (*fieldseriesHandlerList)[iFieldseries];
SALOMEDS::SObject_var soFieldseries = _studyEditor->newObject(soMesh);
label +=" ("+std::string(XmedDataObject::mapTypeOfFieldLabel[fieldseriesHandler.type])+")";
_studyEditor->setName(soFieldseries,label.c_str());
- _studyEditor->setIcon(soFieldseries,"datasource_field.png");
+ _studyEditor->setIcon(soFieldseries,tr("ICO_DATASOURCE_FIELD").toStdString().c_str());
_studyEditor->setParameterInt(soFieldseries,OBJECT_ID,fieldseriesHandler.id);
_studyEditor->setParameterBool(soFieldseries,OBJECT_IS_IN_WORKSPACE,false);
}
{
// Dialog to get the filename where the input data are read from
QStringList filter;
- filter.append(QObject::tr("MED files (*.med)"));
+ filter.append(tr("FILE_FILTER_MED"));
QString filename = SUIT_FileDlg::getFileName(_salomeModule->getApp()->desktop(),
"",
filter,
- QObject::tr("Import MED fields"),
+ tr("IMPORT_MED_FIELDS"),
true);
if ( filename.isEmpty() ) return;
QString imageFilename = dialog.getImageFilepath();
QString medFilename = dialog.getMedFilepath();
bool autoLoad = dialog.isAutoLoaded();
-
+
std::string ROOT_DIR(getenv("MED_ROOT_DIR"));
std::string command(ROOT_DIR+"/bin/salome/med/image2med.py");
command += " -i "+QS2S(imageFilename);
// Get the selected objects in the study (SObject)
SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
- for (int i=0; i<listOfSObject->size(); i++) {
+ for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soFieldseries = listOfSObject->at(i);
- // First retrieve the fieldseries id associated to this study object
+ // First retrieve the fieldseries id associated to this study object
long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,OBJECT_ID);
STDLOG("Expand the field timeseries "<<fieldseriesId);
XmedDataObject * dataObject = new XmedDataObject();
dataObject->setFieldHandler(*fieldHandler);
event->objectdata = dataObject;
- emit datasourceSignal(event);
+ emit datasourceSignal(event);
}
}
// _GBO_ Note that it works only for a single field but the
// XmedDataObject will be improved to deal with mesh, timeseries
// and single field in a futur version. We suppose here that a
- // single field has been selected.
+ // single field has been selected.
// <<<
SALOMEDS::SObject_var soField = listOfSObject->at(0);
SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() > 0 ) {
SALOMEDS::SObject_var soField = listOfSObject->at(0);
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
+ int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
// _GBO_ : the dialog should not be modal, so that we can choose a
// mesh in the browser. Then we have to emit a signal from the
// dialog.accept, connected to a slot of the DatasourceControler
int fieldId = _dlgChangeUnderlyingMesh->getFieldId();
MEDOP::FieldHandler * fieldHandler =
MEDOPFactoryClient::getDataManager()->getFieldHandler(fieldId);
-
+
// We don't modify the original field but create first a duplicate
MEDOP::FieldHandler * duplicate = MEDOPFactoryClient::getCalculator()->dup(*fieldHandler);
MEDOPFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
event->objectdata = dataObject;
emit datasourceSignal(event);
// Note that this signal is processed by the WorkspaceController
-
+
// Tag the item to prevent double import
//_studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
-
-
+
+
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Guillaume Boulant (EDF)
+// Author : Guillaume Boulant (EDF)
#include "MEDOPModule.hxx"
#include "QtHelper.hxx"
#include "MEDOPFactoryClient.hxx"
+#include <QWidget>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_FileDlg.h>
+
+enum {
+ MEDOP_MENU_ACTION_ID_IMPORT_MED = 100
+};
+
MEDOPModule::MEDOPModule() :
StandardApp_Module()
{
// This part implements the mandatory interface
// =====================================================================
//
+//=======================================================================
+// function : initialize
+// purpose :
+//=======================================================================
+void MEDOPModule::initialize( CAM_Application* app ) {
+ StandardApp_Module::initialize( app );
+
+ QWidget* aParent = application()->desktop();
+ SUIT_ResourceMgr* resMgr = dynamic_cast<SUIT_ResourceMgr*>( SUIT_Session::session()->resourceMgr() );
+
+ QPixmap aPixmap = resMgr->loadPixmap("XMED", tr("ICO_IMPORT_MED"));
+ createAction( MEDOP_MENU_ACTION_ID_IMPORT_MED, tr("IMPORT_FROM_FILE"), QIcon(aPixmap),
+ tr("IMPORT_MED_FILE"), "", (Qt::CTRL + Qt::Key_M), aParent, false,
+ this, SLOT(onImportMedFile()));
+
+ int xmedId = createMenu( tr( "MEN_FILE" ), -1, 1 );
+ createMenu( MEDOP_MENU_ACTION_ID_IMPORT_MED, xmedId, 10 );
+}
+
/*!
* Returns the engine of the XMED module, i.e. the SALOME component
* directory of the module.
*/
QString MEDOPModule::studyIconName() {
- return QString("MEDOP_small.png");
+ return tr("ICO_MEDOP_SMALL");
}
//
// Creating actions concerning the workspace
_workspaceController->createActions();
}
+
+void MEDOPModule::onImportMedFile()
+{
+ SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+ if( !app )
+ return;
+ SUIT_Desktop* desktop = app->desktop();
+
+ QStringList filter;
+ filter.append( tr( "FILE_FILTER_MED" ) );
+
+ QString anInitialPath = "";
+ if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+ anInitialPath = QDir::currentPath();
+
+ QString caption = tr( "IMPORT_FROM_FILE" );
+ QStringList filenames = SUIT_FileDlg::getOpenFileNames( desktop,
+ anInitialPath,
+ filter,
+ caption );
+
+ if ( filenames.count() <= 0 )
+ return;
+
+ for ( QStringList::ConstIterator itFile = filenames.begin(); itFile != filenames.end(); ++itFile ) {
+ QString filename = *itFile;
+ _datasourceController->addDatasource(QCHARSTAR(filename));
+ updateObjBrowser(true);
+ }
+}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Guillaume Boulant (EDF)
+// Author : Guillaume Boulant (EDF)
#ifndef _MEDOP_MODULE_HXX_
#define _MEDOP_MODULE_HXX_
public:
MEDOPModule();
+ virtual void initialize( CAM_Application* );
+
protected:
virtual Engines::EngineComponent_ptr getEngine() const;
virtual QString studyIconName();
virtual bool activateModule( SUIT_Study* theStudy );
virtual bool deactivateModule( SUIT_Study* theStudy );
+ private slots:
+ void onImportMedFile();
+
private:
DatasourceController * _datasourceController;
WorkspaceController * _workspaceController;
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+ <context>
+ <name>@default</name>
+ <message>
+ <source>ICO_IMPORT_MED</source>
+ <translation>fileimport-32.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE</source>
+ <translation>datasource.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_ADD</source>
+ <translation>datasource_add.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_CHANGE_MESH</source>
+ <translation>datasource_changeUnderlyingMesh.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_EXPAND_FIELD</source>
+ <translation>datasource_expandfield.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_FIELD</source>
+ <translation>datasource_field.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_MESH</source>
+ <translation>datasource_mesh.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_USE</source>
+ <translation>datasource_use.png</translation>
+ </message>
+ <message>
+ <source>ICO_DATASOURCE_VIEW</source>
+ <translation>datasource_view.png</translation>
+ </message>
+ <message>
+ <source>ICO_FOLDER</source>
+ <translation>folder.png</translation>
+ </message>
+ <message>
+ <source>ICO_IMAGE_ADD</source>
+ <translation>image_add.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDOP</source>
+ <translation>MEDOP.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDOP_SMALL</source>
+ <translation>MEDOP_small.png</translation>
+ </message>
+ <message>
+ <source>ICO_WORKSPACE_CLEAN</source>
+ <translation>workspace_clean.png</translation>
+ </message>
+ <message>
+ <source>ICO_WORKSPACE_SAVE</source>
+ <translation>workspace_save.png</translation>
+ </message>
+ </context>
+</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+ <context>
+ <name>DatasourceController</name>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="45"/>
+ <source>LAB_ADD_DATA_SOURCE</source>
+ <translation>Add Data Source</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="46"/>
+ <source>TIP_ADD_DATA_SOURCE</source>
+ <translation>Add a file data source (file providing med data)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="52"/>
+ <source>LAB_ADD_IMAGE_SOURCE</source>
+ <translation>Add Image Source</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="53"/>
+ <source>TIP_ADD_IMAGE_SOURCE</source>
+ <translation>Create a Data Source from an image file</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="62"/>
+ <source>LAB_EXPAND_FIELD</source>
+ <translation>Expand field timeseries</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="69"/>
+ <source>LAB_VISUALIZE</source>
+ <translation>Visualize</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="75"/>
+ <source>LAB_USE_IN_WORKSPACE</source>
+ <translation>Use in workspace</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="83"/>
+ <source>LAB_CHANGE_MESH</source>
+ <translation>Change underlying mesh</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="157"/>
+ <source>IMPORT_MED_FIELDS</source>
+ <translation>Import MED fields</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="191"/>
+ <source>OPERATION_FAILED</source>
+ <translation>Operation failed</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="192"/>
+ <source>CREATION_FAILED</source>
+ <translation>The creation of med data from the image file failed</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="283"/>
+ <source>OPERATION_NOT_ALLOWED</source>
+ <translation>Operation not allowed</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="284"/>
+ <source>FIELD_ALREADY_DEFINED</source>
+ <translation>This field is already defined in the workspace</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgAlias</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="14"/>
+ <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
+ <translation>Select an alias for the field</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="401"/>
+ <source>DEFINE_AN_ALIAS</source>
+ <translation>You can define an alias to manipulate the field in console:</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="419"/>
+ <source>ALIAS</source>
+ <translation>Alias</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="436"/>
+ <source>MSG_OPERATION_DEFINES_VARIABLE</source>
+ <translation>(this operation defines a variable named <alias> in TUI console. Enter "<alias>.help()" to see available functions, or simply "doc")</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgChangeUnderlyingMesh</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>Select a mesh in explorer:</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
+ <source>MESH_GT</source>
+ <translation>Mesh -></translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(Explorer provides a view on MED data sources (mesh and fields) referenced in data space)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
+ <source>DATA_VERIFICATION</source>
+ <translation>Data verification</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
+ <source>SELECT_MESH</source>
+ <translation>You must select a mesh in the explorer and clic the button Mesh</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgImageToMed</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="28"/>
+ <source>IMAGE_FILE</source>
+ <translation>Image file:</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="35"/>
+ <source>MED_FILE</source>
+ <translation>MED file:</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="64"/>
+ <source>SELECT_IMAGE_FILE</source>
+ <translation>Select image file</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="79"/>
+ <source>SPECIFY_MED_FILE</source>
+ <translation>Specify a MED file</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="82"/>
+ <source>LOAD_AUTOMATICALLY</source>
+ <translation>Load automatically</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgUseInWorkspace</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
+ <source>FORM</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
+ <source>PRESSURE</source>
+ <translation>Pressure:</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
+ <source>TEMPERATURE</source>
+ <translation>Temperature:</translation>
+ </message>
+ </context>
+ <context>
+ <name>GenericDialog</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/GenericDialog.ui" line="13"/>
+ <source>DIALOG</source>
+ <translation>Dialog</translation>
+ </message>
+ </context>
+ <context>
+ <name>MEDOPModule</name>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="68"/>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="157"/>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Import from File</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="69"/>
+ <source>IMPORT_MED_FILE</source>
+ <translation>Import MED file</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="72"/>
+ <source>MEN_FILE</source>
+ <translation>&File</translation>
+ </message>
+ </context>
+ <context>
+ <name>WorkspaceController</name>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="66"/>
+ <source>VISUALIZE_SCALAR_MAP</source>
+ <translation>Visualize (scalar map)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="67"/>
+ <source>USE_IN_CONSOLE</source>
+ <translation>Use (in console)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="68"/>
+ <source>EXPORT_TO_PARAVIS</source>
+ <translation>Export (to PARAVIS)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="69"/>
+ <source>SAVE_AS_MED</source>
+ <translation>Save (as MED file)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="70"/>
+ <source>REMOVE_FROM_WORKSPACE</source>
+ <translation>Remove (from workspace)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="91"/>
+ <source>LAB_SAVE_WORKSPACE</source>
+ <translation>Save workspace</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="92"/>
+ <source>TIP_SAVE_WORKSPACE</source>
+ <translation>Save the workspace (fields and meshes) in a MED file</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="97"/>
+ <source>LAB_CLEAN_WORKSPACE</source>
+ <translation>Clean workspace</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="98"/>
+ <source>TIP_CLEAN_WORKSPACE</source>
+ <translation>Clean all data in the workspace</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="271"/>
+ <source>SAVE_SELECTED_FIELDS</source>
+ <translation>Save selected fields</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="425"/>
+ <source>SAVE_WORKSPACE_DATA</source>
+ <translation>Save workspace data</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="439"/>
+ <source>NOT_IMPLEMENTED_YET</source>
+ <translation>Not implemented yet</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="440"/>
+ <source>FUNCTION_NOT_IMPLEMENTED</source>
+ <translation>This function is not implemented yet</translation>
+ </message>
+ </context>
+ <context>
+ <name>@default</name>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="151"/>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="152"/>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="75"/>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="267"/>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="420"/>
+ <source>FILE_FILTER_MED</source>
+ <translation>MED files (*.med)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="57"/>
+ <source>FILE_FILTER_PNG</source>
+ <translation>PNG image (*.png)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="58"/>
+ <source>FILE_FILTER_JPG</source>
+ <translation>JPG image (*.jpg)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="59"/>
+ <source>FILE_FILTER_PGM</source>
+ <translation>PGM image (*.jpg)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="60"/>
+ <source>FILE_FILTER_ALL</source>
+ <translation>All files (*.*)</translation>
+ </message>
+ </context>
+</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+ <context>
+ <name>DatasourceController</name>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="45"/>
+ <source>LAB_ADD_DATA_SOURCE</source>
+ <translation>Ajouter des données</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="46"/>
+ <source>TIP_ADD_DATA_SOURCE</source>
+ <translation>Ajouter un fichier de données (au format MED)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="52"/>
+ <source>LAB_ADD_IMAGE_SOURCE</source>
+ <translation>Ajouter une image</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="53"/>
+ <source>TIP_ADD_IMAGE_SOURCE</source>
+ <translation>Créer des données à partir d'un fichier image</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="62"/>
+ <source>LAB_EXPAND_FIELD</source>
+ <translation>Étendre les series temporelles du champ</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="69"/>
+ <source>LAB_VISUALIZE</source>
+ <translation>Visualiser</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="75"/>
+ <source>LAB_USE_IN_WORKSPACE</source>
+ <translation>Utiliser dans l'espace de travail</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="83"/>
+ <source>LAB_CHANGE_MESH</source>
+ <translation>Changer le maillage sous-jacent</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="157"/>
+ <source>IMPORT_MED_FIELDS</source>
+ <translation>Importer des champs (format MED)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="191"/>
+ <source>OPERATION_FAILED</source>
+ <translation>L'opération a échoué</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="192"/>
+ <source>CREATION_FAILED</source>
+ <translation>La création des données MED à partir d'un fichier image a échoué</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="283"/>
+ <source>OPERATION_NOT_ALLOWED</source>
+ <translation>Opération non autorisée</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="284"/>
+ <source>FIELD_ALREADY_DEFINED</source>
+ <translation>Ce champ est déjà défini dans l'espace de travail</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgAlias</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="14"/>
+ <source>SELECT_AN_ALIAS_FOR_THE_FIELD</source>
+ <translation>Selectionner un alias pour ce champ</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="401"/>
+ <source>DEFINE_AN_ALIAS</source>
+ <translation>Vous pouvez définir un alias pour manipuler le champs dans la console:</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="419"/>
+ <source>ALIAS</source>
+ <translation>Alias</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgAlias.ui" line="436"/>
+ <source>MSG_OPERATION_DEFINES_VARIABLE</source>
+ <translation>(cette opération définit une variable nommée <alias> dans la console texte. Tapez "<alias>.help()" pour voir les fonctions disponibles, ou simplement "doc")</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgChangeUnderlyingMesh</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="391"/>
+ <source>SELECT_MESH</source>
+ <translation>Selectionner un maillage dans l'explorateur:</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="403"/>
+ <source>MESH_GT</source>
+ <translation>Maillage -></translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.ui" line="420"/>
+ <source>MSG_EXPLORER</source>
+ <translation>(L'explorateur fournit une vue des données MED (maillage et champs) référencées dans l'espace des données)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="35"/>
+ <source>DATA_VERIFICATION</source>
+ <translation>Vérification des données</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgChangeUnderlyingMesh.cxx" line="36"/>
+ <source>SELECT_MESH</source>
+ <translation>Vous devez sélectionner un maillage dans l'explorateur et cliquer sur le bouton Maillage</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgImageToMed</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="14"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="28"/>
+ <source>IMAGE_FILE</source>
+ <translation>Fichier image :</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="35"/>
+ <source>MED_FILE</source>
+ <translation>Fichier MED :</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="64"/>
+ <source>SELECT_IMAGE_FILE</source>
+ <translation>Selectionner un fichier image</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="79"/>
+ <source>SPECIFY_MED_FILE</source>
+ <translation>Spécifier un fichier MED</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.ui" line="82"/>
+ <source>LOAD_AUTOMATICALLY</source>
+ <translation>Charger automatiquement</translation>
+ </message>
+ </context>
+ <context>
+ <name>DlgUseInWorkspace</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="13"/>
+ <source>FORM</source>
+ <translation>Formulaire</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="49"/>
+ <source>PRESSURE</source>
+ <translation>Pression :</translation>
+ </message>
+ <message utf8="true">
+ <location filename="MEDOP/gui/dialogs/DlgUseInWorkspace.ui" line="56"/>
+ <source>TEMPERATURE</source>
+ <translation>Température :</translation>
+ </message>
+ </context>
+ <context>
+ <name>GenericDialog</name>
+ <message>
+ <location filename="MEDOP/gui/dialogs/GenericDialog.ui" line="13"/>
+ <source>DIALOG</source>
+ <translation>Dialogue</translation>
+ </message>
+ </context>
+ <context>
+ <name>MEDOPModule</name>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="68"/>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="157"/>
+ <source>IMPORT_FROM_FILE</source>
+ <translation>Importer depuis un fichier</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="69"/>
+ <source>IMPORT_MED_FILE</source>
+ <translation>Importer un fichier MED</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="72"/>
+ <source>MEN_FILE</source>
+ <translation>&Fichier</translation>
+ </message>
+ </context>
+ <context>
+ <name>WorkspaceController</name>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="66"/>
+ <source>VISUALIZE_SCALAR_MAP</source>
+ <translation>Visualiser (carte scalaire)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="67"/>
+ <source>USE_IN_CONSOLE</source>
+ <translation>Utiliser (dans la console)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="68"/>
+ <source>EXPORT_TO_PARAVIS</source>
+ <translation>Exporter (vers PARAVIS)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="69"/>
+ <source>SAVE_AS_MED</source>
+ <translation>Sauvegarder (dans un fichier MED)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="70"/>
+ <source>REMOVE_FROM_WORKSPACE</source>
+ <translation>Supprimer (de l'espace de travail)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="91"/>
+ <source>LAB_SAVE_WORKSPACE</source>
+ <translation>Sauvegarder l'espace de travail</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="92"/>
+ <source>TIP_SAVE_WORKSPACE</source>
+ <translation>Sauvegarder l'espace de travail (champs et maillages) dans un fichier MED</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="97"/>
+ <source>LAB_CLEAN_WORKSPACE</source>
+ <translation>Nettoyer l'espace de travail</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="98"/>
+ <source>TIP_CLEAN_WORKSPACE</source>
+ <translation>Effacer toute les données de l'espace de travail</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="271"/>
+ <source>SAVE_SELECTED_FIELDS</source>
+ <translation>Sauvegarder les champs sélectionnés</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="425"/>
+ <source>SAVE_WORKSPACE_DATA</source>
+ <translation>Sauvegarder les données de l'espace de travail</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="439"/>
+ <source>NOT_IMPLEMENTED_YET</source>
+ <translation>Non implémenté</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="440"/>
+ <source>FUNCTION_NOT_IMPLEMENTED</source>
+ <translation>Cette function n'est pas encore implémentée</translation>
+ </message>
+ </context>
+ <context>
+ <name>@default</name>
+ <message>
+ <location filename="MEDOP/gui/MEDOPModule.cxx" line="151"/>
+ <location filename="MEDOP/gui/DatasourceController.cxx" line="152"/>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="75"/>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="267"/>
+ <location filename="MEDOP/gui/WorkspaceController.cxx" line="420"/>
+ <source>FILE_FILTER_MED</source>
+ <translation>Fichiers MED (*.med)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="57"/>
+ <source>FILE_FILTER_PNG</source>
+ <translation>Image PNG (*.png)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="58"/>
+ <source>FILE_FILTER_JPG</source>
+ <translation>Image JPG (*.jpg)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="59"/>
+ <source>FILE_FILTER_PGM</source>
+ <translation>Image PGM (*.jpg)</translation>
+ </message>
+ <message>
+ <location filename="MEDOP/gui/dialogs/DlgImageToMed.cxx" line="60"/>
+ <source>FILE_FILTER_ALL</source>
+ <translation>Tous les fichiers (*.*)</translation>
+ </message>
+ </context>
+</TS>
%.qm: %.ts
$(LRELEASE) $< -qm $@
-EXTRA_DIST+=$(MOC_FILES:%_moc.cxx=%.hxx) $(nodist_salomeres_DATA:%.qm=%.ts) test
+EXTRA_DIST+=$(MOC_FILES:%_moc.cxx=%.hxx) $(dist_salomeres_DATA:%.qm=%.ts) test
mostlyclean-local:
rm -f @builddir@/*_moc.cxx
../cmp/libMEDOPFactoryEngine.la
if WITH_MEDMEMGUI
-libMEDOPGUI_la_CPPFLAGS += "-D__WITH_MEDMEMGUI__" -I$(top_srcdir)/src/MEDGUI
-libMEDOPGUI_la_LIBADD += $(top_builddir)/src/MEDGUI/libMEDGUI.la
+ libMEDOPGUI_la_CPPFLAGS += "-D__WITH_MEDMEMGUI__" -I$(top_srcdir)/src/MEDGUI
+ libMEDOPGUI_la_LIBADD += $(top_builddir)/src/MEDGUI/libMEDGUI.la
endif
# resources files
-nodist_salomeres_DATA = \
- MEDOP_msg_en.qm \
- MEDOP_msg_fr.qm
+dist_salomeres_DATA = \
+ MED_images.qm \
+ MED_msg_en.qm \
+ MED_msg_fr.qm
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// Author : Guillaume Boulant (EDF)
+// Author : Guillaume Boulant (EDF)
#include "WorkspaceController.hxx"
#include "QtHelper.hxx"
// console that could retrieve this IOR using the
// getEventListenerIOR() function of the MEDDataManager.
SalomeApp_Application * salomeApp = salomeModule->getApp();
- const char * medEventListenerIOR =
+ const char * medEventListenerIOR =
salomeApp->orb()->object_to_string(medEventListenerServant);
MEDOPFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR);
// Customize the treeview rendering the datamodel with specific
// action for the popup menu
this->getDataTreeView()->clearActions();
- _actionIds.display = this->getDataTreeView()->addAction(QObject::tr("Visualiser (une carte scalaire)"));
- _actionIds.useInTui = this->getDataTreeView()->addAction(QObject::tr("Utiliser (dans la console)"));
- _actionIds.exportToPv = this->getDataTreeView()->addAction(QObject::tr("Exporter (vers PARAVIS)"));
- _actionIds.save = this->getDataTreeView()->addAction(QObject::tr("Sauvegarder (dans un fichier med)"));
- _actionIds.remove = this->getDataTreeView()->addAction(QObject::tr("Supprimer (de lespace de travail)"));
-
+ _actionIds.display = this->getDataTreeView()->addAction(tr("VISUALIZE_SCALAR_MAP"));
+ _actionIds.useInTui = this->getDataTreeView()->addAction(tr("USE_IN_CONSOLE"));
+ _actionIds.exportToPv = this->getDataTreeView()->addAction(tr("EXPORT_TO_PARAVIS"));
+ _actionIds.save = this->getDataTreeView()->addAction(tr("SAVE_AS_MED"));
+ _actionIds.remove = this->getDataTreeView()->addAction(tr("REMOVE_FROM_WORKSPACE"));
+
// -------------------------------------------------------------
// Initialize the python console. Note that this must be done at
// last because the setup will try to initiate a connection to the
}
WorkspaceController::~WorkspaceController() {
- MEDEventListener_i::release();
+ MEDEventListener_i::release();
}
/**
* This creates the GUI actions for driving the Workspace. The
* WorkspaceController creates itself this actions and implements the
- * connected slots.
+ * connected slots.
*/
void WorkspaceController::createActions() {
- QString label = QString("Save workspace");
- QString tooltip = QString("Save the workspace (fields and meshes) in a med file");
- QString icon = QString("workspace_save.png");
+ QString label = tr("LAB_SAVE_WORKSPACE");
+ QString tooltip = tr("TIP_SAVE_WORKSPACE");
+ QString icon = tr("ICO_WORKSPACE_SAVE");
int actionId = _salomeModule->createStandardAction(label,this,SLOT(OnSaveWorkspace()),icon,tooltip);
_salomeModule->addActionInToolbar(actionId);
- label = QString("Clean workspace");
- tooltip = QString("Clean all data in the workspace");
- icon = QString("workspace_clean.png");
+ label = tr("LAB_CLEAN_WORKSPACE");
+ tooltip = tr("TIP_CLEAN_WORKSPACE");
+ icon = tr("ICO_WORKSPACE_CLEAN");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnCleanWorkspace()),icon,tooltip);
_salomeModule->addActionInToolbar(actionId);
}
// to this item (iteNameId is a TreeView id, Qt stuff only).
XmedDataObject * dataObject =
(XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
-
+
if ( dataObject == NULL ) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
return;
}
-
+
// Then, we can request this data object to obtain the associated
// FieldHandler.
MEDOP::FieldHandler * fieldHandler = dataObject->getFieldHandler();
STDLOG("Field: mesh="<<fieldHandler->meshname<<" name="<<fieldHandler->fieldname);
-
- // Finally, we can import the field
+
+ // Finally, we can import the field
bool askForOptions = true;
_importFieldIntoConsole(fieldHandler, askForOptions);
}
* means to define a field proxy variable in the python context to
* manipulate the field. We can raise a gui to specify some import
* options or simply specify the alias (i.e. the name of the python
- * variable).
+ * variable).
*/
void WorkspaceController::_importFieldIntoConsole(MEDOP::FieldHandler * fieldHandler,
bool askForOptions,
// We can propose to the user to specify some additionnal
// informations concerning what must be imported.
- //
+ //
// In this version, we just ask the alias the field will be
// manipulated with. The default alias is the field name. This alias
// should be asked to the user to get a short name to manipulate.
STDLOG("No data model associated to this tree view");
return;
}
-
+
if ( event->type == MEDOP::EVENT_ADDNEW_FIELD ) {
STDLOG("add new field");
MEDOP::FieldHandler * fieldHandler =
MEDOPFactoryClient::getDataManager()->getFieldHandler(event->fieldid);
-
+
XmedDataObject * dataObject = (XmedDataObject *)dataModel->newDataObject();
dataObject->setFieldHandler(*fieldHandler);
this->getDataTreeModel()->addData(dataObject);
/*!
* This function save a list of fields in a med file. The med file
- * name is requested to the user using a file chooser dialog box
+ * name is requested to the user using a file chooser dialog box
*/
void WorkspaceController::_saveItemList(QStringList itemNameIdList) {
XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
delete dataProcessor;
QStringList filter;
- filter.append(QObject::tr("MED files (*.med)"));
+ filter.append(tr("FILE_FILTER_MED"));
QString filename = SUIT_FileDlg::getFileName(_salomeModule->getApp()->desktop(),
"",
filter,
- QObject::tr("Save selected fields"),
+ tr("SAVE_SELECTED_FIELDS"),
false);
if ( filename.isEmpty() ) return;
* This function export the list of specified field item to PARAVIS
* module. This consists in create a med file gathering the selected
* items, then to import this file in PARAVIS, and finally to create a
- * scalar map of the first item to start the job.
+ * scalar map of the first item to start the job.
*/
void WorkspaceController::_exportItemList(QStringList itemNameIdList) {
XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
* This function sends a request to the SALOME data visualisation
* (module VISU or PARAVIS) for displaying a scalar map of the fields
* associated to the model items in the specified list.
- *
+ *
*/
void WorkspaceController::_viewItemList(QStringList itemNameIdList) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
return;
}
-
+
// Then, we can request this data object to obtain the associated
// FieldHandler.
MEDOP::FieldHandler * fieldHandler = dataObject->getFieldHandler();
STDLOG("No data model associated to this tree view");
return;
}
-
+
// >>>
// __GBO__ To know what to do we should test the type, because the
// object could be a mesh, a timeseries or a single field. We test
// here the case of a single field. Moreover, there could have
// options such that "change the underlying mesh".
// <<<
-
+
XmedDataObject * dataObject = event->objectdata;
if ( event->eventtype == DatasourceEvent::EVENT_IMPORT_OBJECT ) {
// Dialog to get the filename where the workspace must be saved into
QStringList filter;
- filter.append(QObject::tr("MED files (*.med)"));
+ filter.append(tr("FILE_FILTER_MED"));
QString filename = SUIT_FileDlg::getFileName(_salomeModule->getApp()->desktop(),
"",
filter,
- QObject::tr("Save workspace data"),
+ tr("SAVE_WORKSPACE_DATA"),
false);
if ( filename.isEmpty() ) return;
#include <QMessageBox>
void WorkspaceController::OnCleanWorkspace() {
QMessageBox::warning(_salomeModule->getApp()->desktop(),
- tr("Not implemented yet"),
- tr("This function is not implemented yet"));
+ tr("NOT_IMPLEMENTED_YET"),
+ tr("FUNCTION_NOT_IMPLEMENTED"));
}
</rect>
</property>
<property name="windowTitle">
- <string>Sélection d'un alias pour le champ</string>
+ <string>SELECT_AN_ALIAS_FOR_THE_FIELD</string>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
</font>
</property>
<property name="text">
- <string>Vous pouvez définir un alias pour manipuler le champ dans la console:</string>
+ <string>DEFINE_AN_ALIAS</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<item>
<widget class="QLabel" name="lblAlias">
<property name="text">
- <string>Alias</string>
+ <string>ALIAS</string>
</property>
</widget>
</item>
</font>
</property>
<property name="text">
- <string>(cette operation définit une variable de nom <alias> dans la console TUI. Tapez "<alias>.help()" pour voir les fonctions à disposition, ou tou simplement "doc")</string>
+ <string>MSG_OPERATION_DEFINES_VARIABLE</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</rect>
</property>
<property name="windowTitle">
- <string>Form</string>
+ <string>FORM</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
</font>
</property>
<property name="text">
- <string>Sélectionnez un maillage dans l'explorateur:</string>
+ <string>SELECT_MESH</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<item>
<widget class="QPushButton" name="btnSelectMesh">
<property name="text">
- <string>Maillage -></string>
+ <string>MESH_GT</string>
</property>
</widget>
</item>
</font>
</property>
<property name="text">
- <string>(L'explorateur donne une vue des sources de données med (maillage et champs) référencés dans l'espace de données)</string>
+ <string>MSG_EXPLORER</string>
</property>
<property name="wordWrap">
<bool>true</bool>
DlgImageToMed::DlgImageToMed(QDialog *parent) : GenericDialog(parent)
{
ui.setupUi(this->getPanel());
-
+
QString moduleName = "MED";
- QPixmap aPixmap = GUI::getResourcesManager()->loadPixmap( moduleName, "folder.png" );
+ QPixmap aPixmap = GUI::getResourcesManager()->loadPixmap( moduleName, tr("ICO_FOLDER") );
QIcon icon(aPixmap);
ui.btnImageFileChooser->setIcon(icon);
ui.btnMedFileChooser->setIcon(icon);
ui.chkAutoLoad->setCheckState(Qt::Checked);
}
else {
- ui.chkAutoLoad->setCheckState(Qt::Unchecked);
+ ui.chkAutoLoad->setCheckState(Qt::Unchecked);
}
}
void DlgImageToMed::OnBtnImageFileChooser() {
QStringList filter;
- filter.append(QObject::tr("Image files (*.png)"));
- filter.append(QObject::tr("Image files (*.jpg)"));
- filter.append(QObject::tr("Image files (*.pgm)"));
- filter.append(QObject::tr("All files (*.*)"));
+ filter.append(tr("FILE_FILTER_PNG"));
+ filter.append(tr("FILE_FILTER_JPG"));
+ filter.append(tr("FILE_FILTER_PGM"));
+ filter.append(tr("FILE_FILTER_ALL"));
QString filename = SUIT_FileDlg::getFileName(ui.btnImageFileChooser,
"",
filter,
- QObject::tr("Select image file"),
+ tr("SELECT_IMAGE_FILE"),
true);
if ( filename.isEmpty() ) return;
ui.txtImageFile->setText(filename);
void DlgImageToMed::OnBtnMedFileChooser() {
QStringList filter;
- filter.append(QObject::tr("MED files (*.med)"));
+ filter.append(tr("FILE_FILTER_MED"));
QString filename = SUIT_FileDlg::getFileName(ui.btnMedFileChooser,
"",
filter,
- QObject::tr("Specify a MED file"),
+ tr("SPECIFY_MED_FILE"),
true);
if ( filename.isEmpty() ) return;
ui.txtMedFile->setText(filename);
</rect>
</property>
<property name="windowTitle">
- <string>Form</string>
+ <string>FORM</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<item>
<widget class="QLabel" name="lblImageFile">
<property name="text">
- <string>Fichier Image:</string>
+ <string>IMAGE_FILE</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblMedFile">
<property name="text">
- <string>Fichier MED:</string>
+ <string>MED_FILE</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkAutoLoad">
<property name="text">
- <string>Charger automatiquement</string>
+ <string>LOAD_AUTOMATICALLY</string>
</property>
</widget>
</item>
</rect>
</property>
<property name="windowTitle" >
- <string>Form</string>
+ <string>FORM</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
- <string>Pression :</string>
+ <string>PRESSURE</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
- <string>Température :</string>
+ <string>TEMPERATURE</string>
</property>
</widget>
</item>
</rect>
</property>
<property name="windowTitle" >
- <string>Dialog</string>
+ <string>DIALOG</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >