mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
Plugins manager for SMESH
This commit is contained in:
parent
36cce06adb
commit
275711c4a7
@ -23,6 +23,8 @@
|
||||
// File : SMESHGUI.cxx
|
||||
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||
|
||||
#include <Standard_math.hxx> // E.A. must be included before Python.h to fix compilation on windows
|
||||
#include "Python.h"
|
||||
// SMESH includes
|
||||
#include "SMESHGUI.h"
|
||||
#include "SMESHGUI_AddMeshElementDlg.h"
|
||||
@ -3709,6 +3711,21 @@ bool SMESHGUI::activateModule( SUIT_Study* study )
|
||||
setMenuShown( true );
|
||||
setToolShown( true );
|
||||
|
||||
// import Python module that manages SMESH plugins (need to be here because SalomePyQt API uses active module)
|
||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||
PyObject* pluginsmanager=PyImport_ImportModule((char*)"salome_pluginsmanager");
|
||||
if(pluginsmanager==NULL)
|
||||
PyErr_Print();
|
||||
else
|
||||
{
|
||||
PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"smesh",tr("MEN_MESH").toStdString().c_str(),tr("SMESH_PLUGINS_OTHER").toStdString().c_str());
|
||||
if(result==NULL)
|
||||
PyErr_Print();
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
PyGILState_Release(gstate);
|
||||
// end of GEOM plugins loading
|
||||
|
||||
// Reset actions accelerator keys
|
||||
action(111)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B)); // Import DAT
|
||||
action(112)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_U)); // Import UNV
|
||||
|
@ -3228,6 +3228,10 @@ Input value precision can be adjusted using
|
||||
<source>NB_NODES_REMOVED</source>
|
||||
<translation>Removed %1 node(s).</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_PLUGINS_OTHER</source>
|
||||
<translation>SMESH plugins</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI</name>
|
||||
|
@ -3225,6 +3225,10 @@ avec le paramètre '%1' des préférences du module Mesh.</translation
|
||||
<source>NB_NODES_REMOVED</source>
|
||||
<translation>%1 nœud(s) supprimés.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_PLUGINS_OTHER</source>
|
||||
<translation>Extensions SMESH</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI</name>
|
||||
|
Loading…
Reference in New Issue
Block a user