X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI.cxx;h=9eb0ab0dab43fb2a578ceb24ebba37d06554d64c;hp=61ff14fb5ed3a71a07d55fd5985bfe99860e2851;hb=e14c11e2d75d4cc48a234c4cf238bbfe12f49fca;hpb=a671072fe6bdbda75fabc414287ff0c746dda2a7 diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 61ff14fb5..9eb0ab0da 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -92,14 +92,14 @@ #include "SMESHGUI_Utils.h" #include "SMESHGUI_VTKUtils.h" -#include +#include "SMESH_version.h" #include "SMESH_ControlsDef.hxx" -#include -#include -#include -#include -#include +#include "SMESH_Actor.h" +#include "SMESH_ActorUtils.h" +#include "SMESH_Client.hxx" +#include "SMESH_ScalarBarActor.h" +#include "SMESH_TypeFilter.hxx" // SALOME GUI includes #include @@ -168,6 +168,7 @@ #include #include #include +#include "utilities.h" // OCCT includes #include @@ -3765,7 +3766,7 @@ void SMESHGUI::initialize( CAM_Application* app ) // ----- create actions -------------- //createSMESHAction( SMESHOp::OpImportDAT, "IMPORT_DAT", "", (Qt::CTRL+Qt::Key_B) ); - createSMESHAction( SMESHOp::OpImportUNV, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_U) ); + createSMESHAction( SMESHOp::OpImportUNV, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_I) ); createSMESHAction( SMESHOp::OpImportMED, "IMPORT_MED", "", (Qt::CTRL+Qt::Key_M) ); //createSMESHAction( 114, "NUM" ); createSMESHAction( SMESHOp::OpImportSTL, "IMPORT_STL" ); @@ -3802,8 +3803,8 @@ void SMESHGUI::initialize( CAM_Application* app ) createSMESHAction( SMESHOp::OpCopyMesh, "COPY_MESH", "ICON_COPY_MESH" ); createSMESHAction( SMESHOp::OpCompute, "COMPUTE", "ICON_COMPUTE" ); createSMESHAction( SMESHOp::OpPreCompute, "PRECOMPUTE", "ICON_PRECOMPUTE" ); - createSMESHAction( SMESHOp::OpEvaluate, "EVALUATE", "ICON_COMPUTE" ); - createSMESHAction( SMESHOp::OpMeshOrder, "MESH_ORDER", "ICON_COMPUTE" ); + createSMESHAction( SMESHOp::OpEvaluate, "EVALUATE", "ICON_EVALUATE" ); + createSMESHAction( SMESHOp::OpMeshOrder, "MESH_ORDER", "ICON_MESH_ORDER"); createSMESHAction( SMESHOp::OpCreateGroup, "CREATE_GROUP", "ICON_CREATE_GROUP" ); createSMESHAction( SMESHOp::OpCreateGeometryGroup, "CREATE_GEO_GROUP", "ICON_CREATE_GEO_GROUP" ); createSMESHAction( SMESHOp::OpConstructGroup, "CONSTRUCT_GROUP", "ICON_CONSTRUCT_GROUP" ); @@ -4734,10 +4735,6 @@ bool SMESHGUI::activateModule( SUIT_Study* study ) // end of SMESH plugins loading // Reset actions accelerator keys - //action(SMESHOp::OpImportDAT)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B)); - action(SMESHOp::OpImportUNV)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_U)); - action(SMESHOp::OpImportMED)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M)); - action(SMESHOp::OpDelete)->setEnabled(true); // Delete: Key_Delete // 0020210. Make SMESH_Gen update meshes at switching GEOM->SMESH @@ -4769,10 +4766,6 @@ bool SMESHGUI::deactivateModule( SUIT_Study* study ) EmitSignalCloseAllDialogs(); // Unset actions accelerator keys - //action(SMESHOp::OpImportDAT)->setShortcut(QKeySequence()); - action(SMESHOp::OpImportUNV)->setShortcut(QKeySequence()); - action(SMESHOp::OpImportMED)->setShortcut(QKeySequence()); - action(SMESHOp::OpDelete)->setEnabled(false); // Delete: Key_Delete return SalomeApp_Module::deactivateModule( study ); @@ -4829,7 +4822,7 @@ void SMESHGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& ti _PTR(Study) study = appStudy->studyDS(); _PTR(SObject) obj = study->FindObjectID( io->getEntry() ); if ( obj ) { - QString aName = QString( QString::fromUtf8(obj->GetName().c_str()) ); + QString aName = QString( SMESH::fromUtf8(obj->GetName()) ); while ( aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of Popup aName.remove( (aName.length() - 1), 1 ); title = aName; @@ -4937,7 +4930,7 @@ void SMESHGUI::createPreferences() setPreferenceProperty( doubleNodesTol, "max", 1000000.0 ); setPreferenceProperty( doubleNodesTol, "step", 0.0000001 ); - int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE" ), genTab ); + int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab ); setPreferenceProperty( dispgroup, "columns", 2 ); int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" ); QStringList modes; @@ -4953,7 +4946,7 @@ void SMESHGUI::createPreferences() setPreferenceProperty( dispmode, "strings", modes ); setPreferenceProperty( dispmode, "indexes", indices ); - int arcgroup = addPreference( tr( "QUADRATIC_REPRESENT_MODE" ), genTab ); + int arcgroup = addPreference( tr( "QUADRATIC_REPRESENT_MODE_GROUP" ), genTab ); setPreferenceProperty( arcgroup, "columns", 2 ); int quadraticmode = addPreference( tr( "QUADRATIC_REPRESENT_MODE" ), arcgroup, LightApp_Preferences::Selector, "SMESH", "quadratic_mode" ); QStringList quadraticModes; @@ -6809,7 +6802,7 @@ void SMESHGUI::message( const QString& msg ) _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().constData() ); QString name; if ( obj ) - name = QString::fromUtf8(obj->GetName().c_str()); + name = SMESH::fromUtf8(obj->GetName()); if ( name.isEmpty() ) return;