Lines 17-23
Link Here
|
17 |
// License along with this library; if not, write to the Free Software |
17 |
// License along with this library; if not, write to the Free Software |
18 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
// |
19 |
// |
20 |
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com |
20 |
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com |
21 |
// |
21 |
// |
22 |
// |
22 |
// |
23 |
// |
23 |
// |
Lines 96-102
Link Here
|
96 |
|
96 |
|
97 |
//======================================================================= |
97 |
//======================================================================= |
98 |
// function : ClientSObjectToObject |
98 |
// function : ClientSObjectToObject |
99 |
// purpose : |
99 |
// purpose : |
100 |
//======================================================================= |
100 |
//======================================================================= |
101 |
CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject) |
101 |
CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject) |
102 |
{ |
102 |
{ |
Lines 116-122
Link Here
|
116 |
|
116 |
|
117 |
//======================================================================= |
117 |
//======================================================================= |
118 |
// function : ClientStudyToStudy |
118 |
// function : ClientStudyToStudy |
119 |
// purpose : |
119 |
// purpose : |
120 |
//======================================================================= |
120 |
//======================================================================= |
121 |
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy) |
121 |
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy) |
122 |
{ |
122 |
{ |
Lines 171-182
Link Here
|
171 |
SalomeApp_Module( "GEOM" ) |
171 |
SalomeApp_Module( "GEOM" ) |
172 |
{ |
172 |
{ |
173 |
if ( CORBA::is_nil( myComponentGeom ) ) |
173 |
if ( CORBA::is_nil( myComponentGeom ) ) |
174 |
{ |
174 |
{ |
175 |
SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() ); |
175 |
SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() ); |
176 |
Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" ); |
176 |
Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" ); |
177 |
myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); |
177 |
myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); |
178 |
} |
178 |
} |
179 |
|
179 |
|
180 |
myState = -1; |
180 |
myState = -1; |
181 |
myActiveDialogBox = 0; |
181 |
myActiveDialogBox = 0; |
182 |
myFatherior = ""; |
182 |
myFatherior = ""; |
Lines 350-356
Link Here
|
350 |
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); |
350 |
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); |
351 |
// if current viewframe is not of OCC and not of VTK type - return immediately |
351 |
// if current viewframe is not of OCC and not of VTK type - return immediately |
352 |
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example) |
352 |
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example) |
353 |
bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); |
353 |
bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); |
354 |
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand ) |
354 |
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand ) |
355 |
return; |
355 |
return; |
356 |
|
356 |
|
Lines 486-492
Link Here
|
486 |
else if( id == 503 || // MENU OPERATION - PARTITION |
486 |
else if( id == 503 || // MENU OPERATION - PARTITION |
487 |
id == 504 || // MENU OPERATION - ARCHIMEDE |
487 |
id == 504 || // MENU OPERATION - ARCHIMEDE |
488 |
id == 505 || // MENU OPERATION - FILLET |
488 |
id == 505 || // MENU OPERATION - FILLET |
489 |
id == 506 || // MENU OPERATION - CHAMFER |
489 |
id == 506 || // MENU OPERATION - CHAMFER |
490 |
id == 507 ) { // MENU OPERATION - CLIPPING RANGE |
490 |
id == 507 ) { // MENU OPERATION - CLIPPING RANGE |
491 |
#ifndef WNT |
491 |
#ifndef WNT |
492 |
library = getLibrary( "libOperationGUI.so" ); |
492 |
library = getLibrary( "libOperationGUI.so" ); |
Lines 549-557
Link Here
|
549 |
} |
549 |
} |
550 |
|
550 |
|
551 |
// call method of corresponding GUI library |
551 |
// call method of corresponding GUI library |
552 |
if ( library ) |
552 |
if ( library ) |
553 |
library->OnGUIEvent( id, desk ); |
553 |
library->OnGUIEvent( id, desk ); |
554 |
else |
554 |
else |
555 |
SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) ); |
555 |
SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) ); |
556 |
} |
556 |
} |
557 |
|
557 |
|
Lines 578-584
Link Here
|
578 |
// purpose : Manages mouse move events [static] |
578 |
// purpose : Manages mouse move events [static] |
579 |
//================================================================================= |
579 |
//================================================================================= |
580 |
void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe ) |
580 |
void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe ) |
581 |
{ |
581 |
{ |
582 |
GUIMap::Iterator it; |
582 |
GUIMap::Iterator it; |
583 |
bool bOk = true; |
583 |
bool bOk = true; |
584 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) { |
584 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) { |
Lines 637-643
Link Here
|
637 |
{ |
637 |
{ |
638 |
QMenuBar* Mb = parent->getMainMenuBar(); |
638 |
QMenuBar* Mb = parent->getMainMenuBar(); |
639 |
SUIT_Study* ActiveStudy = application()->activeStudy(); |
639 |
SUIT_Study* ActiveStudy = application()->activeStudy(); |
640 |
|
640 |
|
641 |
// Wireframe or Shading |
641 |
// Wireframe or Shading |
642 |
int DisplayMode = 0; |
642 |
int DisplayMode = 0; |
643 |
SUIT_ViewWindow* window = application()->desktop()->activeWindow(); |
643 |
SUIT_ViewWindow* window = application()->desktop()->activeWindow(); |
Lines 671-686
Link Here
|
671 |
// if(!AddInStudy.isEmpty()) |
671 |
// if(!AddInStudy.isEmpty()) |
672 |
// Settings_AddInStudy = AddInStudy.toInt(); |
672 |
// Settings_AddInStudy = AddInStudy.toInt(); |
673 |
// else |
673 |
// else |
674 |
|
674 |
|
675 |
Settings_AddInStudy = 1; |
675 |
Settings_AddInStudy = 1; |
676 |
Mb->setItemChecked(411, Settings_AddInStudy); |
676 |
Mb->setItemChecked(411, Settings_AddInStudy); |
677 |
|
677 |
|
678 |
// step value |
678 |
// step value |
679 |
QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); |
679 |
QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); |
680 |
if(S.isEmpty()) |
680 |
if(S.isEmpty()) |
681 |
QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100"); |
681 |
QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100"); |
682 |
|
682 |
|
683 |
// isos |
683 |
// isos |
684 |
int count = ActiveStudy->getStudyFramesCount(); |
684 |
int count = ActiveStudy->getStudyFramesCount(); |
685 |
for(int i = 0; i < count; i++) { |
685 |
for(int i = 0; i < count; i++) { |
686 |
if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) { |
686 |
if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) { |
Lines 704-725
Link Here
|
704 |
GUIMap::Iterator it; |
704 |
GUIMap::Iterator it; |
705 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) |
705 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) |
706 |
bOk = bOk && it.data()->SetSettings( parent ); |
706 |
bOk = bOk && it.data()->SetSettings( parent ); |
707 |
|
707 |
|
708 |
// MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) |
708 |
// MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) |
709 |
if (getenv( "GEOM_CLIPPING" ) == NULL) |
709 |
if (getenv( "GEOM_CLIPPING" ) == NULL) |
710 |
{ |
710 |
{ |
711 |
QMenuItem* mi = Mb->findItem(50); |
711 |
QMenuItem* mi = Mb->findItem(50); |
712 |
if (mi && mi->popup()) |
712 |
if (mi && mi->popup()) |
713 |
mi->popup()->removeItem(507); |
713 |
mi->popup()->removeItem(507); |
714 |
} |
714 |
} |
715 |
|
715 |
|
716 |
return bOk; |
716 |
return bOk; |
717 |
} |
717 |
} |
718 |
*/ |
718 |
*/ |
719 |
|
719 |
|
720 |
//======================================================================= |
720 |
//======================================================================= |
721 |
// function : createGeomAction |
721 |
// function : createGeomAction |
722 |
// purpose : |
722 |
// purpose : |
723 |
//======================================================================= |
723 |
//======================================================================= |
724 |
void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) |
724 |
void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) |
725 |
{ |
725 |
{ |
Lines 727-733
Link Here
|
727 |
QWidget* parent = application()->desktop(); |
727 |
QWidget* parent = application()->desktop(); |
728 |
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); |
728 |
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); |
729 |
QPixmap pix; |
729 |
QPixmap pix; |
730 |
if ( icon_id.length() ) |
730 |
if ( icon_id.length() ) |
731 |
pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) ); |
731 |
pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) ); |
732 |
else |
732 |
else |
733 |
pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false ); |
733 |
pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false ); |
Lines 831-837
Link Here
|
831 |
createGeomAction( 609, "CHECK_FREE_BNDS" ); |
831 |
createGeomAction( 609, "CHECK_FREE_BNDS" ); |
832 |
createGeomAction( 610, "CHECK_FREE_FACES" ); |
832 |
createGeomAction( 610, "CHECK_FREE_FACES" ); |
833 |
createGeomAction( 611, "CHANGE_ORIENTATION" ); |
833 |
createGeomAction( 611, "CHANGE_ORIENTATION" ); |
834 |
|
834 |
|
835 |
createGeomAction( 708, "POINT_COORDS" ); |
835 |
createGeomAction( 708, "POINT_COORDS" ); |
836 |
createGeomAction( 701, "BASIC_PROPS" ); |
836 |
createGeomAction( 701, "BASIC_PROPS" ); |
837 |
createGeomAction( 702, "MASS_CENTER" ); |
837 |
createGeomAction( 702, "MASS_CENTER" ); |
Lines 845-851
Link Here
|
845 |
createGeomAction( 7072, "CHECK_COMPOUND" ); |
845 |
createGeomAction( 7072, "CHECK_COMPOUND" ); |
846 |
|
846 |
|
847 |
createGeomAction( 5103, "CHECK_GEOMETRY" ); |
847 |
createGeomAction( 5103, "CHECK_GEOMETRY" ); |
848 |
|
848 |
|
849 |
createGeomAction( 412, "SHADING_COLOR" ); |
849 |
createGeomAction( 412, "SHADING_COLOR" ); |
850 |
createGeomAction( 413, "ISOS" ); |
850 |
createGeomAction( 413, "ISOS" ); |
851 |
createGeomAction( 414, "STEP_VALUE" ); |
851 |
createGeomAction( 414, "STEP_VALUE" ); |
Lines 896-1020
Link Here
|
896 |
createMenu( 4020, basicId, -1 ); |
896 |
createMenu( 4020, basicId, -1 ); |
897 |
|
897 |
|
898 |
int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 ); |
898 |
int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 ); |
899 |
createMenu( 4021, primId, -1 ); |
899 |
createMenu( 4021, primId, -1 ); |
900 |
createMenu( 4022, primId, -1 ); |
900 |
createMenu( 4022, primId, -1 ); |
901 |
createMenu( 4023, primId, -1 ); |
901 |
createMenu( 4023, primId, -1 ); |
902 |
createMenu( 4024, primId, -1 ); |
902 |
createMenu( 4024, primId, -1 ); |
903 |
createMenu( 4025, primId, -1 ); |
903 |
createMenu( 4025, primId, -1 ); |
904 |
|
904 |
|
905 |
int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 ); |
905 |
int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 ); |
906 |
createMenu( 4031, genId, -1 ); |
906 |
createMenu( 4031, genId, -1 ); |
907 |
createMenu( 4032, genId, -1 ); |
907 |
createMenu( 4032, genId, -1 ); |
908 |
createMenu( 4033, genId, -1 ); |
908 |
createMenu( 4033, genId, -1 ); |
909 |
createMenu( 4034, genId, -1 ); |
909 |
createMenu( 4034, genId, -1 ); |
910 |
createMenu( separator(), newEntId, -1 ); |
910 |
createMenu( separator(), newEntId, -1 ); |
911 |
|
911 |
|
912 |
int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 ); |
912 |
int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 ); |
913 |
createMenu( 800, groupId, -1 ); |
913 |
createMenu( 800, groupId, -1 ); |
914 |
createMenu( 801, groupId, -1 ); |
914 |
createMenu( 801, groupId, -1 ); |
915 |
createMenu( separator(), newEntId, -1 ); |
915 |
createMenu( separator(), newEntId, -1 ); |
916 |
|
916 |
|
917 |
int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 ); |
917 |
int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 ); |
918 |
createMenu( 9997, blocksId, -1 ); |
918 |
createMenu( 9997, blocksId, -1 ); |
919 |
createMenu( 9999, blocksId, -1 ); |
919 |
createMenu( 9999, blocksId, -1 ); |
920 |
|
920 |
|
921 |
createMenu( separator(), newEntId, -1 ); |
921 |
createMenu( separator(), newEntId, -1 ); |
922 |
createMenu( 404, newEntId, -1 ); |
922 |
createMenu( 404, newEntId, -1 ); |
923 |
createMenu( separator(), newEntId, -1 ); |
923 |
createMenu( separator(), newEntId, -1 ); |
924 |
createMenu( 407, newEntId, -1 ); |
924 |
createMenu( 407, newEntId, -1 ); |
925 |
|
925 |
|
926 |
int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 ); |
926 |
int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 ); |
927 |
createMenu( 4081, buildId, -1 ); |
927 |
createMenu( 4081, buildId, -1 ); |
928 |
createMenu( 4082, buildId, -1 ); |
928 |
createMenu( 4082, buildId, -1 ); |
929 |
createMenu( 4083, buildId, -1 ); |
929 |
createMenu( 4083, buildId, -1 ); |
930 |
createMenu( 4084, buildId, -1 ); |
930 |
createMenu( 4084, buildId, -1 ); |
931 |
createMenu( 4085, buildId, -1 ); |
931 |
createMenu( 4085, buildId, -1 ); |
932 |
createMenu( 4086, buildId, -1 ); |
932 |
createMenu( 4086, buildId, -1 ); |
933 |
|
933 |
|
934 |
int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 ); |
934 |
int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 ); |
935 |
|
935 |
|
936 |
int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 ); |
936 |
int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 ); |
937 |
createMenu( 5011, boolId, -1 ); |
937 |
createMenu( 5011, boolId, -1 ); |
938 |
createMenu( 5012, boolId, -1 ); |
938 |
createMenu( 5012, boolId, -1 ); |
939 |
createMenu( 5013, boolId, -1 ); |
939 |
createMenu( 5013, boolId, -1 ); |
940 |
createMenu( 5014, boolId, -1 ); |
940 |
createMenu( 5014, boolId, -1 ); |
941 |
|
941 |
|
942 |
int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 ); |
942 |
int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 ); |
943 |
createMenu( 5021, transId, -1 ); |
943 |
createMenu( 5021, transId, -1 ); |
944 |
createMenu( 5022, transId, -1 ); |
944 |
createMenu( 5022, transId, -1 ); |
945 |
createMenu( 5023, transId, -1 ); |
945 |
createMenu( 5023, transId, -1 ); |
946 |
createMenu( 5024, transId, -1 ); |
946 |
createMenu( 5024, transId, -1 ); |
947 |
createMenu( 5025, transId, -1 ); |
947 |
createMenu( 5025, transId, -1 ); |
948 |
createMenu( 5026, transId, -1 ); |
948 |
createMenu( 5026, transId, -1 ); |
949 |
createMenu( separator(), transId, -1 ); |
949 |
createMenu( separator(), transId, -1 ); |
950 |
createMenu( 5027, transId, -1 ); |
950 |
createMenu( 5027, transId, -1 ); |
951 |
createMenu( 5028, transId, -1 ); |
951 |
createMenu( 5028, transId, -1 ); |
952 |
|
952 |
|
953 |
createMenu( 503, operId, -1 ); |
953 |
createMenu( 503, operId, -1 ); |
954 |
createMenu( 504, operId, -1 ); |
954 |
createMenu( 504, operId, -1 ); |
955 |
createMenu( separator(), operId, -1 ); |
955 |
createMenu( separator(), operId, -1 ); |
956 |
createMenu( 505, transId, -1 ); |
956 |
createMenu( 505, transId, -1 ); |
957 |
createMenu( 506, transId, -1 ); |
957 |
createMenu( 506, transId, -1 ); |
958 |
//createMenu( 507, transId, -1 ); |
958 |
//createMenu( 507, transId, -1 ); |
959 |
|
959 |
|
960 |
int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 ); |
960 |
int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 ); |
961 |
createMenu( 9998, blockId, -1 ); |
961 |
createMenu( 9998, blockId, -1 ); |
962 |
createMenu( 9995, blockId, -1 ); |
962 |
createMenu( 9995, blockId, -1 ); |
963 |
createMenu( 99991, blockId, -1 ); |
963 |
createMenu( 99991, blockId, -1 ); |
964 |
|
964 |
|
965 |
int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 ); |
965 |
int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 ); |
966 |
createMenu( 605, repairId, -1 ); |
966 |
createMenu( 605, repairId, -1 ); |
967 |
createMenu( 603, repairId, -1 ); |
967 |
createMenu( 603, repairId, -1 ); |
968 |
createMenu( 606, repairId, -1 ); |
968 |
createMenu( 606, repairId, -1 ); |
969 |
createMenu( 607, repairId, -1 ); |
969 |
createMenu( 607, repairId, -1 ); |
970 |
createMenu( 604, repairId, -1 ); |
970 |
createMenu( 604, repairId, -1 ); |
971 |
createMenu( 601, repairId, -1 ); |
971 |
createMenu( 601, repairId, -1 ); |
972 |
createMenu( 602, repairId, -1 ); |
972 |
createMenu( 602, repairId, -1 ); |
973 |
createMenu( 608, repairId, -1 ); |
973 |
createMenu( 608, repairId, -1 ); |
974 |
createMenu( 609, repairId, -1 ); |
974 |
createMenu( 609, repairId, -1 ); |
975 |
createMenu( 610, repairId, -1 ); |
975 |
createMenu( 610, repairId, -1 ); |
976 |
createMenu( 611, repairId, -1 ); |
976 |
createMenu( 611, repairId, -1 ); |
977 |
|
977 |
|
978 |
int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 ); |
978 |
int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 ); |
979 |
createMenu( 708, measurId, -1 ); |
979 |
createMenu( 708, measurId, -1 ); |
980 |
createMenu( 701, measurId, -1 ); |
980 |
createMenu( 701, measurId, -1 ); |
981 |
createMenu( separator(), measurId, -1 ); |
981 |
createMenu( separator(), measurId, -1 ); |
982 |
createMenu( 702, measurId, -1 ); |
982 |
createMenu( 702, measurId, -1 ); |
983 |
createMenu( 703, measurId, -1 ); |
983 |
createMenu( 703, measurId, -1 ); |
984 |
createMenu( separator(), measurId, -1 ); |
984 |
createMenu( separator(), measurId, -1 ); |
985 |
|
985 |
|
986 |
int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 ); |
986 |
int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 ); |
987 |
createMenu( 7041, dimId, -1 ); |
987 |
createMenu( 7041, dimId, -1 ); |
988 |
createMenu( 7042, dimId, -1 ); |
988 |
createMenu( 7042, dimId, -1 ); |
989 |
createMenu( separator(), measurId, -1 ); |
989 |
createMenu( separator(), measurId, -1 ); |
990 |
|
990 |
|
991 |
createMenu( 705, measurId, -1 ); |
991 |
createMenu( 705, measurId, -1 ); |
992 |
createMenu( separator(), measurId, -1 ); |
992 |
createMenu( separator(), measurId, -1 ); |
993 |
createMenu( 706, measurId, -1 ); |
993 |
createMenu( 706, measurId, -1 ); |
994 |
createMenu( 707, measurId, -1 ); |
994 |
createMenu( 707, measurId, -1 ); |
995 |
createMenu( 7072, measurId, -1 ); |
995 |
createMenu( 7072, measurId, -1 ); |
996 |
|
996 |
|
997 |
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 ); |
997 |
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 ); |
998 |
createMenu( separator(), toolsId, -1 ); |
998 |
createMenu( separator(), toolsId, -1 ); |
999 |
createMenu( 5103, toolsId, -1 ); |
999 |
createMenu( 5103, toolsId, -1 ); |
1000 |
|
1000 |
|
1001 |
//int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 ); |
1001 |
//int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 ); |
1002 |
//createMenu( separator(), prefId, -1 ); |
1002 |
//createMenu( separator(), prefId, -1 ); |
1003 |
//int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 ); |
1003 |
//int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 ); |
1004 |
//createMenu( 412, geomId, -1 ); |
1004 |
//createMenu( 412, geomId, -1 ); |
1005 |
//createMenu( 413, geomId, -1 ); |
1005 |
//createMenu( 413, geomId, -1 ); |
1006 |
//createMenu( 414, geomId, -1 ); |
1006 |
//createMenu( 414, geomId, -1 ); |
1007 |
//createMenu( separator(), prefId, -1 ); |
1007 |
//createMenu( separator(), prefId, -1 ); |
1008 |
|
1008 |
|
1009 |
int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 ); |
1009 |
int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 ); |
1010 |
createMenu( separator(), viewId, -1 ); |
1010 |
createMenu( separator(), viewId, -1 ); |
1011 |
|
1011 |
|
1012 |
int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 ); |
1012 |
int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 ); |
1013 |
createMenu( 211, dispmodeId, -1 ); |
1013 |
createMenu( 211, dispmodeId, -1 ); |
1014 |
|
1014 |
|
1015 |
createMenu( separator(), viewId, -1 ); |
1015 |
createMenu( separator(), viewId, -1 ); |
1016 |
createMenu( 212, viewId, -1 ); |
1016 |
createMenu( 212, viewId, -1 ); |
1017 |
createMenu( 214, viewId, -1 ); |
1017 |
createMenu( 214, viewId, -1 ); |
1018 |
createMenu( separator(), viewId, -1 ); |
1018 |
createMenu( separator(), viewId, -1 ); |
1019 |
|
1019 |
|
1020 |
/* |
1020 |
/* |
Lines 1022-1029
Link Here
|
1022 |
because of these items are accessible through object browser and viewers |
1022 |
because of these items are accessible through object browser and viewers |
1023 |
we have removed they from main menu |
1023 |
we have removed they from main menu |
1024 |
|
1024 |
|
1025 |
createMenu( 216, viewId, -1 ); |
1025 |
createMenu( 216, viewId, -1 ); |
1026 |
createMenu( 213, viewId, -1 ); |
1026 |
createMenu( 213, viewId, -1 ); |
1027 |
createMenu( 215, viewId, -1 ); |
1027 |
createMenu( 215, viewId, -1 ); |
1028 |
*/ |
1028 |
*/ |
1029 |
|
1029 |
|
Lines 1042-1074
Link Here
|
1042 |
createTool( 4020, basicTbId ); |
1042 |
createTool( 4020, basicTbId ); |
1043 |
|
1043 |
|
1044 |
int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) ); |
1044 |
int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) ); |
1045 |
createTool( 4021, primTbId ); |
1045 |
createTool( 4021, primTbId ); |
1046 |
createTool( 4022, primTbId ); |
1046 |
createTool( 4022, primTbId ); |
1047 |
createTool( 4023, primTbId ); |
1047 |
createTool( 4023, primTbId ); |
1048 |
createTool( 4024, primTbId ); |
1048 |
createTool( 4024, primTbId ); |
1049 |
createTool( 4025, primTbId ); |
1049 |
createTool( 4025, primTbId ); |
1050 |
|
1050 |
|
1051 |
int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) ); |
1051 |
int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) ); |
1052 |
createTool( 5011, boolTbId ); |
1052 |
createTool( 5011, boolTbId ); |
1053 |
createTool( 5012, boolTbId ); |
1053 |
createTool( 5012, boolTbId ); |
1054 |
createTool( 5013, boolTbId ); |
1054 |
createTool( 5013, boolTbId ); |
1055 |
createTool( 5014, boolTbId ); |
1055 |
createTool( 5014, boolTbId ); |
1056 |
|
1056 |
|
1057 |
int genTbId = createTool( tr( "TOOL_GENERATION" ) ); |
1057 |
int genTbId = createTool( tr( "TOOL_GENERATION" ) ); |
1058 |
createTool( 4031, genTbId ); |
1058 |
createTool( 4031, genTbId ); |
1059 |
createTool( 4032, genTbId ); |
1059 |
createTool( 4032, genTbId ); |
1060 |
createTool( 4033, genTbId ); |
1060 |
createTool( 4033, genTbId ); |
1061 |
createTool( 4034, genTbId ); |
1061 |
createTool( 4034, genTbId ); |
1062 |
|
1062 |
|
1063 |
int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) ); |
1063 |
int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) ); |
1064 |
createTool( 5021, transTbId ); |
1064 |
createTool( 5021, transTbId ); |
1065 |
createTool( 5022, transTbId ); |
1065 |
createTool( 5022, transTbId ); |
1066 |
createTool( 5023, transTbId ); |
1066 |
createTool( 5023, transTbId ); |
1067 |
createTool( 5024, transTbId ); |
1067 |
createTool( 5024, transTbId ); |
1068 |
createTool( 5025, transTbId ); |
1068 |
createTool( 5025, transTbId ); |
1069 |
createTool( 5026, transTbId ); |
1069 |
createTool( 5026, transTbId ); |
1070 |
createTool( separator(), transTbId ); |
1070 |
createTool( separator(), transTbId ); |
1071 |
createTool( 5027, transTbId ); |
1071 |
createTool( 5027, transTbId ); |
1072 |
createTool( 5028, transTbId ); |
1072 |
createTool( 5028, transTbId ); |
1073 |
|
1073 |
|
1074 |
// ---- create popup menus -------------------------- |
1074 |
// ---- create popup menus -------------------------- |
Lines 1185-1198
Link Here
|
1185 |
setMenuShown( false ); |
1185 |
setMenuShown( false ); |
1186 |
setToolShown( false ); |
1186 |
setToolShown( false ); |
1187 |
|
1187 |
|
1188 |
disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), |
1188 |
disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), |
1189 |
this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); |
1189 |
this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); |
1190 |
|
1190 |
|
1191 |
EmitSignalCloseAllDialogs(); |
1191 |
EmitSignalCloseAllDialogs(); |
1192 |
|
1192 |
|
1193 |
GUIMap::Iterator it; |
1193 |
GUIMap::Iterator it; |
1194 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) |
1194 |
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) |
1195 |
it.data()->deactivate(); |
1195 |
it.data()->deactivate(); |
1196 |
|
1196 |
|
1197 |
// Unset actions accelerator keys |
1197 |
// Unset actions accelerator keys |
1198 |
//action(111)->setAccel(QKeySequence()); // Import |
1198 |
//action(111)->setAccel(QKeySequence()); // Import |
Lines 1286-1292
Link Here
|
1286 |
if( nbSel == 0 ) { |
1286 |
if( nbSel == 0 ) { |
1287 |
////// NOTHING SELECTED |
1287 |
////// NOTHING SELECTED |
1288 |
popup->clear(); |
1288 |
popup->clear(); |
1289 |
} |
1289 |
} |
1290 |
else if ( nbSel == 1 ) { |
1290 |
else if ( nbSel == 1 ) { |
1291 |
////// SINGLE OBJECT SELECTION |
1291 |
////// SINGLE OBJECT SELECTION |
1292 |
if ( parentComponent != parent->getActiveComponent() ) { |
1292 |
if ( parentComponent != parent->getActiveComponent() ) { |
Lines 1513-1519
Link Here
|
1513 |
|
1513 |
|
1514 |
//======================================================================= |
1514 |
//======================================================================= |
1515 |
// function : GeometryGUI::BuildPresentation() |
1515 |
// function : GeometryGUI::BuildPresentation() |
1516 |
// purpose : |
1516 |
// purpose : |
1517 |
//======================================================================= |
1517 |
//======================================================================= |
1518 |
void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win ) |
1518 |
void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win ) |
1519 |
{ |
1519 |
{ |
Lines 1531-1537
Link Here
|
1531 |
|
1531 |
|
1532 |
const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() ); |
1532 |
const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() ); |
1533 |
// const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() ); |
1533 |
// const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() ); |
1534 |
|
1534 |
|
1535 |
// disable non-OCC viewframe menu commands |
1535 |
// disable non-OCC viewframe menu commands |
1536 |
// action( 404 )->setEnabled( ViewOCC ); // SKETCHER |
1536 |
// action( 404 )->setEnabled( ViewOCC ); // SKETCHER |
1537 |
action( 603 )->setEnabled( ViewOCC ); // SuppressFace |
1537 |
action( 603 )->setEnabled( ViewOCC ); // SuppressFace |
Lines 1654-1675
Link Here
|
1654 |
|
1654 |
|
1655 |
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, |
1655 |
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, |
1656 |
LightApp_Preferences::Color, "Geometry", "shading_color" ); |
1656 |
LightApp_Preferences::Color, "Geometry", "shading_color" ); |
1657 |
|
1657 |
|
1658 |
addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup, |
1658 |
addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup, |
1659 |
LightApp_Preferences::Color, "Geometry", "wireframe_color" ); |
1659 |
LightApp_Preferences::Color, "Geometry", "wireframe_color" ); |
1660 |
|
1660 |
|
1661 |
addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup, |
1661 |
addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup, |
1662 |
LightApp_Preferences::Color, "Geometry", "free_bound_color" ); |
1662 |
LightApp_Preferences::Color, "Geometry", "free_bound_color" ); |
1663 |
|
1663 |
|
1664 |
addPreference( tr( "PREF_LINE_COLOR"), genGroup, |
1664 |
addPreference( tr( "PREF_LINE_COLOR"), genGroup, |
1665 |
LightApp_Preferences::Color, "Geometry", "line_color" ); |
1665 |
LightApp_Preferences::Color, "Geometry", "line_color" ); |
1666 |
|
1666 |
|
1667 |
addPreference( tr( "PREF_POINT_COLOR"), genGroup, |
1667 |
addPreference( tr( "PREF_POINT_COLOR"), genGroup, |
1668 |
LightApp_Preferences::Color, "Geometry", "point_color" ); |
1668 |
LightApp_Preferences::Color, "Geometry", "point_color" ); |
1669 |
|
1669 |
|
1670 |
addPreference( tr( "PREF_ISOS_COLOR" ), genGroup, |
1670 |
addPreference( tr( "PREF_ISOS_COLOR" ), genGroup, |
1671 |
LightApp_Preferences::Color, "Geometry", "isos_color" ); |
1671 |
LightApp_Preferences::Color, "Geometry", "isos_color" ); |
1672 |
|
1672 |
|
1673 |
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, |
1673 |
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, |
1674 |
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); |
1674 |
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); |
1675 |
|
1675 |
|
Lines 1677-1699
Link Here
|
1677 |
QStringList aModesList; |
1677 |
QStringList aModesList; |
1678 |
aModesList.append( tr("MEN_WIREFRAME") ); |
1678 |
aModesList.append( tr("MEN_WIREFRAME") ); |
1679 |
aModesList.append( tr("MEN_SHADING") ); |
1679 |
aModesList.append( tr("MEN_SHADING") ); |
1680 |
|
1680 |
|
1681 |
QValueList<QVariant> anIndexesList; |
1681 |
QValueList<QVariant> anIndexesList; |
1682 |
anIndexesList.append(0); |
1682 |
anIndexesList.append(0); |
1683 |
anIndexesList.append(1); |
1683 |
anIndexesList.append(1); |
1684 |
|
1684 |
|
1685 |
setPreferenceProperty( dispmode, "strings", aModesList ); |
1685 |
setPreferenceProperty( dispmode, "strings", aModesList ); |
1686 |
setPreferenceProperty( dispmode, "indexes", anIndexesList ); |
1686 |
setPreferenceProperty( dispmode, "indexes", anIndexesList ); |
1687 |
|
1687 |
|
1688 |
// Set property for step value for spinboxes |
1688 |
// Set property for step value for spinboxes |
1689 |
setPreferenceProperty( step, "min", 0.001 ); |
1689 |
setPreferenceProperty( step, "min", 0.001 ); |
1690 |
setPreferenceProperty( step, "max", 10000 ); |
1690 |
setPreferenceProperty( step, "max", 10000 ); |
1691 |
setPreferenceProperty( step, "precision", 3 ); |
1691 |
setPreferenceProperty( step, "precision", 3 ); |
1692 |
|
1692 |
|
1693 |
} |
1693 |
} |
1694 |
|
1694 |
|
1695 |
void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) |
1695 |
void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) |
1696 |
{ |
1696 |
{ |
|
|
1697 |
if (section == "Geometry") { |
1698 |
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); |
1699 |
if (param == QString("SettingsGeomStep")) { |
1700 |
double spin_step = aResourceMgr->doubleValue(section, param, 100.); |
1701 |
EmitSignalDefaultStepValueChanged(spin_step); |
1702 |
} |
1703 |
} |
1697 |
} |
1704 |
} |
1698 |
|
1705 |
|
1699 |
LightApp_Displayer* GeometryGUI::displayer() |
1706 |
LightApp_Displayer* GeometryGUI::displayer() |